1. 31 Oct, 2017 2 commits
    • Kees Cook's avatar
      treewide: Fix function prototypes for module_param_call() · e4dca7b7
      Kees Cook authored
      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: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
      e4dca7b7
    • Kees Cook's avatar
      media: pci: Convert timers to use timer_setup() · 162e6376
      Kees Cook authored
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly.
      
      Cc: Andy Walls <awalls@md.metrocast.net>
      Cc: Sergey Kozlov <serjk@netup.ru>
      Cc: Abylay Ospan <aospan@netup.ru>
      Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
      Cc: Arvind Yadav <arvind.yadav.cs@gmail.com>
      Cc: Geliang Tang <geliangtang@gmail.com>
      Cc: Sean Young <sean@mess.org>
      Cc: "Pali Rohár" <pali.rohar@gmail.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      [hans.verkuil@cisco.com: dropped pci/ttpci/av7110_ir.c patch chunk]
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      162e6376
  2. 03 Feb, 2017 1 commit
  3. 28 Jun, 2016 4 commits
  4. 20 Apr, 2016 1 commit