1. 20 1月, 2017 1 次提交
  2. 19 1月, 2017 8 次提交
    • A
      lkdtm: hide stack overflow warning for corrupt-stack test · 7a11a1d1
      Arnd Bergmann 提交于
      After the latest change to make sure the compiler actually does a memset,
      it is now smart enough to flag the stack overflow at compile time,
      at least with gcc-7.0:
      
      drivers/misc/lkdtm_bugs.c: In function 'lkdtm_CORRUPT_STACK':
      drivers/misc/lkdtm_bugs.c:88:144: warning: 'memset' writing 64 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=]
      
      To outsmart the compiler again, this moves the memset into a noinline
      function where (for now) it doesn't see that we intentionally write
      broken code here.
      
      Fixes: c55d2400 ("lkdtm: Prevent the compiler from optimising lkdtm_CORRUPT_STACK()")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7a11a1d1
    • S
      coresight: STM: Balance enable/disable · 4474f4c4
      Suzuki K Poulose 提交于
      The stm is automatically enabled when an application sets the policy
      via ->link() call back by using coresight_enable(), which keeps the
      refcount of the current users of the STM. However, the unlink() callback
      issues stm_disable() directly, which leaves the STM turned off, without
      the coresight layer knowing about it. This prevents any further uses
      of the STM hardware as the coresight layer still thinks the STM is
      turned on and doesn't enable the hardware when required. Even manually
      enabling the STM via sysfs can't really enable the hw.
      
      e.g,
      
       $ echo 1 > $CS_DEVS/$ETR/enable_sink
       $ mkdir -p $CONFIG_FS/stp-policy/$source.0/stm_test/
       $ echo 32768 65535 > $CONFIG_FS/stp-policy/$source.0/stm_test/channels
       $ echo 64 > $CS_DEVS/$source/traceid
       $ ./stm_app
       Sending 64000 byte blocks of pattern 0 at 0us intervals
       Success to map channel(32768~32783) to 0xffffa95fa000
       Sending on channel 32768
       $ dd if=/dev/$ETR of=~/trace.bin.1
       597+1 records in
       597+1 records out
       305920 bytes (306 kB) copied, 0.399952 s, 765 kB/s
       $ ./stm_app
       Sending 64000 byte blocks of pattern 0 at 0us intervals
       Success to map channel(32768~32783) to 0xffff7e9e2000
       Sending on channel 32768
       $ dd if=/dev/$ETR of=~/trace.bin.2
       0+0 records in
       0+0 records out
       0 bytes (0 B) copied, 0.0232083 s, 0.0 kB/s
      
       Note that we don't get any data from the ETR for the second session.
      
       Also dmesg shows :
      
       [   77.520458] coresight-tmc 20800000.etr: TMC-ETR enabled
       [   77.537097] coresight-replicator etr_replicator@20890000: REPLICATOR enabled
       [   77.558828] coresight-replicator main_replicator@208a0000: REPLICATOR enabled
       [   77.581068] coresight-funnel 208c0000.main_funnel: FUNNEL inport 0 enabled
       [   77.602217] coresight-tmc 20840000.etf: TMC-ETF enabled
       [   77.618422] coresight-stm 20860000.stm: STM tracing enabled
       [  139.554252] coresight-stm 20860000.stm: STM tracing disabled
        # End of first tracing session
       [  146.351135] coresight-tmc 20800000.etr: TMC read start
       [  146.514486] coresight-tmc 20800000.etr: TMC read end
        # Note that the STM is not turned on via stm_generic_link()->coresight_enable()
        # and hence none of the components are turned on.
       [  152.479080] coresight-tmc 20800000.etr: TMC read start
       [  152.542632] coresight-tmc 20800000.etr: TMC read end
      
      This patch fixes the problem by balancing the unlink operation by using
      the coresight_disable(), keeping the coresight layer in sync with the
      hardware state and thus allowing normal usage of the STM component.
      
      Fixes: commit 237483aa ("coresight: stm: adding driver for CoreSight STM component")
      Cc: Pratik Patel <pratikp@codeaurora.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: stable@vger.kernel.org # 4.7+
      Acked-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Reviewed-by: NChunyan Zhang <zhang.chunyan@linaro.org>
      Reported-by: NRobert Walker <robert.walker@arm.com>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4474f4c4
    • B
      memory: aemif: allow passing device lookup table as platform data · f95bd041
      Bartosz Golaszewski 提交于
      TI aemif driver creates its own subnodes of the device tree in order
      to guarantee that all child devices are probed after the AEMIF timing
      parameters are configured.
      
      Some devices (e.g. da850) use struct of_dev_auxdata for clock lookup
      but nodes created from within the aemif driver can't access the lookup
      table.
      
      Create a platform data structure that holds a pointer to
      of_dev_auxdata so that we can use it with of_platform_populate().
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      Acked-by: NSekhar Nori <nsekhar@ti.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f95bd041
    • K
      Drivers: hv: vmbus: Move Hypercall invocation code out of common code · 6ab42a66
      K. Y. Srinivasan 提交于
      As part of the effort to separate out architecture specific code, move the
      hypercall invocation code to an architecture specific file.
      Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6ab42a66
    • K
      Drivers: hv vmbus: Move Hypercall page setup out of common code · 8730046c
      K. Y. Srinivasan 提交于
      As part of the effort to separate out architecture specific code, move the
      hypercall page setup to an architecture specific file.
      Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8730046c
    • K
      Drivers: hv: vmbus: Move the definition of generate_guest_id() · 352c9624
      K. Y. Srinivasan 提交于
      As part of the effort to separate out architecture specific code, move the
      definition of generate_guest_id() to x86 specific header file.
      Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      352c9624
    • K
      Drivers: hv: vmbus: Move the definition of hv_x64_msr_hypercall_contents · 3f646ed7
      K. Y. Srinivasan 提交于
      As part of the effort to separate out architecture specific code, move the
      definition of hv_x64_msr_hypercall_contents to x86 specific header file.
      Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3f646ed7
    • S
      eeprom: Add IDT 89HPESx EEPROM/CSR driver · cfad6425
      Serge Semin 提交于
        This driver provides an access to EEPROM of IDT PCIe-switches. IDT PCIe-
      switches expose a simple SMBus interface to perform IO-operations from/to
      EEPROM, which is located at private (so called Master) SMBus. The driver
      creates a simple binary sysfs-file to have an access to the EEPROM using
      the SMBus-slave interface in the i2c-device susfs-directory:
           /sys/bus/i2c/devices/<bus>-<devaddr>/eeprom
      In case if read-only flag is specified at dts-node of the device, User-space
      applications won't be able to write to the EEPROM sysfs-node.
      
        Additionally IDT 89HPESx SMBus interface has an ability to read/write
      values of device CSRs. This driver exposes debugfs-file to perform simple
      IO-operations using that ability for just basic debug purpose. Particularly
      the next file is created in the specific debugfs-directory:
           /sys/kernel/debug/idt_csr/
      Format of the debugfs-file value is:
           $ cat /sys/kernel/debug/idt_csr/<bus>-<devaddr>/<devname>;
           <CSR address>:<CSR value>
      So reading the content of the file gives current CSR address and it value.
      If User-space application wishes to change current CSR address, it can just
      write a proper value to the sysfs-file:
           $ echo "<CSR address>" >
               /sys/kernel/debug/idt_csr/<bus>-<devaddr>/<devname>
      If it wants to change the CSR value as well, the format of the write
      operation is:
           $ echo "<CSR address>:<CSR value>" > \
               /sys/kernel/debug/idt_csr/<bus>-<devaddr>/<devname>;
      CSR address and value can be any of hexadecimal, decimal or octal format.
      Signed-off-by: NSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cfad6425
  3. 14 1月, 2017 4 次提交
  4. 13 1月, 2017 8 次提交
  5. 12 1月, 2017 3 次提交
  6. 11 1月, 2017 16 次提交