08 Oct, 2016

1 commit

  • When doing an nmi backtrace of many cores, most of which are idle, the
    output is a little overwhelming and very uninformative. Suppress
    messages for cpus that are idling when they are interrupted and just
    emit one line, "NMI backtrace for N skipped: idling at pc 0xNNN".

    We do this by grouping all the cpuidle code together into a new
    .cpuidle.text section, and then checking the address of the interrupted
    PC to see if it lies within that section.

    This commit suitably tags x86 and tile idle routines, and only adds in
    the minimal framework for other architectures.

    Link: http://lkml.kernel.org/r/1472487169-14923-5-git-send-email-cmetcalf@mellanox.com
    Signed-off-by: Chris Metcalf
    Acked-by: Peter Zijlstra (Intel)
    Tested-by: Peter Zijlstra (Intel)
    Tested-by: Daniel Thompson [arm]
    Tested-by: Petr Mladek
    Cc: Aaron Tomlin
    Cc: Peter Zijlstra (Intel)
    Cc: "Rafael J. Wysocki"
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Metcalf
     

27 Jun, 2016

1 commit

  • Move the definition of fsl_mc_device_id to its proper location in
    mod_devicetable.h, and add fsl-mc bus support to devicetable-offsets.c
    and file2alias.c to enable device table matching. With this patch udev
    based module loading of fsl-mc drivers is supported.

    Signed-off-by: Stuart Yoder
    Signed-off-by: Greg Kroah-Hartman

    Stuart Yoder
     

08 Jun, 2016

1 commit

  • Because of an improper dereference, a stray 'C' character was output to
    the modalias when no 'compatible' was specified. This is the case for
    some old PowerMac drivers which only set the 'name' property. Fix it to
    let them match again.

    Reported-by: Mathieu Malaterre
    Signed-off-by: Wolfram Sang
    Tested-by: Mathieu Malaterre
    Cc: Philipp Zabel
    Cc: Andreas Schwab
    Fixes: 6543becf26fff6 ("mod/file2alias: make modalias generation safe for cross compiling")
    Cc: stable@vger.kernel.org # v3.9+
    Signed-off-by: Michael Ellerman

    Wolfram Sang
     

06 May, 2016

1 commit

  • Since the wildcard at the end of OF module aliases is gone, autoloading
    of modules that don't match a device's last (most generic) compatible
    value fails.

    For example the CODA960 VPU on i.MX6Q has the SoC specific compatible
    "fsl,imx6q-vpu" and the generic compatible "cnm,coda960". Since the
    driver currently only works with knowledge about the SoC specific
    integration, it doesn't list "cnm,cod960" in the module device table.

    This results in the device compatible
    "of:NvpuTCfsl,imx6q-vpuCcnm,coda960" not matching the module alias
    "of:N*T*Cfsl,imx6q-vpu" anymore, whereas before commit 2f632369ab79
    ("modpost: don't add a trailing wildcard for OF module aliases") it
    matched the module alias "of:N*T*Cfsl,imx6q-vpu*".

    This patch adds two module aliases for each compatible, one without the
    wildcard and one with "C*" appended.

    $ modinfo coda | grep imx6q
    alias: of:N*T*Cfsl,imx6q-vpuC*
    alias: of:N*T*Cfsl,imx6q-vpu

    Fixes: 2f632369ab79 ("modpost: don't add a trailing wildcard for OF module aliases")
    Link: http://lkml.kernel.org/r/1462203339-15340-1-git-send-email-p.zabel@pengutronix.de
    Signed-off-by: Philipp Zabel
    Cc: Javier Martinez Canillas
    Cc: Brian Norris
    Cc: Sjoerd Simons
    Cc: Rusty Russell
    Cc: Greg Kroah-Hartman
    Cc: [4.5+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Philipp Zabel
     

29 Feb, 2016

1 commit

  • Code which runs outside the kernel's normal mode of operation often does
    unusual things which can cause a static analysis tool like objtool to
    emit false positive warnings:

    - boot image
    - vdso image
    - relocation
    - realmode
    - efi
    - head
    - purgatory
    - modpost

    Set OBJECT_FILES_NON_STANDARD for their related files and directories,
    which will tell objtool to skip checking them. It's ok to skip them
    because they don't affect runtime stack traces.

    Also skip the following code which does the right thing with respect to
    frame pointers, but is too "special" to be validated by a tool:

    - entry
    - mcount

    Also skip the test_nx module because it modifies its exception handling
    table at runtime, which objtool can't understand. Fortunately it's
    just a test module so it doesn't matter much.

    Currently objtool is the only user of OBJECT_FILES_NON_STANDARD, but it
    might eventually be useful for other tools.

    Signed-off-by: Josh Poimboeuf
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Arnaldo Carvalho de Melo
    Cc: Bernd Petrovitsch
    Cc: Borislav Petkov
    Cc: Chris J Arges
    Cc: Jiri Slaby
    Cc: Linus Torvalds
    Cc: Michal Marek
    Cc: Namhyung Kim
    Cc: Pedro Alves
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: live-patching@vger.kernel.org
    Link: http://lkml.kernel.org/r/366c080e3844e8a5b6a0327dc7e8c2b90ca3baeb.1456719558.git.jpoimboe@redhat.com
    Signed-off-by: Ingo Molnar

    Josh Poimboeuf
     

21 Jan, 2016

1 commit

  • PowerPC64 uses the symbol .TOC. much as other targets use
    _GLOBAL_OFFSET_TABLE_. It identifies the value of the GOT pointer (or in
    powerpc parlance, the TOC pointer). Global offset tables are generally
    local to an executable or shared library, or in the kernel, module. Thus
    it does not make sense for a module to resolve a relocation against
    .TOC. to the kernel's .TOC. value. A module has its own .TOC., and
    indeed the powerpc64 module relocation processing ignores the kernel
    value of .TOC. and instead calculates a module-local value.

    This patch removes code involved in exporting the kernel .TOC., tweaks
    modpost to ignore an undefined .TOC., and the module loader to twiddle
    the section symbol so that .TOC. isn't seen as undefined.

    Note that if the kernel was compiled with -msingle-pic-base then ELFv2
    would not have function global entry code setting up r2. In that case
    the module call stubs would need to be modified to set up r2 using the
    kernel .TOC. value, requiring some of this code to be reinstated.

    mpe: Furthermore a change in binutils master (not yet released) causes
    the current way we handle the TOC to no longer work when building with
    MODVERSIONS=y and RELOCATABLE=n. The symptom is that modules can not be
    loaded due to there being no version found for TOC.

    Cc: stable@vger.kernel.org # 3.16+
    Signed-off-by: Alan Modra
    Signed-off-by: Michael Ellerman

    Alan Modra
     

15 Jan, 2016

1 commit

  • Commit ac551828993e ("modpost: i2c aliases need no trailing wildcard")
    removed the wildcard at the end of the I2C module aliases because I2C
    devices have no IDs so the aliases are just arbitrary device names.

    This is also true for OF modaliases since a compatible string is used to
    define a specific IP hardware block. So the modalias should match a
    specific compatible string and not attempt to match a compatible string
    whose name matches the beginning of another one.

    For example, the following driver module:

    $ modinfo cros_ec_keyb | grep alias
    alias: platform:cros-ec-keyb
    alias: of:N*T*Cgoogle,cros-ec-keyb*

    will be tried to be loaded for an alias of:N*T*Cgoogle,cros-ec-keyb-v2
    but there could be a different driver that supports the device for that
    compatible string so it's better to remove the trailing wildcard for OF.

    Also, remove the word "always" from the add_wildcard() function comment
    since that was carried from the time where a wildcard was always added
    at the end of the module alias for all the devices.

    Signed-off-by: Javier Martinez Canillas
    Suggested-by: Brian Norris
    Reviewed-by: Sjoerd Simons
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Javier Martinez Canillas
     

15 Dec, 2015

1 commit


10 Nov, 2015

1 commit


07 Nov, 2015

1 commit

  • Pull sound updates from Takashi Iwai:
    "Here is the first batch of updates for sound system on 4.4-rc1.

    Again at this time, the update looks fairly calm; no big changes in
    either ALSA core or ASoC infrastructures, rather all small cleanups,
    in addition to the new stuff as usual.

    The biggest changes are about Firewire sound devices. It gained lots
    of new device support, and MIDI functionality. Also there are updates
    for a few still working-in-progress stuff (topology API and ASoC
    skylake), too. But overall, this update should give no big surprise.

    Some highlights are below:

    Core:
    - A few more Kconfig items for tinification; it's marked as EXPERT,
    so normal user should't be bothered :)
    - Refactoring with a new PCM hw_constraint helper
    - Removal of unused transfer_ack_{begin,end} PCM callbacks

    Firewire:
    - Restructuring of code subtree, lots of refactoring
    - Support AMDTP variants
    - New driver for Digidesign 002/003 family
    - Adds support for TASCAM FireOne to ALSA OXFW driver
    - Add MIDI support to TASCAM and Digi00x devices

    HD-Audio:
    - Automated modalias generation for codec drivers, finally
    - Improvement on heuristics for setting mixer name
    - A few fixes for longstanding bugs on Creative CA0132 cards
    - Addition of audio rate callback with i915 communication
    - Fix suspend issue on recent Dell XPS
    - Intel Lewisburg controller support

    ASoC:
    - Updates to the topology userspace interface
    - Big updates to the Renesas support (rcar)
    - More updates for supporting Intel Sky Lake systems
    - New drivers for Asahi Kasei Microdevices AK4613, Allwinnner A10,
    Cirrus Logic WM8998, Dialog DA7219, Nuvoton NAU8825, Rockchip
    S/PDIF, and Atmel class D amplifier

    USB-Audio:
    - A fix for newer Roland MIDI devices
    - Quirks and workarounds for Zoom R16/24 device

    Misc:
    - A few fixes for some old Cirrus CS46xx PCI sound boards
    - Yet another fixes for some old ESS Maestro3 PCI sound boards"

    * tag 'sound-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (330 commits)
    ALSA: hda - Add Intel Lewisburg device IDs Audio
    ALSA: hda - Apply pin fixup for HP ProBook 6550b
    ALSA: hda - Fix lost 4k BDL boundary workaround
    ALSA: maestro3: Fix Allegro mute until master volume/mute is touched
    ALSA: maestro3: Enable docking support for Dell Latitude C810
    ALSA: firewire-digi00x: add another rawmidi character device for MIDI control ports
    ALSA: firewire-digi00x: add MIDI operations for MIDI control port
    ALSA: firewire-digi00x: rename identifiers of MIDI operation for physical ports
    ALSA: cs46xx: Fix suspend for all channels
    ALSA: cs46xx: Fix Duplicate front for CS4294 and CS4298 codecs
    ALSA: DocBook: Add soc-ops.c and soc-compress.c
    ALSA: hda - Add / fix kernel doc comments
    ALSA: Constify ratden/ratnum constraints
    ALSA: hda - Disable 64bit address for Creative HDA controllers
    ALSA: hda/realtek - Dell XPS one ALC3260 speaker no sound after resume back
    ALSA: hda/ca0132 - Convert leftover pr_info() and pr_err()
    ASoC: fsl: Use #ifdef instead of #if for CONFIG_PM_SLEEP
    ASoC: rt5645: Sort the order for register bit defines
    ASoC: dwc: add check for master/slave format
    ASoC: rt5645: Add the HWEQ for the speaker output
    ...

    Linus Torvalds
     

26 Oct, 2015

1 commit

  • In our ARC toolchain the default linker script includes special
    sections used for code and data located in special fast memory.
    To avoid warnings we add these sections i.e. .cmem* and .fmt_slot*
    to white list.

    Signed-off-by: Noam Camus
    Cc: Rusty Russell
    Cc: Quentin Casasnovas
    Signed-off-by: Rusty Russell

    Noam Camus
     

20 Oct, 2015

1 commit

  • For generating modalias entries automatically, move the definition of
    struct hda_device_id to linux/mod_devicetable.h and add the handling
    of this record in file2alias helper. The new modalias is represented
    with combination of vendor id, device id, and api version as
    "hdaudio:vNrNaN".

    This patch itself doesn't convert the existing modaliases. Since they
    were added manually, this patch won't give any regression by itself at
    this point.

    [Modified the modalias format to adapt the api_version field, and drop
    invalid ANY_ID definition by tiwai]

    Signed-off-by: Subhransu S. Prusty
    Reviewed-by: Vinod Koul
    Tested-by: Subhransu S Prusty
    Signed-off-by: Takashi Iwai

    Subhransu S. Prusty
     

06 Oct, 2015

1 commit

  • The section mismatch warning can be easy to miss during the kernel build
    process. Allow it to be marked as fatal to be easily caught and prevent
    bugs from slipping in.

    Setting CONFIG_SECTION_MISMATCH_WARN_ONLY=y causes these warnings to be
    non-fatal, since there are a number of section mismatches when using
    allmodconfig on some architectures, and we do not want to break these
    builds by default.

    Signed-off-by: Nicolas Boichat
    Change-Id: Ic346706e3297c9f0d790e3552aa94e5cff9897a6
    Signed-off-by: Rusty Russell

    Nicolas Boichat
     

21 Sep, 2015

2 commits


09 Sep, 2015

1 commit

  • Pull core kbuild updates from Michal Marek:
    - modpost portability fix
    - linker script fix
    - genksyms segfault fix
    - fixdep cleanup
    - fix for clang detection

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kbuild: Fix clang detection
    kbuild: fixdep: drop meaningless hash table initialization
    kbuild: fixdep: optimize code slightly
    genksyms: Regenerate parser
    genksyms: Duplicate function pointer type definitions segfault
    kbuild: Fix .text.unlikely placement
    Avoid conflict with host definitions when cross-compiling

    Linus Torvalds
     

20 Aug, 2015

1 commit


08 Aug, 2015

1 commit

  • Module symbols have a limited length, but currently the build system
    allows the build finishing even if the driver code contains a too long
    symbol name, which eventually overflows the modversion_info[] item.
    The compiler may catch at compiling *.mod.c like
    CC xxx.mod.o
    xxx.mod.c:18:16: warning: initializer-string for array of chars is too long
    but it's merely a warning.

    This patch adds the check of the symbol length in modpost and stops
    the build properly.

    Currently MODULE_NAME_LEN is defined in modpost.c instead of referring
    to the definition in kernel header because including linux/module.h is
    messy and we must cover cross-compilation.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Rusty Russell

    Takashi Iwai
     

09 Jul, 2015

2 commits

  • Pull power management and ACPI updates from Rafael Wysocki:
    "These are fixes on top of the previous PM+ACPI pull requests
    (including one fix for a 4.1 regression) and two commits adding
    _CLS-based device enumeration support to the ACPI core and the ATA
    subsystem that waited for the latest ACPICA changes to be merged.

    Specifics:

    - Fix for an ACPI resources management regression introduced during
    the 4.1 cycle (that unfortunately went into -stable) effectively
    reverting the bad commit along with the recent fixups on top of it
    and using an alternative approach to address the underlying issue
    (Rafael J Wysocki).

    - Fix for a memory leak and an incorrect return value in an error
    code path in the ACPI LPSS (Low-Power Subsystem) driver (Rafael J
    Wysocki).

    - Fix for a leftover dangling pointer in an error code path in the
    new wakeup IRQ support code (Rafael J Wysocki).

    - Fix to prevent infinite loops (due to errors in other places) from
    happening in the core generic PM domains support code (Geert
    Uytterhoeven).

    - Hibernation documentation update/clarification (Uwe Geuder).

    - Support for _CLS-based device enumeration in the ACPI core and in
    the ATA subsystem (Suravee Suthikulpanit)"

    * tag 'pm+acpi-4.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    PM / wakeirq: Avoid setting power.wakeirq too hastily
    ata: ahci_platform: Add ACPI _CLS matching
    ACPI / scan: Add support for ACPI _CLS device matching
    PM / hibernate: clarify resume documentation
    PM / Domains: Avoid infinite loops in attach/detach code
    ACPI / LPSS: Fix up acpi_lpss_create_device()
    ACPI / PNP: Reserve ACPI resources at the fs_initcall_sync stage

    Linus Torvalds
     
  • The tilegx and tilepro compilers use .coldtext for their unlikely
    executed text section name, so an __attribute__((cold)) function
    will (when compiled with higher optimization levels) land in
    the .coldtext section.

    Modify modpost to add .coldtext to the set of OTHER_TEXT_SECTIONS
    so we don't get warnings about referencing such a section in an
    __ex_table block, and then also modify arch/tile/lib/memcpy_user_64.c
    so that it uses plain ".coldtext" instead of ".coldtext.memcpy".
    The latter naming is a relic of an earlier use of -ffunction-sections,
    which we no longer use by default.

    Signed-off-by: Chris Metcalf
    Acked-by: Rusty Russell

    Chris Metcalf
     

07 Jul, 2015

1 commit

  • Device drivers typically use ACPI _HIDs/_CIDs listed in struct device_driver
    acpi_match_table to match devices. However, for generic drivers, we do not
    want to list _HID for all supported devices. Also, certain classes of devices
    do not have _CID (e.g. SATA, USB). Instead, we can leverage ACPI _CLS,
    which specifies PCI-defined class code (i.e. base-class, subclass and
    programming interface). This patch adds support for matching ACPI devices using
    the _CLS method.

    To support loadable module, current design uses _HID or _CID to match device's
    modalias. With the new way of matching with _CLS this would requires modification
    to the current ACPI modalias key to include _CLS. This patch appends PCI-defined
    class-code to the existing ACPI modalias as following.

    acpi::::..:::
    E.g:
    # cat /sys/devices/platform/AMDI0600:00/modalias
    acpi:AMDI0600:010601:

    where bb is th base-class code, ss is te sub-class code, and pp is the
    programming interface code

    Since there would not be _HID/_CID in the ACPI matching table of the driver,
    this patch adds a field to acpi_device_id to specify the matching _CLS.

    static const struct acpi_device_id ahci_acpi_match[] = {
    { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
    {},
    };

    In this case, the corresponded entry in modules.alias file would be:

    alias acpi*:010601:* ahci_platform

    Acked-by: Mika Westerberg
    Reviewed-by: Hanjun Guo
    Signed-off-by: Suravee Suthikulpanit
    Signed-off-by: Rafael J. Wysocki

    Suthikulpanit, Suravee
     

27 Jun, 2015

1 commit

  • Pull USB updates from Greg KH:
    "Here's the big USB patchset for 4.2-rc1. As is normal these days, the
    majority of changes are in the gadget drivers, with a bunch of other
    small driver changes.

    All of these have been in linux-next with no reported issues"

    * tag 'usb-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (175 commits)
    usb: dwc3: Use ASCII space in Kconfig
    usb: chipidea: add work-around for Marvell HSIC PHY startup
    usb: chipidea: allow multiple instances to use default ci_default_pdata
    dt-bindings: Consolidate ChipIdea USB ci13xxx bindings
    phy: add Marvell HSIC 28nm PHY
    phy: Add Marvell USB 2.0 OTG 28nm PHY
    dt-bindings: Add Marvell PXA1928 USB and HSIC PHY bindings
    USB: ssb: use devm_kzalloc
    USB: ssb: fix error handling in ssb_hcd_create_pdev()
    usb: isp1760: check for null return from kzalloc
    cdc-acm: Add support of ATOL FPrint fiscal printers
    usb: chipidea: usbmisc_imx: Remove unneeded semicolon
    USB: usbtmc: add device quirk for Rigol DS6104
    USB: serial: mos7840: Use setup_timer
    phy: twl4030-usb: add ABI documentation
    phy: twl4030-usb: remove incorrect pm_runtime_get_sync() in probe function.
    phy: twl4030-usb: remove pointless 'suspended' test in 'suspend' callback.
    phy: twl4030-usb: make runtime pm more reliable.
    drivers:usb:fsl: Fix compilation error for fsl ehci drv
    usb: renesas_usbhs: Don't disable the pipe if Control write status stage
    ...

    Linus Torvalds
     

31 May, 2015

1 commit

  • A previous commit, c93b76b34b4d ("mei: bus: report also uuid in module
    alias") caused a build error as I missed applying a needed patch to add
    some macros to uapi/linux/uuid.h. Instead of those additional macros,
    change the mei code to use the existing uuid structure directly.

    Fixes: c93b76b34b4d
    Cc: Tomas Winkler
    Cc: Samuel Ortiz
    Reported-by: Stephen Rothwell
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

25 May, 2015

1 commit

  • In order to automate modules matching add device uuid
    which is reported in client enumeration, keep also
    the name that is needed in for nfc distinguishing radio vendor

    Report mei:name:uuid

    Cc: linux-api@vger.kernel.org
    Cc: Samuel Ortiz
    Signed-off-by: Tomas Winkler
    Signed-off-by: Greg Kroah-Hartman

    Tomas Winkler
     

14 May, 2015

1 commit

  • UTMI+ Low Pin Interface (ULPI) is a commonly used PHY
    interface for USB 2.0. The ULPI specification describes a
    standard set of registers which the vendors can extend for
    their specific needs. ULPI PHYs provide often functions
    such as charger detection and ADP sensing and probing.

    There are two major issues that the bus type is meant to
    tackle:

    Firstly, ULPI registers are accessed from the controller.
    The bus provides convenient method for the controller
    drivers to share that access with the actual PHY drivers.

    Secondly, there are already platforms that assume ULPI PHYs
    are runtime detected, such as many Intel Baytrail based
    platforms. They do not provide any kind of hardware
    description for the ULPI PHYs like separate ACPI device
    object that could be used to enumerate a device from.

    Signed-off-by: Heikki Krogerus
    Acked-by: David Cohen
    Signed-off-by: Felipe Balbi

    Heikki Krogerus
     

23 Apr, 2015

1 commit

  • Pull module updates from Rusty Russell:
    "Quentin opened a can of worms by adding extable entry checking to
    modpost, but most architectures seem fixed now. Thanks to all
    involved.

    Last minute rebase because I noticed a "[PATCH]" had snuck into a
    commit message somehow"

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    modpost: don't emit section mismatch warnings for compiler optimizations
    modpost: expand pattern matching to support substring matches
    modpost: do not try to match the SHT_NUL section.
    modpost: fix extable entry size calculation.
    modpost: fix inverted logic in is_extable_fault_address().
    modpost: handle -ffunction-sections
    modpost: Whitelist .text.fixup and .exception.text
    params: handle quotes properly for values not of form foo="bar".
    modpost: document the use of struct section_check.
    modpost: handle relocations mismatch in __ex_table.
    scripts: add check_extable.sh script.
    modpost: mismatch_handler: retrieve tosym information only when needed.
    modpost: factorize symbol pretty print in get_pretty_name().
    modpost: add handler function pointer to sectioncheck.
    modpost: add .sched.text and .kprobes.text to the TEXT_SECTIONS list.
    modpost: add strict white-listing when referencing sections.
    module: do not print allocation-fail warning on bogus user buffer size
    kernel/module.c: fix typos in message about unused symbols

    Linus Torvalds
     

22 Apr, 2015

7 commits

  • Currently an allyesconfig build [gcc-4.9.1] can generate the following:

    WARNING: vmlinux.o(.text.unlikely+0x3864): Section mismatch in
    reference from the function cpumask_empty.constprop.3() to the
    variable .init.data:nmi_ipi_mask

    which comes from the cpumask_empty usage in arch/x86/kernel/nmi_selftest.c.

    Normally we would not see a symbol entry for cpumask_empty since it is:

    static inline bool cpumask_empty(const struct cpumask *srcp)

    however in this case, the variant of the symbol gets emitted when GCC does
    constant propagation optimization.

    Fix things up so that any locally optimized constprop variants don't warn
    when accessing variables that live in the __init sections.

    Signed-off-by: Paul Gortmaker
    Signed-off-by: Rusty Russell

    Paul Gortmaker
     
  • Currently the match() function supports a leading * to match any
    prefix and a trailing * to match any suffix. However there currently
    is not a combination of both that can be used to target matches of
    whole families of functions that share a common substring.

    Here we expand the *foo and foo* match to also support *foo* with
    the goal of targeting compiler generated symbol names that contain
    strings like ".constprop." and ".isra."

    Signed-off-by: Paul Gortmaker
    Signed-off-by: Rusty Russell

    Paul Gortmaker
     
  • Trying to match the SHT_NUL section isn't useful and causes build failures
    on parisc and mn10300 since the addition of section strict white-listing
    and __ex_table sanitizing.

    Signed-off-by: Quentin Casasnovas
    Reported-by: Guenter Roeck
    Fixes: 050e57fd5936 ("modpost: add strict white-listing when referencing....")
    Fixes: 52dc0595d540 ("modpost: handle relocations mismatch in __ex_table.")
    Tested-by: Guenter Roeck
    Signed-off-by: Rusty Russell

    Quentin Casasnovas
     
  • As Guenter pointed out, we were never really calculating the extable entry
    size because the pointer arithmetic was simply wrong. We want to check
    we're handling the second relocation in __ex_table to infer an entry size,
    but we were using (void*) pointers instead of Elf_Rel[a]* ones.

    This fixes the problem by moving that check in the caller (since we can
    deal with different types of relocations) and add is_second_extable_reloc()
    to make the whole thing more readable.

    Signed-off-by: Quentin Casasnovas
    Reported-by: Guenter Roeck
    CC: Rusty Russell
    Signed-off-by: Rusty Russell

    Quentin Casasnovas
     
  • As Guenter pointed out, we want to assert that extable_entry_size has been
    discovered and not the other way around. Moreover, this sanity check is
    only valid when we're not dealing with the first relocation in __ex_table,
    since we have not discovered the extable entry size at that point.

    This was leading to a divide-by-zero on some architectures and make the
    build fail.

    Signed-off-by: Quentin Casasnovas
    Reported-by: Guenter Roeck
    CC: Rusty Russell
    Signed-off-by: Rusty Russell

    Quentin Casasnovas
     
  • 52dc0595d540 introduced OTHER_TEXT_SECTIONS for identifying what
    sections could validly have __ex_table entries. Unfortunately, it
    wasn't tested with -ffunction-sections, which some architectures
    use.

    Reported-by: kbuild test robot
    Cc: Quentin Casasnovas
    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • 32-bit and 64-bit ARM use these sections to store executable code, so
    they must be whitelisted in modpost's table of valid text sections.

    Signed-off-by: Thierry Reding
    Signed-off-by: Rusty Russell

    Thierry Reding
     

13 Apr, 2015

7 commits