1. 09 1月, 2018 6 次提交
    • S
      symbol lookup: introduce dereference_symbol_descriptor() · 04b8eb7a
      Sergey Senozhatsky 提交于
      dereference_symbol_descriptor() invokes appropriate ARCH specific
      function descriptor dereference callbacks:
      - dereference_kernel_function_descriptor() if the pointer is a
        kernel symbol;
      
      - dereference_module_function_descriptor() if the pointer is a
        module symbol.
      
      This is the last step needed to make '%pS/%ps' smart enough to
      handle function descriptor dereference on affected ARCHs and
      to retire '%pF/%pf'.
      
      To refresh it:
        Some architectures (ia64, ppc64, parisc64) use an indirect pointer
        for C function pointers - the function pointer points to a function
        descriptor and we need to dereference it to get the actual function
        pointer.
      
        Function descriptors live in .opd elf section and all affected
        ARCHs (ia64, ppc64, parisc64) handle it properly for kernel and
        modules. So we, technically, can decide if the dereference is
        needed by simply looking at the pointer: if it belongs to .opd
        section then we need to dereference it.
      
        The kernel and modules have their own .opd sections, obviously,
        that's why we need to split dereference_function_descriptor()
        and use separate kernel and module dereference arch callbacks.
      
      Link: http://lkml.kernel.org/r/20171206043649.GB15885@jagdpanzerIV
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: James Bottomley <jejb@parisc-linux.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: linux-ia64@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Tested-by: Tony Luck <tony.luck@intel.com> #ia64
      Tested-by: Santosh Sivaraj <santosh@fossix.org> #powerpc
      Tested-by: Helge Deller <deller@gmx.de> #parisc64
      Signed-off-by: NPetr Mladek <pmladek@suse.com>
      04b8eb7a
    • S
      parisc64: Add .opd based function descriptor dereference · 1705bd6a
      Sergey Senozhatsky 提交于
      We are moving towards separate kernel and module function descriptor
      dereference callbacks. This patch enables it for parisc64.
      
      For pointers that belong to the kernel
      -  Added __start_opd and __end_opd pointers, to track the kernel
         .opd section address range;
      
      -  Added dereference_kernel_function_descriptor(). Now we
         will dereference only function pointers that are within
         [__start_opd, __end_opd);
      
      For pointers that belong to a module
      -  Added dereference_module_function_descriptor() to handle module
         function descriptor dereference. Now we will dereference only
         pointers that are within [module->opd.start, module->opd.end).
      
      Link: http://lkml.kernel.org/r/20171109234830.5067-5-sergey.senozhatsky@gmail.com
      To: Tony Luck <tony.luck@intel.com>
      To: Fenghua Yu <fenghua.yu@intel.com>
      To: Helge Deller <deller@gmx.de>
      To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      To: Paul Mackerras <paulus@samba.org>
      To: Michael Ellerman <mpe@ellerman.id.au>
      To: James Bottomley <jejb@parisc-linux.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: linux-ia64@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Tested-by: Helge Deller <deller@gmx.de> #parisc64
      Signed-off-by: NPetr Mladek <pmladek@suse.com>
      1705bd6a
    • S
      powerpc64: Add .opd based function descriptor dereference · 5633e85b
      Sergey Senozhatsky 提交于
      We are moving towards separate kernel and module function descriptor
      dereference callbacks. This patch enables it for powerpc64.
      
      For pointers that belong to the kernel
      -  Added __start_opd and __end_opd pointers, to track the kernel
         .opd section address range;
      
      -  Added dereference_kernel_function_descriptor(). Now we
         will dereference only function pointers that are within
         [__start_opd, __end_opd);
      
      For pointers that belong to a module
      -  Added dereference_module_function_descriptor() to handle module
         function descriptor dereference. Now we will dereference only
         pointers that are within [module->opd.start, module->opd.end).
      
      Link: http://lkml.kernel.org/r/20171109234830.5067-4-sergey.senozhatsky@gmail.com
      To: Tony Luck <tony.luck@intel.com>
      To: Fenghua Yu <fenghua.yu@intel.com>
      To: Helge Deller <deller@gmx.de>
      To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      To: Paul Mackerras <paulus@samba.org>
      To: Michael Ellerman <mpe@ellerman.id.au>
      To: James Bottomley <jejb@parisc-linux.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: linux-ia64@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Tested-by: Santosh Sivaraj <santosh@fossix.org> #powerpc
      Signed-off-by: NPetr Mladek <pmladek@suse.com>
      5633e85b
    • S
      ia64: Add .opd based function descriptor dereference · 8e307888
      Sergey Senozhatsky 提交于
      We are moving towards separate kernel and module function descriptor
      dereference callbacks. This patch enables it for IA64.
      
      For pointers that belong to the kernel
      -  Added __start_opd and __end_opd pointers, to track the kernel
         .opd section address range;
      
      -  Added dereference_kernel_function_descriptor(). Now we
         will dereference only function pointers that are within
         [__start_opd, __end_opd);
      
      For pointers that belong to a module
      -  Added dereference_module_function_descriptor() to handle module
         function descriptor dereference. Now we will dereference only
         pointers that are within [module->opd.start, module->opd.end).
      
      Link: http://lkml.kernel.org/r/20171109234830.5067-3-sergey.senozhatsky@gmail.com
      To: Fenghua Yu <fenghua.yu@intel.com>
      To: Helge Deller <deller@gmx.de>
      To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      To: Paul Mackerras <paulus@samba.org>
      To: Michael Ellerman <mpe@ellerman.id.au>
      To: James Bottomley <jejb@parisc-linux.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: linux-ia64@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Tested-by: Tony Luck <tony.luck@intel.com> #ia64
      Signed-off-by: NPetr Mladek <pmladek@suse.com>
      8e307888
    • S
      sections: split dereference_function_descriptor() · b865ea64
      Sergey Senozhatsky 提交于
      There are two format specifiers to print out a pointer in symbolic
      format: '%pS/%ps' and '%pF/%pf'. On most architectures, the two
      mean exactly the same thing, but some architectures (ia64, ppc64,
      parisc64) use an indirect pointer for C function pointers, where
      the function pointer points to a function descriptor (which in
      turn contains the actual pointer to the code). The '%pF/%pf, when
      used appropriately, automatically does the appropriate function
      descriptor dereference on such architectures.
      
      The "when used appropriately" part is tricky. Basically this is
      a subtle ABI detail, specific to some platforms, that made it to
      the API level and people can be unaware of it and miss the whole
      "we need to dereference the function" business out. [1] proves
      that point (note that it fixes only '%pF' and '%pS', there might
      be '%pf' and '%ps' cases as well).
      
      It appears that we can handle everything within the affected
      arches and make '%pS/%ps' smart enough to retire '%pF/%pf'.
      Function descriptors live in .opd elf section and all affected
      arches (ia64, ppc64, parisc64) handle it properly for kernel
      and modules. So we, technically, can decide if the dereference
      is needed by simply looking at the pointer: if it belongs to
      .opd section then we need to dereference it.
      
      The kernel and modules have their own .opd sections, obviously,
      that's why we need to split dereference_function_descriptor()
      and use separate kernel and module dereference arch callbacks.
      
      This patch does the first step, it
      a) adds dereference_kernel_function_descriptor() function.
      b) adds a weak alias to dereference_module_function_descriptor()
         function.
      
      So, for the time being, we will have:
      1) dereference_function_descriptor()
         A generic function, that simply dereferences the pointer. There is
         bunch of places that call it: kgdbts, init/main.c, extable, etc.
      
      2) dereference_kernel_function_descriptor()
         A function to call on kernel symbols that does kernel .opd section
         address range test.
      
      3) dereference_module_function_descriptor()
         A function to call on modules' symbols that does modules' .opd
         section address range test.
      
      [1] https://marc.info/?l=linux-kernel&m=150472969730573
      
      Link: http://lkml.kernel.org/r/20171109234830.5067-2-sergey.senozhatsky@gmail.com
      To: Fenghua Yu <fenghua.yu@intel.com>
      To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      To: Paul Mackerras <paulus@samba.org>
      To: Michael Ellerman <mpe@ellerman.id.au>
      To: James Bottomley <jejb@parisc-linux.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: linux-ia64@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Tested-by: Tony Luck <tony.luck@intel.com> #ia64
      Tested-by: Santosh Sivaraj <santosh@fossix.org> #powerpc
      Tested-by: Helge Deller <deller@gmx.de> #parisc64
      Signed-off-by: NPetr Mladek <pmladek@suse.com>
      b865ea64
    • J
      openrisc: Fix conflicting types for _exext and _stext · ce666d91
      Joel Stanley 提交于
      The printk tree in linux-next has a patch "symbol lookup: introduce
      dereference_symbol_descriptor()" that includes sections.h in kallsyms.h,
      so arch/openrisc/kernel/traps.c gets a second extern definition for
      _etext and _stext.
      
      Remove the local definitions and include sections.h directly in
      preparation for the kallsyms.h change.
      
      This fixes the following (future) build error:
      
        CC      arch/openrisc/kernel/traps.o
      arch/openrisc/kernel/traps.c:43:13: error: conflicting types for ‘_etext’
       extern char _etext, _stext;
                   ^
      In file included from ./arch/openrisc/include/generated/asm/sections.h:1:0,
                       from ./include/linux/kallsyms.h:15,
                       from arch/openrisc/kernel/traps.c:35:
      ./include/asm-generic/sections.h:35:32: note: previous declaration of ‘_etext’ was here
       extern char _text[], _stext[], _etext[];
                                      ^
      Signed-off-by: NJoel Stanley <joel@jms.id.au>
      Reviewed-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Acked-by: NStafford Horne <shorne@gmail.com>
      Signed-off-by: NPetr Mladek <pmladek@suse.com>
      ce666d91
  2. 08 12月, 2017 2 次提交
  3. 21 11月, 2017 7 次提交
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk · 11ca75d2
      Linus Torvalds 提交于
      Pull printk updates from Petr Mladek:
      
       - print the warning about dropped messages on consoles on a separate
         line.   It makes it more legible.
      
       - one typo fix and small code clean up.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk:
        added new line symbol after warning about dropped messages
        printk: fix typo in printk_safe.c
        printk: simplify no_printk()
      11ca75d2
    • L
      Merge tag 'fbdev-v4.15' of git://github.com/bzolnier/linux · e1d1ea54
      Linus Torvalds 提交于
      Pull fbdev updates from Bartlomiej Zolnierkiewicz:
       "There is nothing really major here (though removal of the dead igafb
        driver stands out in diffstat).
      
        Summary:
      
         - convert timers to use timer_setup() (Kees Cook, Thierry Reding)
      
         - fix panels support on iMX boards in mxsfb driver (Stefan Agner)
      
         - fix timeout on EDID read in udlfb driver (Ladislav Michl)
      
         - add missing modes to fix out of bounds access in controlfb driver
           (Geert Uytterhoeven)
      
         - update initialisation paths in sa1100fb driver to be more robust
           (Russell King)
      
         - fix error handling path of ->probe method in au1200fb driver
           (Christophe JAILLET)
      
         - fix handling of cases when either panel or crt is defined in
           sm501fb driver (Sudip Mukherjee, Colin Ian King)
      
         - add ability to the Goldfish FB driver to be recognized by OS via DT
           (Aleksandar Markovic)
      
         - structures constifications (Bhumika Goyal)
      
         - misc fixes (Allen Pais, Gustavo A. R. Silva, Dan Carpenter)
      
         - misc cleanups (Colin Ian King, Himanshu Jha, Markus Elfring)
      
         - remove dead igafb driver"
      
      * tag 'fbdev-v4.15' of git://github.com/bzolnier/linux: (42 commits)
        OMAPFB: prevent buffer underflow in omapfb_parse_vram_param()
        video: fbdev: sm501fb: fix potential null pointer dereference on fbi
        fbcon: Initialize ops->info early
        video: fbdev: Convert timers to use timer_setup()
        video: fbdev: pxa3xx_gcu: Convert timers to use timer_setup()
        fbdev: controlfb: Add missing modes to fix out of bounds access
        video: fbdev: sis_main: mark expected switch fall-throughs
        video: fbdev: cirrusfb: mark expected switch fall-throughs
        video: fbdev: aty: radeon_pm: mark expected switch fall-throughs
        video: fbdev: sm501fb: mark expected switch fall-through in sm501fb_blank_crt
        video: fbdev: intelfb: remove redundant variables
        video/fbdev/dnfb: Use common error handling code in dnfb_probe()
        sm501fb: suspend and resume fb if it exists
        sm501fb: unregister framebuffer only if registered
        sm501fb: deallocate colormap only if allocated
        video: goldfishfb: Add support for device tree bindings
        Documentation: Add device tree binding for Goldfish FB driver
        video: udlfb: Fix read EDID timeout
        video: fbdev: remove dead igafb driver
        video: fbdev: mxsfb: fix pixelclock polarity
        ...
      e1d1ea54
    • L
      Merge tag 'devicetree-fixes-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · c633e898
      Linus Torvalds 提交于
      Pull DeviceTree fixes from Rob Herring:
      
       - Remove mc13892 as a trivial device
      
       - Improve of_find_node_by_name() documentation
      
       - Fix unit test dtc warnings
      
       - Clean-ups of USB binding documentation
      
       - Fix potential NULL deref in of_pci_map_rid
      
      * tag 'devicetree-fixes-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: trivial-devices: Remove fsl,mc13892
        of: Document exactly what of_find_node_by_name() puts
        of: unittest: disable interrupts_property warning
        of: unittest: let dtc generate __local_fixups__
        dt-bindings: usb: document hub and host-controller properties
        dt-bindings: usb: clean up compatible property
        dt-bindings: usb: fix reg-property port-number range
        dt-bindings: usb: fix example hub node name
        of/pci: Fix theoretical NULL dereference
      c633e898
    • L
      Merge tag 'jfs-4.15-2' of git://github.com/kleikamp/linux-shaggy · bf8973fc
      Linus Torvalds 提交于
      Pull jfs fixlet from Dave Kleikamp:
       "Update jfs git tree in MAINTAINERS"
      
      * tag 'jfs-4.15-2' of git://github.com/kleikamp/linux-shaggy:
        MAINTAINERS: fix jfs tree location
      bf8973fc
    • J
      dt-bindings: trivial-devices: Remove fsl,mc13892 · def4db33
      Jonathan Neuschäfer 提交于
      This device's bindings are not trivial: Additional properties are
      documented in in Documentation/devicetree/bindings/mfd/mc13xxx.txt.
      Signed-off-by: NJonathan Neuschäfer <j.neuschaefer@gmx.net>
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      def4db33
    • S
      of: Document exactly what of_find_node_by_name() puts · 02a876b5
      Stephen Boyd 提交于
      It isn't clear if this function of_node_put()s the 'from'
      argument, or the node it searches. Clearly indicate which
      variable is touched. Fold in some more fixes from Randy too
      because we're in the area.
      
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Acked-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NRob Herring <robh@kernel.org>
      02a876b5
    • T
      MAINTAINERS: fix jfs tree location · 86313903
      Tom Saeger 提交于
      JFS tree has been moved to github.
      Signed-off-by: NTom Saeger <tom.saeger@oracle.com>
      Signed-off-by: NDave Kleikamp <dave.kleikamp@oracle.com>
      86313903
  4. 20 11月, 2017 3 次提交
    • L
      Merge tag 'ntb-4.15' of git://github.com/jonmason/ntb · c8a0739b
      Linus Torvalds 提交于
      Pull ntb updates from Jon Mason:
       "Support for the switchtec ntb and related changes. Also, a couple of
        bug fixes"
      
      [ The timing isn't great. I had asked people to send me pull requests
        before my family vacation, and this code has not even been in
        linux-next as far as I can tell. But Logan Gunthorpe pleaded for its
        inclusion because the Switchtec driver has apparently been around for
        a while, just never in linux-next - Linus ]
      
      * tag 'ntb-4.15' of git://github.com/jonmason/ntb:
        ntb: intel: remove b2b memory window workaround for Skylake NTB
        NTB: make idt_89hpes_cfg const
        NTB: switchtec_ntb: Update switchtec documentation with notes for NTB
        NTB: switchtec_ntb: Add memory window support
        NTB: switchtec_ntb: Implement scratchpad registers
        NTB: switchtec_ntb: Implement doorbell registers
        NTB: switchtec_ntb: Add link management
        NTB: switchtec_ntb: Add skeleton NTB driver
        NTB: switchtec_ntb: Initialize hardware for doorbells and messages
        NTB: switchtec_ntb: Initialize hardware for memory windows
        NTB: switchtec_ntb: Introduce initial NTB driver
        NTB: Add check and comment for link up to mw_count() and mw_get_align()
        NTB: Ensure ntb_mw_get_align() is only called when the link is up
        NTB: switchtec: Add link event notifier callback
        NTB: switchtec: Add NTB hardware register definitions
        NTB: switchtec: Export class symbol for use in upper layer driver
        NTB: switchtec: Move structure definitions into a common header
        ntb: update maintainer list for Intel NTB driver
      c8a0739b
    • R
      ima: do not update security.ima if appraisal status is not INTEGRITY_PASS · 020aae3e
      Roberto Sassu 提交于
      Commit b65a9cfc ("Untangling ima mess, part 2: deal with counters")
      moved the call of ima_file_check() from may_open() to do_filp_open() at a
      point where the file descriptor is already opened.
      
      This breaks the assumption made by IMA that file descriptors being closed
      belong to files whose access was granted by ima_file_check(). The
      consequence is that security.ima and security.evm are updated with good
      values, regardless of the current appraisal status.
      
      For example, if a file does not have security.ima, IMA will create it after
      opening the file for writing, even if access is denied. Access to the file
      will be allowed afterwards.
      
      Avoid this issue by checking the appraisal status before updating
      security.ima.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Signed-off-by: NJames Morris <james.l.morris@oracle.com>
      020aae3e
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide · ed30b147
      Linus Torvalds 提交于
      Pull small IDE cleanup from David Miller.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
        PNP: ide: constify pnp_device_id
      ed30b147
  5. 19 11月, 2017 22 次提交