07 Apr, 2014

1 commit

  • Pull module updates from Rusty Russell:
    "Nothing major: the stricter permissions checking for sysfs broke a
    staging driver; fix included. Greg KH said he'd take the patch but
    hadn't as the merge window opened, so it's included here to avoid
    breaking build"

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    staging: fix up speakup kobject mode
    Use 'E' instead of 'X' for unsigned module taint flag.
    VERIFY_OCTAL_PERMISSIONS: stricter checking for sysfs perms.
    kallsyms: fix percpu vars on x86-64 with relocation.
    kallsyms: generalize address range checking
    module: LLVMLinux: Remove unused function warning from __param_check macro
    Fix: module signature vs tracepoints: add new TAINT_UNSIGNED_MODULE
    module: remove MODULE_GENERIC_TABLE
    module: allow multiple calls to MODULE_DEVICE_TABLE() per module
    module: use pr_cont

    Linus Torvalds
     

02 Apr, 2014

1 commit

  • Pull driver core and sysfs updates from Greg KH:
    "Here's the big driver core / sysfs update for 3.15-rc1.

    Lots of kernfs updates to make it useful for other subsystems, and a
    few other tiny driver core patches.

    All have been in linux-next for a while"

    * tag 'driver-core-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (42 commits)
    Revert "sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()"
    kernfs: cache atomic_write_len in kernfs_open_file
    numa: fix NULL pointer access and memory leak in unregister_one_node()
    Revert "driver core: synchronize device shutdown"
    kernfs: fix off by one error.
    kernfs: remove duplicate dir.c at the top dir
    x86: align x86 arch with generic CPU modalias handling
    cpu: add generic support for CPU feature based module autoloading
    sysfs: create bin_attributes under the requested group
    driver core: unexport static function create_syslog_header
    firmware: use power efficient workqueue for unloading and aborting fw load
    firmware: give a protection when map page failed
    firmware: google memconsole driver fixes
    firmware: fix google/gsmi duplicate efivars_sysfs_init()
    drivers/base: delete non-required instances of include
    kernfs: fix kernfs_node_from_dentry()
    ACPI / platform: drop redundant ACPI_HANDLE check
    kernfs: fix hash calculation in kernfs_rename_ns()
    kernfs: add CONFIG_KERNFS
    sysfs, kobject: add sysfs wrapper for kernfs_enable_ns()
    ...

    Linus Torvalds
     

01 Apr, 2014

1 commit

  • Pull x86 LTO changes from Peter Anvin:
    "More infrastructure work in preparation for link-time optimization
    (LTO). Most of these changes is to make sure symbols accessed from
    assembly code are properly marked as visible so the linker doesn't
    remove them.

    My understanding is that the changes to support LTO are still not
    upstream in binutils, but are on the way there. This patchset should
    conclude the x86-specific changes, and remaining patches to actually
    enable LTO will be fed through the Kbuild tree (other than keeping up
    with changes to the x86 code base, of course), although not
    necessarily in this merge window"

    * 'x86-asmlinkage-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
    Kbuild, lto: Handle basic LTO in modpost
    Kbuild, lto: Disable LTO for asm-offsets.c
    Kbuild, lto: Add a gcc-ld script to let run gcc as ld
    Kbuild, lto: add ld-version and ld-ifversion macros
    Kbuild, lto: Drop .number postfixes in modpost
    Kbuild, lto, workaround: Don't warn for initcall_reference in modpost
    lto: Disable LTO for sys_ni
    lto: Handle LTO common symbols in module loader
    lto, workaround: Add workaround for initcall reordering
    lto: Make asmlinkage __visible
    x86, lto: Disable LTO for the x86 VDSO
    initconst, x86: Fix initconst mistake in ts5500 code
    initconst: Fix initconst mistake in dcdbas
    asmlinkage: Make trace_hardirqs_on/off_caller visible
    asmlinkage, x86: Fix 32bit memcpy for LTO
    asmlinkage Make __stack_chk_failed and memcmp visible
    asmlinkage: Mark rwsem functions that can be called from assembler asmlinkage
    asmlinkage: Make main_extable_sort_needed visible
    asmlinkage, mutex: Mark __visible
    asmlinkage: Make trace_hardirq visible
    ...

    Linus Torvalds
     

13 Mar, 2014

1 commit

  • Commit 78551277e4df5: "Input: i8042 - add PNP modaliases" had a bug, where the
    second call to MODULE_DEVICE_TABLE() overrode the first resulting in not all
    the modaliases being exposed.

    This fixes the problem by including the name of the device_id table in the
    __mod_*_device_table alias, allowing us to export several device_id tables
    per module.

    Suggested-by: Kay Sievers
    Acked-by: Greg Kroah-Hartman
    Cc: Dmitry Torokhov
    Signed-off-by: Tom Gundersen
    Signed-off-by: Rusty Russell

    Tom Gundersen
     

08 Mar, 2014

1 commit

  • Pull ARM fixes from Russell King:
    "A number of ARM updates for -rc, covering mostly ARM specific code,
    but with one change to modpost.c to allow Thumb section mismatches to
    be detected.

    ARM changes include reporting when an attempt is made to boot a LPAE
    kernel on hardware which does not support LPAE, rather than just being
    silent about it.

    A number of other minor fixes are included too"

    * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
    ARM: 7992/1: boot: compressed: ignore bswapsdi2.S
    ARM: 7991/1: sa1100: fix compile problem on Collie
    ARM: fix noMMU kallsyms symbol filtering
    ARM: 7980/1: kernel: improve error message when LPAE config doesn't match CPU
    ARM: 7964/1: Detect section mismatches in thumb relocations
    ARM: 7963/1: mm: report both sections from PMD

    Linus Torvalds
     

19 Feb, 2014

3 commits

  • The x86 CPU feature modalias handling existed before it was reimplemented
    generically. This patch aligns the x86 handling so that it
    (a) reuses some more code that is now generic;
    (b) uses the generic format for the modalias module metadata entry, i.e., it
    now uses 'cpu:type:x86,venVVVVfamFFFFmodMMMM:feature:,XXXX,YYYY' instead of
    the 'x86cpu:vendor:VVVV:family:FFFF:model:MMMM:feature:,XXXX,YYYY' that was
    used before.

    Signed-off-by: Ard Biesheuvel
    Acked-by: H. Peter Anvin
    Signed-off-by: Greg Kroah-Hartman

    Ard Biesheuvel
     
  • This patch adds support for advertising optional CPU features over udev
    using the modalias, and for declaring compatibility with/dependency upon
    such a feature in a module.

    The mapping between feature numbers and actual features should be provided
    by the architecture in a file called which exports the
    following functions/macros:
    - cpu_feature(FEAT), a preprocessor macro that maps token FEAT to a
    numeric index;
    - bool cpu_have_feature(n), returning whether this CPU has support for
    feature #n;
    - MAX_CPU_FEATURES, an upper bound for 'n' in the previous function.

    The feature can then be enabled by setting CONFIG_GENERIC_CPU_AUTOPROBE
    for the architecture.

    For instance, a module that registers its module init function using

    module_cpu_feature_match(FEAT_X, module_init_function)

    will be probed automatically when the CPU's support for the 'FEAT_X'
    feature is advertised over udev, and will only allow the module to be
    loaded by hand if the 'FEAT_X' feature is supported.

    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Greg Kroah-Hartman

    Ard Biesheuvel
     
  • Add processing for normally encountered thumb relocation types so that
    section mismatches will be detected.

    Comment from Rusty Russell follows:

    Happiest for this to go through an ARM tree, so:

    Signed-off-by: David A. Long
    Acked-by: Rusty Russell
    Signed-off-by: Russell King

    David A. Long
     

14 Feb, 2014

3 commits

  • - Don't warn about LTO marker symbols. modpost runs before
    the linker, so the module is not necessarily LTOed yet.
    - Don't complain about .gnu.lto* sections

    Signed-off-by: Andi Kleen
    Link: http://lkml.kernel.org/r/1391846481-31491-13-git-send-email-ak@linux.intel.com
    Signed-off-by: H. Peter Anvin

    Andi Kleen
     
  • LTO turns all global symbols effectively into statics. This
    has the side effect that they all have a .NUMBER postfix to make
    them unique. In modpost drop this postfix because it confuses
    it.

    Signed-off-by: Andi Kleen
    Link: http://lkml.kernel.org/r/1391846481-31491-8-git-send-email-ak@linux.intel.com
    Signed-off-by: H. Peter Anvin

    Andi Kleen
     
  • This reference is discarded, but can cause warnings when it refers to
    exit. Ignore for now.

    This is a workaround and can be removed once we get rid of
    -fno-toplevel-reorder

    Signed-off-by: Andi Kleen
    Link: http://lkml.kernel.org/r/1391846481-31491-7-git-send-email-ak@linux.intel.com
    Signed-off-by: H. Peter Anvin

    Andi Kleen
     

08 Feb, 2014

1 commit

  • Commit afe2dab4f6 ("USB: add hex/bcd detection to usb modalias generation")
    changed the routine that generates alias ranges. Before that change, only
    digits 0-9 were supported; the commit tried to fix the case when the range
    includes higher values than 0x9.

    Unfortunately, the commit didn't fix the case when the range includes both
    0x9 and 0xA, meaning that the final range must look like [x-9A-y] where
    x = 0xA -- instead the [x-9A-x] range was produced.

    Modprobe doesn't complain as it sees no difference between no-match and
    bad-pattern results of fnmatch().

    Fixing this simple bug to fix the aliases.
    Also changing the hardcoded beginning of the range to uppercase as all the
    other letters are also uppercase in the device version numbers.

    Fortunately, this affects only the dvb-usb-dib0700 module, AFAIK.

    Signed-off-by: Jan Moskyto Matejka
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Jan Moskyto Matejka
     

15 Jan, 2014

1 commit


16 Nov, 2013

1 commit

  • Pull kbuild changes from Michal Marek:
    - LTO fixes, but the kallsyms part had to be reverted
    - Pass -Werror=implicit-int and -Werror=strict-prototypes to the
    compiler by default
    - snprintf fix in modpost
    - remove GREP_OPTIONS from the environment to be immune against exotic
    grep option settings

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kallsyms: Revert back to 128 max symbol length
    Kbuild: Ignore GREP_OPTIONS env variable
    scripts: kallsyms: Use %zu to print 'size_t'
    scripts/bloat-o-meter: use .startswith rather than fragile slicing
    scripts/bloat-o-meter: ignore changes in the size of linux_banner
    kbuild: replace unbounded sprintf call in modpost
    kbuild, bloat-o-meter: fix static detection
    Kbuild: Handle longer symbols in kallsyms.c
    kbuild: Increase kallsyms max symbol length
    Makefile: enable -Werror=implicit-int and -Werror=strict-prototypes by default

    Linus Torvalds
     

15 Nov, 2013

1 commit

  • Pull module updates from Rusty Russell:
    "Mainly boring here, too. rmmod --wait finally removed, though"

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    modpost: fix bogus 'exported twice' warnings.
    init: fix in-place parameter modification regression
    asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visible
    kernel: add support for init_array constructors
    modpost: Optionally ignore secondary errors seen if a single module build fails
    module: remove rmmod --wait option.

    Linus Torvalds
     

13 Nov, 2013

1 commit

  • For some reason I managed to trick gcc into create CRC symbols that are
    not absolute anymore, but weak.

    Make modpost handle this case.

    Signed-off-by: Andi Kleen
    Cc: Al Viro
    Cc: Geert Uytterhoeven
    Cc: Tetsuo Handa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

07 Nov, 2013

2 commits

  • Andi's change in e0f244c63fc9 ("asmlinkage, module: Make ksymtab and
    kcrctab symbols and __this_module __visible") make the crc appear
    first in the symbol table.

    modpost creates an entry when it sees the CRC, then when it sees the
    actual symbol, it complains that it's seen it before. The preloaded
    flag already exists for the equivalent case where we loaded from
    Module.symvers, so use that.

    Reported-by: Stephen Rothwell
    Tested-by: The Awesome Power Of linux-next
    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • The modpost tool could overflow its stack buffer if someone was running
    with an insane shell environment. Regardless, it's technically a bug,
    so this fixes it to truncate the string instead of seg-faulting.

    Found by Coverity.

    Signed-off-by: Kees Cook
    Signed-off-by: Michal Marek

    Kees Cook
     

29 Oct, 2013

1 commit


23 Sep, 2013

1 commit

  • Commit ea4054a23 (modpost: handle huge numbers of modules) added
    support for building a large number of modules.

    Unfortunately, the commit changed the semantics of the makefile: Instead of
    passing only existing object files to modpost, make now passes all expected
    object files. If make was started with option -i, this results in a modpost
    error if a single file failed to build.

    Example with the current btrfs build falure on m68k:

    fs/btrfs/btrfs.o: No such file or directory
    make[1]: [__modpost] Error 1 (ignored)

    This error is followed by lots of errors such as:

    m68k-linux-gcc: error: arch/m68k/emu/nfcon.mod.c: No such file or directory
    m68k-linux-gcc: fatal error: no input files
    compilation terminated.
    make[1]: [arch/m68k/emu/nfcon.mod.o] Error 1 (ignored)

    This doesn't matter much for normal builds, but it is annoying for builds
    started with "make -i" due to the large number of secondary errors.
    Those errors unnececessarily clog any error log and make it difficult
    to find the real errors in the build.

    Fix the problem by adding a new parameter '-n' to modpost. If this parameter
    is specified, modpost reports but ignores missing object files.

    With this patch, error output from above problem is (with make -i):

    m68k-linux-ld: cannot find fs/btrfs/ioctl.o: No such file or directory
    make[2]: [fs/btrfs/btrfs.o] Error 1 (ignored)
    ...
    fs/btrfs/btrfs.o: No such file or directory (ignored)

    Cc: Rusty Russell
    Cc: Michael Marek
    Signed-off-by: Guenter Roeck
    Signed-off-by: Rusty Russell

    Guenter Roeck
     

20 Aug, 2013

1 commit


11 Jul, 2013

1 commit

  • Pull kbuild updates from Michal Marek:
    - fix for make headers_install argv explosion with too long path
    - scripts/setlocalversion does not call git update-index needlessly
    - fix for the src.rpm produced by make rpm-pkg. The new make
    image_name can be useful also for other packaging tools.
    - scripts/mod/devicetable-offsets.o is not rebuilt during each make run
    - make modules_install dependency fix
    - scripts/sortextable portability fix
    - fix for kbuild to generate the output directory for all object files
    in subdirs.
    - a couple of minor fixes

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kbuild: create directory for dir/file.o
    tools/include: use stdint types for user-space byteshift headers
    Makefile: Fix install error with make -j option
    Fix a build warning in scripts/mod/file2alias.c
    improve modalias building
    scripts/mod: Spelling s/DEVICEVTABLE/DEVICETABLE/
    kbuild: fix error when building from src rpm
    scripts/setlocalversion on write-protected source tree
    Makefile.lib: align DTB quiet_cmd
    kbuild: fix make headers_install when path is too long

    Linus Torvalds
     

08 Jul, 2013

1 commit

  • Pull first stage of __cpuinit removal from Paul Gortmaker:
    "The two commits here 1) dummy out all the __cpuinit macros so that we
    no longer generate such sections, and then 2) remove all the section
    processing that we used to do for those sections.

    This makes all the __cpuinit and friends no-ops, so that we can remove
    the use cases of it at our leisure. Expect stage 2, which does the
    tree wide removal sweep at the end of the merge window."

    * 'cpuinit-delete' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
    modpost: remove all traces of cpuinit/cpuexit sections
    init.h: remove __cpuinit sections from the kernel

    Linus Torvalds
     

04 Jul, 2013

2 commits

  • Merge first patch-bomb from Andrew Morton:
    - various misc bits
    - I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been
    distracted. There has been quite a bit of activity.
    - About half the MM queue
    - Some backlight bits
    - Various lib/ updates
    - checkpatch updates
    - zillions more little rtc patches
    - ptrace
    - signals
    - exec
    - procfs
    - rapidio
    - nbd
    - aoe
    - pps
    - memstick
    - tools/testing/selftests updates

    * emailed patches from Andrew Morton : (445 commits)
    tools/testing/selftests: don't assume the x bit is set on scripts
    selftests: add .gitignore for kcmp
    selftests: fix clean target in kcmp Makefile
    selftests: add .gitignore for vm
    selftests: add hugetlbfstest
    self-test: fix make clean
    selftests: exit 1 on failure
    kernel/resource.c: remove the unneeded assignment in function __find_resource
    aio: fix wrong comment in aio_complete()
    drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode
    drivers/memstick/host/r592.c: convert to module_pci_driver
    drivers/memstick/host/jmb38x_ms: convert to module_pci_driver
    pps-gpio: add device-tree binding and support
    drivers/pps/clients/pps-gpio.c: convert to module_platform_driver
    drivers/pps/clients/pps-gpio.c: convert to devm_* helpers
    drivers/parport/share.c: use kzalloc
    Documentation/accounting/getdelays.c: avoid strncpy in accounting tool
    aoe: update internal version number to v83
    aoe: update copyright date
    aoe: perform I/O completions in parallel
    ...

    Linus Torvalds
     
  • Add RapidIO-specific modalias generation to enable udev notifications
    about RapidIO-specific events.

    The RapidIO modalias string format is shown below:

    "rapidio:vNNNNdNNNNavNNNNadNNNN"

    Where:
    v - Device Vendor ID (16 bit),
    d - Device ID (16 bit),
    av - Assembly Vendor ID (16 bit),
    ad - Assembly ID (16 bit),

    as they are reported in corresponding Capability Registers (CARs)
    of each RapidIO device.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Cc: Andre van Herk
    Cc: Micha Nelissen
    Cc: Stef van Os
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     

03 Jul, 2013

1 commit

  • On some systems, __used is already defined in sys/cdefs.h and causes
    a build warning:

    scripts/mod/file2alias.c:85:1: warning: "__used" redefined
    In file included from /usr/include/stdio.h:64,
    from scripts/mod/modpost.h:1,
    from scripts/mod/file2alias.c:13:
    /usr/include/sys/cdefs.h:146:1: warning: this is the location of the previous definition

    This adds an extra check before defining the __used macro to see if
    the macro was already defined elsewhere.

    Signed-off-by: Daniel Tang
    Signed-off-by: Michal Marek

    Daniel Tang
     

28 Jun, 2013

2 commits


27 Jun, 2013

1 commit

  • Delete all audit rules that were checking how the .cpuXYZ
    related sections were inter-operating with other __init
    like sections, now that __cpuinit is gone. Update the linker
    script to not have any knowledge of .cpuinit sections.

    [lds.h update courtesy of Ralf Baechle ]

    Cc: Arnd Bergmann
    Cc: Rusty Russell
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

20 May, 2013

1 commit

  • gcc's places cold functions into the .text.unlikely section and we
    need to check this section as well for section mismatches otherwise we
    may have false negatives for this test.

    Cc: Rusty Russell
    Cc: Greg Kroah-Hartman
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-kbuild@vger.kernel.org
    Signed-off-by: Tom Rini
    Signed-off-by: Rusty Russell (wording update)

    Tom Rini
     

07 May, 2013

2 commits

  • Pull kbuild changes from Michal Marek:
    "Kbuild commits for v3.10-rc1:

    - Fix make mrproper after mod/file2alias rework
    - Fix ld-option Makefile function
    - Rewrite headers_install to shell to drop Perl dependency.

    There are some more patches I have to look at, so I might send another
    pull request later. Or just queue them for 3.11."

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    Fix cleaning in scripts/mod
    headers_install.pl: convert to headers_install.sh
    kbuild: fix ld-option function

    Linus Torvalds
     
  • Make sure devicetable-offsets.h is cleaned in the scripts/mod directory

    Signed-off-by: Andreas Schwab
    Tested-by: Geert Uytterhoeven
    Signed-off-by: Michal Marek

    Andreas Schwab
     

06 May, 2013

1 commit

  • Pull mudule updates from Rusty Russell:
    "We get rid of the general module prefix confusion with a binary config
    option, fix a remove/insert race which Never Happens, and (my
    favorite) handle the case when we have too many modules for a single
    commandline. Seriously, the kernel is full, please go away!"

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    modpost: fix unwanted VMLINUX_SYMBOL_STR expansion
    X.509: Support parse long form of length octets in Authority Key Identifier
    module: don't unlink the module until we've removed all exposure.
    kernel: kallsyms: memory override issue, need check destination buffer length
    MODSIGN: do not send garbage to stderr when enabling modules signature
    modpost: handle huge numbers of modules.
    modpost: add -T option to read module names from file/stdin.
    modpost: minor cleanup.
    genksyms: pass symbol-prefix instead of arch
    module: fix symbol versioning with symbol prefixes
    CONFIG_SYMBOL_PREFIX: cleanup.

    Linus Torvalds
     

29 Apr, 2013

1 commit

  • Commit a4b6a77b77ba4f526392612c2365797fab956014 ("module: fix symbol
    versioning with symbol prefixes") broke the MODVERSIONS loading of any
    module using memcmp (e.g. ipv6) on x86_32, as it's defined to
    __builtin_memcmp which is expanded by VMLINUX_SYMBOL_STR. Use
    __VMLINUX_SYMBOL_STR instead which doesn't expand the argument.

    Reported-by: Tetsuo Handa
    Reported-by: Andy Shevchenko
    Signed-off-by: James Hogan
    Cc: H. Peter Anvin
    Tested-by: Tetsuo Handa
    Tested-by: Andy Shevchenko
    Signed-off-by: Rusty Russell
    Cc: # 3.9

    James Hogan
     

05 Apr, 2013

2 commits


29 Mar, 2013

1 commit

  • mei client bus will present some of the mei clients
    as devices for other standard subsystems

    Implement the probe, remove, match, device addtion routines, along with
    the sysfs and uevent ones. mei_cl_device_id is also added to
    mod_devicetable.h
    A mei-cleint-bus.txt document describing the rationale and the API usage
    is also added while ABI/testing/sysfs-bus-mei describeis the modalias ABI.

    Signed-off-by: Samuel Ortiz
    Signed-off-by: Tomas Winkler
    Signed-off-by: Greg Kroah-Hartman

    Samuel Ortiz
     

20 Mar, 2013

1 commit

  • Fix symbol versioning on architectures with symbol prefixes. Although
    the build was free from warnings the actual modules still wouldn't load
    as the ____versions table contained unprefixed symbol names, which were
    being compared against the prefixed symbol names when checking the
    symbol versions.

    This is fixed by modifying modpost to add the symbol prefix to the
    ____versions table it outputs (Modules.symvers still contains unprefixed
    symbol names). The check_modstruct_version() function is also fixed as
    it checks the version of the unprefixed "module_layout" symbol which
    would no longer work.

    Signed-off-by: James Hogan
    Cc: Michal Marek
    Cc: Sam Ravnborg
    Cc: Greg Kroah-Hartman
    Cc: Jonathan Kliegman
    Signed-off-by: Rusty Russell (use VMLINUX_SYMBOL_STR)

    James Hogan
     

15 Mar, 2013

1 commit

  • We have CONFIG_SYMBOL_PREFIX, which three archs define to the string
    "_". But Al Viro broke this in "consolidate cond_syscall and
    SYSCALL_ALIAS declarations" (in linux-next), and he's not the first to
    do so.

    Using CONFIG_SYMBOL_PREFIX is awkward, since we usually just want to
    prefix it so something. So various places define helpers which are
    defined to nothing if CONFIG_SYMBOL_PREFIX isn't set:

    1) include/asm-generic/unistd.h defines __SYMBOL_PREFIX.
    2) include/asm-generic/vmlinux.lds.h defines VMLINUX_SYMBOL(sym)
    3) include/linux/export.h defines MODULE_SYMBOL_PREFIX.
    4) include/linux/kernel.h defines SYMBOL_PREFIX (which differs from #7)
    5) kernel/modsign_certificate.S defines ASM_SYMBOL(sym)
    6) scripts/modpost.c defines MODULE_SYMBOL_PREFIX
    7) scripts/Makefile.lib defines SYMBOL_PREFIX on the commandline if
    CONFIG_SYMBOL_PREFIX is set, so that we have a non-string version
    for pasting.

    (arch/h8300/include/asm/linkage.h defines SYMBOL_NAME(), too).

    Let's solve this properly:
    1) No more generic prefix, just CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX.
    2) Make linux/export.h usable from asm.
    3) Define VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR().
    4) Make everyone use them.

    Signed-off-by: Rusty Russell
    Reviewed-by: James Hogan
    Tested-by: James Hogan (metag)

    Rusty Russell
     

28 Feb, 2013

1 commit

  • Pull kbuild changes from Michal Marek:

    - Alias generation in modpost is cross-compile safe.

    - kernel/timeconst.h is now generated using a bc script instead of
    perl.

    - scripts/link-vmlinux.sh now works with an alternative
    $KCONFIG_CONFIG.

    - destination-y for exported headers is supported in Kbuild files
    again.

    - depmod is called with -P $CONFIG_SYMBOL_PREFIX on architectures that
    need it.

    - CONFIG_DEBUG_INFO_REDUCED disables var-tracking

    - scripts/setlocalversion works with too much translated locales ;)

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kbuild: Fix reading of .config in link-vmlinux.sh
    kbuild: Unset language specific variables in setlocalversion script
    Kbuild: Disable var tracking with CONFIG_DEBUG_INFO_REDUCED
    depmod: pass -P $CONFIG_SYMBOL_PREFIX
    kbuild: Fix destination-y for installed headers
    scripts/link-vmlinux.sh: source variables from KCONFIG_CONFIG
    kernel: Replace timeconst.pl with a bc script
    mod/file2alias: make modalias generation safe for cross compiling

    Linus Torvalds