1. 03 Dec, 2015 3 commits
    • Chris J Arges's avatar
      livepatch: function,sympos scheme in livepatch sysfs directory · 444f9e99
      Chris J Arges authored
      The following directory structure will allow for cases when the same
      function name exists in a single object.
      	/sys/kernel/livepatch/<patch>/<object>/<function,sympos>
      
      The sympos number corresponds to the nth occurrence of the symbol name in
      kallsyms for the patched object.
      
      An example of patching multiple symbols can be found here:
      	https://github.com/dynup/kpatch/issues/493Signed-off-by: default avatarChris J Arges <chris.j.arges@canonical.com>
      Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      444f9e99
    • Chris J Arges's avatar
      livepatch: add sympos as disambiguator field to klp_reloc · 064c89df
      Chris J Arges authored
      In cases of duplicate symbols, sympos will be used to disambiguate instead
      of val. By default sympos will be 0, and patching will only succeed if
      the symbol is unique. Specifying a positive value will ensure that
      occurrence of the symbol in kallsyms for the patched object will be used
      for patching if it is valid. For external relocations sympos is not
      supported.
      
      Remove klp_verify_callback, klp_verify_args and klp_verify_vmlinux_symbol
      as they are no longer used.
      
      From the klp_reloc structure remove val, as it can be refactored as a
      local variable in klp_write_object_relocations.
      Signed-off-by: default avatarChris J Arges <chris.j.arges@canonical.com>
      Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      064c89df
    • Chris J Arges's avatar
      livepatch: add old_sympos as disambiguator field to klp_func · b2b018ef
      Chris J Arges authored
      Currently, patching objects with duplicate symbol names fail because the
      creation of the sysfs function directory collides with the previous
      attempt. Appending old_addr to the function name is problematic as it
      reveals the address of the function being patch to a normal user. Using
      the symbol's occurrence in kallsyms to postfix the function name in the
      sysfs directory solves the issue of having consistent unique names and
      ensuring that the address is not exposed to a normal user.
      
      In addition, using the symbol position as the user's method to disambiguate
      symbols instead of addr allows for disambiguating symbols in modules as
      well for both function addresses and for relocs. This also simplifies much
      of the code. Special handling for kASLR is no longer needed and can be
      removed. The klp_find_verify_func_addr function can be replaced by
      klp_find_object_symbol, and klp_verify_vmlinux_symbol and its callback can
      be removed completely.
      
      In cases of duplicate symbols, old_sympos will be used to disambiguate
      instead of old_addr. By default old_sympos will be 0, and patching will
      only succeed if the symbol is unique. Specifying a positive value will
      ensure that occurrence of the symbol in kallsyms for the patched object
      will be used for patching if it is valid.
      
      In addition, make old_addr an internal structure field not to be specified
      by the user. Finally, remove klp_find_verify_func_addr as it can be
      replaced by klp_find_object_symbol directly.
      
      Support for symbol position disambiguation for relocations is added in the
      next patch in this series.
      Signed-off-by: default avatarChris J Arges <chris.j.arges@canonical.com>
      Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      b2b018ef
  2. 19 Nov, 2015 3 commits
  3. 18 Nov, 2015 2 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 34258a32
      Linus Torvalds authored
      Pull s390 fixes from Martin Schwidefsky:
       "Assorted bug fixes, the mlock2 system call gets added, and one
        improvement.  The boot from dasd devices is now possible from a wider
        range of devices"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: remove SALIPL loader
        s390: wire up mlock2 system call
        s390: remove g5 elf platform support
        s390: avoid cache aliasing under z/VM and KVM
        s390/sclp: _sclp_wait_int(): retain full PSW mask
        s390/zcrypt: Fix initialisation when zcrypt is built-in
        s390/zcrypt: Fix kernel crash on systems without AP bus support
        s390: add support for ipl devices in subchannel sets > 0
        s390/ipl: fix out of bounds access in scpdata_write
        s390/pci_dma: improve debugging of errors during dma map
        s390/pci_dma: handle dma table failures
        s390/pci_dma: unify label of invalid translation table entries
        s390/syscalls: remove system call number calculation
        s390/cio: simplify css_generate_pgid
        s390/diag: add a s390 prefix to the diagnose trace point
        s390/head: fix error message on unsupported hardware
      34258a32
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus-v4.4-rc2' of... · 0d77a123
      Linus Torvalds authored
      Merge tag 'hwmon-for-linus-v4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
       "Fix build issues in scpi and ina2xx drivers, update scpi driver to
        support recent firmware, and fix an uninitialized variable warning in
        applesmc driver"
      
      * tag 'hwmon-for-linus-v4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (scpi) skip unsupported sensors properly
        hwmon: (scpi) add thermal-of dependency
        hwmon : (applesmc) Fix uninitialized variables warnings
        hwmon: (ina2xx) Fix build issue by selecting REGMAP_I2C
      0d77a123
  4. 17 Nov, 2015 22 commits
  5. 16 Nov, 2015 10 commits