1. 05 9月, 2017 1 次提交
  2. 02 9月, 2017 2 次提交
  3. 30 8月, 2017 1 次提交
    • B
      dt-binding: net/phy: fix interrupts description · c27d88e1
      Baruch Siach 提交于
      Commit b053dc5a (powerpc: Refactor device tree binding) split the
      Ethernet PHY binding documentation out of the big booting-without-of.txt
      file, leaving a dangling reference to "section 2" in the 'interrupts'
      property description. Drop that reference, and make the description look
      more like the rest.
      
      While at it, make the example interrupt-parent phandle look more like a
      real world phandle, and use an IRQ_TYPE_ macro for the 'interrupts'
      type.
      Signed-off-by: NBaruch Siach <baruch@tkos.co.il>
      Signed-off-by: NRob Herring <robh@kernel.org>
      c27d88e1
  4. 29 8月, 2017 4 次提交
  5. 26 8月, 2017 1 次提交
  6. 25 8月, 2017 3 次提交
    • A
      of: Use PLATFORM_DEVID_NONE definition · 6d7e3bf8
      Andy Shevchenko 提交于
      Use dedicated definition instead of plain -1 where it's appropriate.
      
      No functional change intended.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      6d7e3bf8
    • B
      of/device: Fix of_device_get_modalias() buffer handling · 8c2a75e5
      Bjorn Andersson 提交于
      of_device_request_module() calls of_device_get_modalias() with "len" 0,
      to calculate the size of the buffer needed to store the result, but due
      to integer promotion the ssize_t "len" will be compared as unsigned with
      strlen(compat) and the loop will generally never break. This results in
      a call to snprintf() with a negative len, which triggers below warning,
      followed by a dereference of a invalid pointer:
      
        [    3.060067] WARNING: CPU: 0 PID: 51 at lib/vsprintf.c:2122 vsnprintf+0x348/0x6d8
        ...
        [    3.060301] [<ffffff800891ede8>] vsnprintf+0x348/0x6d8
        [    3.060308] [<ffffff800891f248>] snprintf+0x48/0x50
        [    3.060316] [<ffffff80086a7c80>] of_device_get_modalias+0x108/0x160
        [    3.060322] [<ffffff80086a7cf8>] of_device_request_module+0x20/0x88
        ...
      
      Further more of_device_get_modalias() is supposed to return the number
      of bytes needed to store the entire modalias, so the loop needs to
      continue accumulate the total size even though the buffer is full.
      
      Finally the function is not expected to ensure space for the NUL, nor
      include it in the returned size, so only 1 should be added to the length
      of "compat" in the loop (to account for the character 'C').
      
      Fixes: bc575064 ("of/device: use of_property_for_each_string to parse compatible strings")
      Cc: Rob Herring <robh@kernel.org>
      Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: NRob Herring <robh@kernel.org>
      8c2a75e5
    • B
      of/device: Prevent buffer overflow in of_device_modalias() · 08ab58d9
      Bjorn Andersson 提交于
      As of_device_get_modalias() returns the number of bytes that would have
      been written to the target string, regardless of how much did fit in the
      buffer, it's possible that the returned index points beyond the buffer
      passed to of_device_modalias() - causing memory beyond the buffer to be
      null terminated.
      
      Fixes: 0634c295 ("of: Add function for generating a DT modalias with a newline")
      Cc: Rob Herring <robh@kernel.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: NRob Herring <robh@kernel.org>
      08ab58d9
  7. 23 8月, 2017 2 次提交
  8. 22 8月, 2017 4 次提交
  9. 18 8月, 2017 1 次提交
  10. 15 8月, 2017 1 次提交
  11. 11 8月, 2017 1 次提交
  12. 10 8月, 2017 1 次提交
  13. 04 8月, 2017 1 次提交
  14. 02 8月, 2017 3 次提交
  15. 25 7月, 2017 2 次提交
  16. 24 7月, 2017 4 次提交
  17. 21 7月, 2017 3 次提交
  18. 20 7月, 2017 3 次提交
    • F
      of: overlay: add overlay symbols to live device tree · d1651b03
      Frank Rowand 提交于
      Add overlay __symbols__ properties to live tree when an overlay
      is added to the live tree so that the symbols are available to
      subsequent overlays.
      
      Expected test result is new __symbols__ entries for labels from
      the overlay after this commit.
      
      Before this commit:
      
         Console error message near end of unittest:
            ### dt-test ### FAIL of_unittest_overlay_high_level():2296 Adding overlay 'overlay_bad_symbol' failed
            ### dt-test ### end of unittest - 190 passed, 1 failed
      
         The new unittest "fails" because the expected result of loading the
         new overlay is an error instead of success.
      
         $ # node hvac-medium-2 exists because the overlay loaded
         $ # since the duplicate symbol was not detected
         $ cd /proc/device-tree/testcase-data-2/substation@100/
         $ ls
         compatible     hvac-medium-2  motor-8        reg
         hvac-large-1   linux,phandle  name           status
         hvac-medium-1  motor-1        phandle
      
         $ cd /proc/device-tree/__symbols__/
         $ ls
         electric_1   lights_1     name         rides_1      spin_ctrl_2
         hvac_1       lights_2     retail_1     spin_ctrl_1
      
      After this commit:
      
         Previous console error message no longer occurs, but expected error
         occurs:
            OF: overlay: Failed to apply prop @/__symbols__/hvac_1
            OF: overlay: apply failed '/__symbols__'
            ### dt-test ### end of unittest - 191 passed, 0 failed
      
         $ # node hvac-medium-2 does not exist because the overlay
         $ # properly failed to load due to the duplicate symbol
         $ cd /proc/device-tree/testcase-data-2/substation@100/
         $ ls
         compatible     hvac-medium-1  motor-1        name           reg
         hvac-large-1   linux,phandle  motor-8        phandle        status
      
         $ cd /proc/device-tree/__symbols__/
         $ ls
         electric_1      lights_1        retail_1        ride_200_right  spin_ctrl_2
         hvac_1          lights_2        ride_200        rides_1
         hvac_2          name            ride_200_left   spin_ctrl_1
         $ cat ride_200; echo
         /testcase-data-2/fairway-1/ride@200
         $ cat ride_200_left ; echo
         /testcase-data-2/fairway-1/ride@200/track@10
         $ cat ride_200_right ; echo
         /testcase-data-2/fairway-1/ride@200/track@20
      Signed-off-by: NFrank Rowand <frank.rowand@sony.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      d1651b03
    • F
      of: overlay: correctly apply overlay node with unit-address · c1cd1e01
      Frank Rowand 提交于
      Correct existing node name detection when overlay node name has
      a unit-address.
      
      Expected test result is overlay will update the nodes and properties
      for /testcase-data-2/fairway-1/ride@100/ after this commit.
      
      Before this commit:
      
         Console error message near end of unittest:
            OF: Duplicate name in fairway-1, renamed to "ride@100#1"
      
         $ cd /proc/device-tree/testcase-data-2/fairway-1/
         $ # extra node: ride@100#1
         $ ls
         #address-cells  linux,phandle   phandle         ride@200
         #size-cells     name            ride@100        status
         compatible      orientation     ride@100#1
         $ cd /proc/device-tree/testcase-data-2/fairway-1/ride@100/
         $ ls track@30/incline-up
         ls: track@30/incline-up: No such file or directory
         $ ls track@40/incline-up
         ls: track@40/incline-up: No such file or directory
      
      After this commit:
      
         Console error message no longer occurs
      
         $ cd /proc/device-tree/testcase-data-2/fairway-1/
         $ # no extra node: ride@100#1
         $ ls
         #address-cells  compatible      name            phandle         ride@200
         #size-cells     linux,phandle   orientation     ride@100        status
         $ cd /proc/device-tree/testcase-data-2/fairway-1/ride@100/
         $ ls track@30/incline-up
         track@30/incline-up
         $ ls track@40/incline-up
         track@40/incline-up
      Signed-off-by: NFrank Rowand <frank.rowand@sony.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      c1cd1e01
    • F
      of: overlay: add overlay unittest data for node names and symbols · 60a0004c
      Frank Rowand 提交于
      Add nodes and properties to overlay_base and overlay dts files to
      test for
         - incorrect existing node name detection when overlay node name
           has a unit-address
         - adding overlay __symbols__ properties to live tree when an
           overlay is added to the live tree
      
      The following console messages will appear near the end of unittest
      until the code errors are corrected:
      
         OF: Duplicate name in fairway-1, renamed to "ride@100#1"
      
         ### dt-test ### FAIL of_unittest_overlay_high_level():2296 Adding overlay 'overlay_bad_symbol' failed
      
         ### dt-test ### end of unittest - 190 passed, 1 failed
      Signed-off-by: NFrank Rowand <frank.rowand@sony.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      60a0004c
  19. 19 7月, 2017 1 次提交
  20. 18 7月, 2017 1 次提交