1. 21 12月, 2017 1 次提交
  2. 31 10月, 2017 1 次提交
    • K
      treewide: Fix function prototypes for module_param_call() · e4dca7b7
      Kees Cook 提交于
      Several function prototypes for the set/get functions defined by
      module_param_call() have a slightly wrong argument types. This fixes
      those in an effort to clean up the calls when running under type-enforced
      compiler instrumentation for CFI. This is the result of running the
      following semantic patch:
      
      @match_module_param_call_function@
      declarer name module_param_call;
      identifier _name, _set_func, _get_func;
      expression _arg, _mode;
      @@
      
       module_param_call(_name, _set_func, _get_func, _arg, _mode);
      
      @fix_set_prototype
       depends on match_module_param_call_function@
      identifier match_module_param_call_function._set_func;
      identifier _val, _param;
      type _val_type, _param_type;
      @@
      
       int _set_func(
      -_val_type _val
      +const char * _val
       ,
      -_param_type _param
      +const struct kernel_param * _param
       ) { ... }
      
      @fix_get_prototype
       depends on match_module_param_call_function@
      identifier match_module_param_call_function._get_func;
      identifier _val, _param;
      type _val_type, _param_type;
      @@
      
       int _get_func(
      -_val_type _val
      +char * _val
       ,
      -_param_type _param
      +const struct kernel_param * _param
       ) { ... }
      
      Two additional by-hand changes are included for places where the above
      Coccinelle script didn't notice them:
      
      	drivers/platform/x86/thinkpad_acpi.c
      	fs/lockd/svc.c
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NJessica Yu <jeyu@kernel.org>
      e4dca7b7
  3. 01 10月, 2017 1 次提交
  4. 19 8月, 2017 1 次提交
    • S
      platform/x86: thinkpad_acpi: Fix warning about deprecated hwmon_device_register · 6b99e356
      Stanislav Fomichev 提交于
      Use hwmon_device_register_with_groups instead of deprecated
      hwmon_device_register and fix a dmesg warning.
      
      This patch however changes the userspace API.
      hwmon_device_register_with_groups takes `hwmon' name as an argument and
      creates a name file in the `hwmon' device, not in the `platform_device'.
      This allows us to remove custom `name' device attribute, but in order to
      make lm-sensors happy we also have to move fans and thermal attributes
      to the `hwmon' device.
      
      Even though this patch changes userspace API, it's still compatible with
      the lm-sensors. Starting with lm-sensors 3.0 (circa 2007), it looks at
      both hwmon and the backing device for the name and other attributes.
      
      before:
      $ cat /sys/devices/platform/thinkpad_hwmon/{name,fan1_input}
      thinkpad
      2007
      $ cat /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon1/{name,fan1_input}
      cat: /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon1/name: No such file or directory
      cat: /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon1/fan1_input: No such file or directory
      $ cat /sys/class/hwmon/hwmon1/{name,fan1_input}
      cat: /sys/class/hwmon/hwmon1/name: No such file or directory
      cat: /sys/class/hwmon/hwmon1/fan1_input: No such file or directory
      $ sensors
      thinkpad-isa-0000
      Adapter: ISA adapter
      fan1:        3533 RPM
      
      after:
      $ cat /sys/devices/platform/thinkpad_hwmon/{name,fan1_input}
      cat: /sys/devices/platform/thinkpad_hwmon/name: No such file or directory
      cat: /sys/devices/platform/thinkpad_hwmon/fan1_input: No such file or directory
      $ cat /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon1/{name,fan1_input}
      thinkpad
      3478
      $ cat /sys/class/hwmon/hwmon1/{name,fan1_input}
      thinkpad
      3478
      $ sensors
      thinkpad-isa-0000
      Adapter: ISA adapter
      fan1:        3489 RPM
      
      $ sensors -v
      sensors version 3.4.0 with libsensors version 3.4.0
      Signed-off-by: NStanislav Fomichev <kernel@fomichev.me>
      [dvhart: cleaned up commit log, bumped version to 4.14 in the doc change]
      Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
      6b99e356
  5. 12 6月, 2017 1 次提交
  6. 15 5月, 2017 2 次提交
  7. 15 3月, 2017 2 次提交
  8. 25 2月, 2017 3 次提交
  9. 25 12月, 2016 1 次提交
  10. 16 12月, 2016 1 次提交
  11. 14 12月, 2016 5 次提交
  12. 09 6月, 2016 1 次提交
  13. 28 5月, 2016 1 次提交
  14. 15 4月, 2016 1 次提交
  15. 24 3月, 2016 1 次提交
  16. 20 1月, 2016 1 次提交
  17. 16 1月, 2016 1 次提交
  18. 01 1月, 2016 1 次提交
  19. 07 11月, 2015 1 次提交
  20. 29 8月, 2015 1 次提交
  21. 19 6月, 2015 1 次提交
  22. 20 5月, 2015 1 次提交
  23. 06 5月, 2015 1 次提交
  24. 15 3月, 2015 2 次提交
  25. 04 3月, 2015 5 次提交
  26. 12 2月, 2015 1 次提交
  27. 11 2月, 2015 1 次提交