1. 26 8月, 2011 1 次提交
  2. 07 8月, 2011 1 次提交
    • D
      net: Compute protocol sequence numbers and fragment IDs using MD5. · 6e5714ea
      David S. Miller 提交于
      Computers have become a lot faster since we compromised on the
      partial MD4 hash which we use currently for performance reasons.
      
      MD5 is a much safer choice, and is inline with both RFC1948 and
      other ISS generators (OpenBSD, Solaris, etc.)
      
      Furthermore, only having 24-bits of the sequence number be truly
      unpredictable is a very serious limitation.  So the periodic
      regeneration and 8-bit counter have been removed.  We compute and
      use a full 32-bit sequence number.
      
      For ipv6, DCCP was found to use a 32-bit truncated initial sequence
      number (it needs 43-bits) and that is fixed here as well.
      Reported-by: NDan Kaminsky <dan@doxpara.com>
      Tested-by: NWilly Tarreau <w@1wt.eu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e5714ea
  3. 04 8月, 2011 2 次提交
  4. 30 7月, 2011 1 次提交
  5. 28 7月, 2011 1 次提交
  6. 27 7月, 2011 5 次提交
  7. 26 7月, 2011 1 次提交
  8. 22 7月, 2011 2 次提交
  9. 21 7月, 2011 3 次提交
  10. 16 7月, 2011 1 次提交
  11. 15 7月, 2011 1 次提交
  12. 13 7月, 2011 13 次提交
    • C
      agp/intel: Fix typo in G4x_GMCH_SIZE_VT_2M · 780d7cc4
      Chris Wilson 提交于
      Konstantin Belousov found an error in the define of G4x_GMCH_SIZE_VT_2M
      relative to the GMCH specs, and confirmed that indeed one of his users
      with a Q45 reports 0xb not 0xc for a 2/2MiB GATT.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Konstantin Belousov <kostikbel@gmail.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      780d7cc4
    • S
      tpm: Fix a typo · c9206693
      Stefan Berger 提交于
      This patch fixes a typo.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
      c9206693
    • S
      tpm_tis: Probing function for Intel iTPM bug · 9519de3f
      Stefan Berger 提交于
      This patch introduces a function for automatic probing for the Intel iTPM
      STS_DATA_EXPECT flaw.
      
      The patch splits the current tpm_tis_send function into 2 parts where the 1st
      part is now called tpm_tis_send_data() and merely sends the data to the TPM.
      This function is then used for probing. The new tpm_tis_send function now
      first calls tpm_tis_send_data and if that succeeds has the TPM process the
      command and waits until the response is there.
      
      The probing for the Intel iTPM is only invoked if the user has not passed
      itpm=1 as parameter for the module *or* if such a TPM was detected via ACPI.
      Previously it was necessary to pass itpm=1 when also passing force=1 to the
      module when doing a 'modprobe'. This function is more general than the ACPI
      test function and the function relying on ACPI could probably be removed.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
      9519de3f
    • S
      tpm_tis: Fix the probing for interrupts · a7b66822
      Stefan Berger 提交于
      This patch fixes several aspects of the probing for interrupts.
      
      This patch reads the TPM's timeouts before probing for the interrupts. The
      tpm_get_timeouts() function is invoked in polling mode and gets the proper
      timeouts from the TPM so that we don't need to fall back to 2 minutes timeouts
      for short duration commands while the interrupt probing is happening.
      
      This patch introduces a variable probed_irq into the vendor structure that gets
      the irq number if an interrupt is received while the the tpm_gen_interrupt()
      function is run in polling mode during interrupt probing. Previously some
      parts of tpm_gen_interrupt() were run in polling mode, then the irq variable
      was set in the interrupt handler when an interrupt was received and execution
      of tpm_gen_interrupt() ended up switching over to interrupt mode.
      tpm_gen_interrupt() execution ended up on an event queue where it eventually
      timed out since the probing handler doesn't wake any queues.
      
      Before calling into free_irq() clear all interrupt flags that may have
      been set by the TPM. The reason is that free_irq() will call into the probing
      interrupt handler and may otherwise fool us into thinking that a real interrupt
      happened (because we see the flags as being set) while the TPM's interrupt line
      is not even connected to anything on the motherboard. This solves a problem
      on one machine I did testing on (Thinkpad T60).
      
      If a TPM claims to use a specifc interrupt, the probing is done as well
      to verify that the interrupt is actually working. If a TPM indicates
      that it does not use a specific interrupt (returns '0'), probe all interrupts
      from 3 to 15.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
      a7b66822
    • S
      tpm_tis: Delay ACPI S3 suspend while the TPM is busy · 20b87bbf
      Stefan Berger 提交于
      This patch delays the (ACPI S3) suspend while the TPM is busy processing a
      command and the TPM TIS driver is run in interrupt mode. This is the same
      behavior as we already have it for the TPM TIS driver in polling mode.
      
      Reasoning: Some of the TPM's commands advance the internal state of the TPM.
      An example would be the extending of one of its PCR registers. Upper layers,
      such as IMA or TSS (TrouSerS), would certainly want to be sure that the
      command succeeded rather than getting an error code (-62 = -ETIME) that may
      not give a conclusive answer as for what reason the command failed. Reissuing
      such a command would put the TPM into the wrong state, so waiting for it to
      finish is really the only option.
      
      The downside is that some commands (key creation) can take a long time and
      actually prevent the machine from entering S3 at all before the 20 second
      timeout of the power management subsystem arrives.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
      20b87bbf
    • S
      tpm_tis: Re-enable interrupts upon (S3) resume · 45baa1d1
      Stefan Berger 提交于
      This patch makes sure that if the TPM TIS interface is run in interrupt mode
      (rather than polling mode) that all interrupts are enabled in the TPM's
      interrupt enable register after a resume from ACPI S3 suspend. The registers
      may either have been cleared by the TPM loosing its state during device sleep
      or by the BIOS leaving the TPM in polling mode (after sending a command to
      the TPM for starting it up again)
      
      You may want to check if your TPM runs with interrupts by doing
      
      cat /proc/interrupts | grep -i tpm
      
      and see whether there is an entry or otherwise for it to use interrupts:
      
      modprobe tpm_tis interrupts=1 [add 'itpm=1' for Intel TPM ]
      
      v2:
        - the patch was adapted to work with the pnp and platform driver
          implementations in tpm_tis.c
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
      45baa1d1
    • S
      tpm: Fix display of data in pubek sysfs entry · 5a79444f
      Stefan Berger 提交于
      This patch fixes the TPM's pubek sysfs entry that is accessible as long
      as the TPM doesn't have an owner. It was necessary to shift the access to the
      data by -10 -- the first byte immediately follows the 10 byte header. The
      line
      
       	data = tpm_cmd.params.readpubek_out_buffer;
      
      sets it at the offset '10' in the packet, so we can read the data array
      starting at offset '0'.
      
      Before:
      
      Algorithm: 00 0C 00 00
      Encscheme: 08 00
      Sigscheme: 00 00
      Parameters: 00 00 00 00 01 00 AC E2 5E 3C A0 78
      Modulus length: -563306801
      Modulus:
      28 21 08 0F 82 CD F2 B1 E7 49 F7 74 70 BE 59 8C
      43 78 B1 24 EA 52 E2 FE 52 5C 3A 12 3B DC 61 71
      [...]
      
      After:
      
      Algorithm: 00 00 00 01
      Encscheme: 00 03
      Sigscheme: 00 01
      Parameters: 00 00 08 00 00 00 00 02 00 00 00 00
      Modulus length: 256
      Modulus:
      AC E2 5E 3C A0 78 DE 6C 9E CF 28 21 08 0F 82 CD
      F2 B1 E7 49 F7 74 70 BE 59 8C 43 78 B1 24 EA 52
      [...]
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
      5a79444f
    • S
      tpm_tis: Add timeouts sysfs entry · 62592101
      Stefan Berger 提交于
      Display the TPM's interface timeouts in a 'timeouts' sysfs entry. Display
      the entries as having been adjusted when they were scaled due to their values
      being reported in milliseconds rather than microseconds.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
      62592101
    • S
      tpm: Adjust interface timeouts if they are too small · e3e1a1e1
      Stefan Berger 提交于
      Adjust the interface timeouts if they are found to be too small, i.e., if
      they are returned in milliseconds rather than microseconds as we heared
      from Infineon that some (old) Infineon TPMs do.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
      e3e1a1e1
    • S
      tpm: Use interface timeouts returned from the TPM · 829bf067
      Stefan Berger 提交于
      The TPM driver currently discards the interface timeout values returned
      from the TPM. The check of the response packet needs to consider that
      the return_code field is 0 on success and the size of the expected
      packet is equivalent to the header size + u32 length indicator for the
      TPM_GetCapability() result + 4 interface timeout indicators of type u32.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
      829bf067
    • S
      tpm_tis: Introduce durations sysfs entry · 04ab2293
      Stefan Berger 提交于
      Display the TPM's command timeouts in a 'durations' sysfs entry. Display
      the entries as having been adjusted when they were scaled due to their values
      being reported in milliseconds rather than microseconds.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Tested-by: NGuillaume Chazarain <guichaz@gmail.com>
      Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
      04ab2293
    • S
      tpm: Adjust the durations if they are too small · e934acca
      Stefan Berger 提交于
      Adjust the durations if they are found to be too small, i.e., if they are
      returned in milliseconds rather than microseconds as some Infineon TPMs are
      reported to do.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
      e934acca
    • S
      tpm: Use durations returned from TPM · 979b1406
      Stefan Berger 提交于
      The TPM driver currently discards the durations values returned
      from the TPM. The check of the response packet needs to consider that
      the return_code field is 0 on success and the size of the expected
      packet is equivalent to the header size + u32 length indicator for the
      TPM_GetCapability() result + 3 timeout indicators of type u32.
      
      v4:
      - sysfs entry 'durations' is now a patch of its own
      - the work-around for TPMs reporting durations in milliseconds is now in a
        patch of its own
      
      v3:
      - sysfs entry now called 'durations' to resemble TPM-speak (previously
        was called 'timeouts')
      
      v2:
      - adjusting all timeouts for TPM devices reporting timeouts in msec rather
        than usec
      - also displaying in sysfs whether the timeouts are 'original' or 'adjusted'
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Tested-by: NGuillaume Chazarain <guichaz@gmail.com>
      Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
      979b1406
  13. 07 7月, 2011 1 次提交
  14. 30 6月, 2011 4 次提交
  15. 16 6月, 2011 1 次提交
    • N
      drivers/char/hpet.c: fix periodic-emulation for delayed interrupts · 273ef950
      Nils Carlson 提交于
      When interrupts are delayed due to interrupt masking or due to other
      interrupts being serviced the HPET periodic-emuation would fail.  This
      happened because given an interval t and a time for the current interrupt
      m we would compute the next time as t + m.  This works until we are
      delayed for > t, in which case we would be writing a new value which is in
      fact in the past.
      
      This can be solved by computing the next time instead as (k * t) + m where
      k is large enough to be in the future.  The exact computation of k is
      described in a comment to the code.
      
      More detail:
      
      Assuming an interval of 5 between each expected interrupt we have a normal
      case of
      
      t0: interrupt, read t0 from comparator, set next interrupt t0 + 5
      t5: interrupt, read t5 from comparator, set next interrupt t5 + 5
      t10: interrupt, read t10 from comparator, set next interrupt t10 + 5
      ...
      
      So, what happens when the interrupt is serviced too late?
      
      t0: interrupt, read t0 from comparator, set next interrupt t0 + 5
      t11: delayed interrupt serviced, read t5 from comparator, set next
      interrupt t5 + 5, which is in the past!
      ... counter loops ...
      t10: Much much later, get the next interrupt.
      
      This can happen either because we have interrupts masked for too long
      (some stupid driver goes on a printk rampage) or just because we are
      pushing the limits of the interval (too small a period), or both most
      probably.
      
      My solution is to read the main counter as well and set the next interrupt
      to occur at the right interval, for example:
      
      t0: interrupt, read t0 from comparator, set next interrupt t0 + 5
      t11: delayed interrupt serviced, read t5 from comparator, set next
      interrupt t15 as t10 has been missed.
      t15: back on track.
      Signed-off-by: NNils Carlson <nils.carlson@ericsson.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Clemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      273ef950
  16. 11 6月, 2011 1 次提交
    • C
      arch/tile: add hypervisor-based character driver for SPI flash ROM · dbcb4a1a
      Chris Metcalf 提交于
      The first version of this patch proposed an arch/tile/drivers/ directory,
      but the consensus was that this was probably a poor choice for a place to
      group Tilera-specific drivers, and that in any case grouping by platform
      was discouraged, and grouping by function was preferred.
      
      This version of the patch addresses various issues raised in the
      community, primarily the absence of sysfs integration.  The sysfs
      integration now handles passing information on sector size, page size,
      and total partition size to userspace as well.  In addition, we now
      use a single "struct cdev" to manage all the partition minor devices,
      and dynamically discover the correct number of partitions from the
      hypervisor rather than using a module_param with a default value.
      
      This driver has no particular "peer" drivers it can be grouped with.
      It is sort of like an MTD driver for SPI ROM, but it doesn't group well
      with the other MTD devices since it relies on hypervisor virtualization
      to handle many of the irritating aspects of flash ROM management: sector
      awareness, background read for sub-sector writes, bit examination to
      determine whether a sector erase needs to be issued, etc.  It is in fact
      more like an EEPROM driver, but the hypervisor virtualization does require
      a "flush" command if you wish to commit a sector write prior to writing
      to a different sector, and this is sufficiently different from generic
      I2C/SPI EEPROMs that as a result it doesn't group well with them either.
      
      The simple character device is already in use by a range of Tilera
      SPI ROM management tools, as well as by customers.  In addition, using
      the simple character device actually simplifies the userspace tools,
      since they don't need to manage sector erase, background read, etc.
      This both simplifies the code (since we can uniformly manage plain files
      and the SPI ROM) as well as makes the user code portable to non-Linux
      platforms that don't offer the same MTD ioctls.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      dbcb4a1a
  17. 10 6月, 2011 1 次提交