13 Aug, 2010

2 commits

  • * 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (22 commits)
    param: don't deref arg in __same_type() checks
    param: update drivers/acpi/debug.c to new scheme
    param: use module_param in drivers/message/fusion/mptbase.c
    ide: use module_param_named rather than module_param_call
    param: update drivers/char/ipmi/ipmi_watchdog.c to new scheme
    param: lock if_sdio's lbs_helper_name and lbs_fw_name against sysfs changes.
    param: lock myri10ge_fw_name against sysfs changes.
    param: simple locking for sysfs-writable charp parameters
    param: remove unnecessary writable charp
    param: add kerneldoc to moduleparam.h
    param: locking for kernel parameters
    param: make param sections const.
    param: use free hook for charp (fix leak of charp parameters)
    param: add a free hook to kernel_param_ops.
    param: silence .init.text references from param ops
    Add param ops struct for hvc_iucv driver.
    nfs: update for module_param_named API change
    AppArmor: update for module_param_named API change
    param: use ops in struct kernel_param, rather than get and set fns directly
    param: move the EXPORT_SYMBOL to after the definitions.
    ...

    Linus Torvalds
     
  • Permit .GCC-command-line sections in modules. Otherwise modpost says things
    like:

    WARNING: drivers/mtd/chips/map_ram.o (.GCC-command-line): unexpected non-allocatable section.
    Did you forget to use "ax"/"aw" in a .S file?
    Note that for example contains
    section definitions for use in .S files.

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     

11 Aug, 2010

2 commits


10 Aug, 2010

1 commit

  • sec2annotation returns malloc'ed buffer directly to printf as an argument.
    Free this buffer after printing.

    Signed-off-by: Alexey Fomenko
    Cc: Trevor Keith
    Cc: Rusty Russell
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Fomenko
     

04 Aug, 2010

1 commit


03 Aug, 2010

1 commit

  • This patch makes modpost able to process object files with more than
    64k sections. Needed for huge kernel builds (allyesconfig, for example)
    with -ffunction-sections. 64k sections handling is covered, for example,
    by this document:

    "IA-64 gABI Proposal 74: Section Indexes"
    http://www.codesourcery.com/public/cxx-abi/abi/prop-74-sindex.html

    Signed-off-by: Denys Vlasenko
    Signed-off-by: Anders Kaseorg
    Acked-by: Sam Ravnborg
    Cc: Rusty Russell
    Cc: Andi Kleen
    Signed-off-by: Michal Marek

    Denys Vlasenko
     

08 Jul, 2010

1 commit


12 Jun, 2010

1 commit

  • Alan writes:

    > program: /home/alan/GitTrees/linux-2.6-mid-ref/scripts/mod/modpost -o
    > Module.symvers -S vmlinux.o
    >
    > Program received signal SIGSEGV, Segmentation fault.

    It just hit me.
    It's the offset calculation in reloc_location() which overflows:
    return (void *)elf->hdr + sechdrs[section].sh_offset +
    (r->r_offset - sechdrs[section].sh_addr);

    E.g. for the first rodata r entry:
    r->r_offset < sechdrs[section].sh_addr
    and the expression in the parenthesis produces 0xFFFFFFE0 or something
    equally wise.

    Reported-by: Alan
    Signed-off-by: Krzysztof Hałasa
    Tested-by: Alan
    Signed-off-by: Michal Marek

    Krzysztof Halasa
     

01 Jun, 2010

1 commit

  • * 'for-35' of git://repo.or.cz/linux-kbuild: (81 commits)
    kbuild: Revert part of e8d400a to resolve a conflict
    kbuild: Fix checking of scm-identifier variable
    gconfig: add support to show hidden options that have prompts
    menuconfig: add support to show hidden options which have prompts
    gconfig: remove show_debug option
    gconfig: remove dbg_print_ptype() and dbg_print_stype()
    kconfig: fix zconfdump()
    kconfig: some small fixes
    add random binaries to .gitignore
    kbuild: Include gen_initramfs_list.sh and the file list in the .d file
    kconfig: recalc symbol value before showing search results
    .gitignore: ignore *.lzo files
    headerdep: perlcritic warning
    scripts/Makefile.lib: Align the output of LZO
    kbuild: Generate modules.builtin in make modules_install
    Revert "kbuild: specify absolute paths for cscope"
    kbuild: Do not unnecessarily regenerate modules.builtin
    headers_install: use local file handles
    headers_check: fix perl warnings
    export_report: fix perl warnings
    ...

    Linus Torvalds
     

22 May, 2010

1 commit


19 May, 2010

2 commits

  • On Monday 23 November 2009 04:29:53 Rusty Russell wrote:
    > On Mon, 23 Nov 2009 07:31:57 am Ondrej Zary wrote:
    > > The problem is that
    > > scripts/mod/file2alias.c simply ignores isapnp.
    >
    > AFAICT it always has, and noone has complained until now. Perhaps
    > something was still reading /lib/modules/`uname -r`/modules.isapnpmap?

    The patch below works fine (at least with Debian). It needs your first
    patch that moves the definitions to mod_devicetable.h. Verified that
    aliases for these modules are generated correctly:

    drivers/media/radio/radio-sf16fmi.c
    drivers/net/ne.c
    drivers/net/3c515.c
    drivers/net/smc-ultra.c
    drivers/pcmcia/i82365.c
    drivers/scsi/aha1542.c
    drivers/scsi/aha152x.c
    drivers/scsi/sym53c416.c
    drivers/scsi/g_NCR5380.c

    Tested with RTL8019AS (ne), AVA-1505AE (aha152x) and dtc436e (g_NCR5380)
    cards - they now work automatically.

    Generate pnp:d aliases for isapnp_device_tables. This allows udev to load
    these modules automatically.

    Signed-off-by: Ondrej Zary
    Signed-off-by: Rusty Russell

    Ondrej Zary
     
  • Conflicts:
    include/linux/mod_devicetable.h
    scripts/mod/file2alias.c

    David S. Miller
     

18 May, 2010

1 commit


03 Apr, 2010

1 commit

  • We don't use the normal hotplug mechanism because it doesn't work. It will
    load the module some time after the device appears, but that's not good
    enough for us -- we need the driver loaded _immediately_ because otherwise
    the NIC driver may just abort and then the phy 'device' goes away.

    [bwh: s/phy/mdio/ in module alias, kerneldoc for struct mdio_device_id]

    Signed-off-by: David Woodhouse
    Signed-off-by: Ben Hutchings
    Acked-by: Andy Fleming
    Signed-off-by: David S. Miller

    David Woodhouse
     

31 Jan, 2010

4 commits


30 Jan, 2010

3 commits


18 Jan, 2010

1 commit

  • The sym_is() compares a symbol in an attempt to automatically skip symbol
    prefixes. It does this first by searching the real symbol with the normal
    unprefixed symbol. But then it uses the length of the original symbol to
    check the end of the substring instead of the length of the symbol it is
    looking for. On non-prefixed arches, this is effectively the same thing,
    so there is no problem. On prefixed-arches, since this is exceeds by just
    one byte, a crash is rare and it is usually a NUL byte anyways. But every
    once in a blue moon, you get the right page alignment and it segfaults.

    For example, on the Blackfin arch, sym_is() will be called with the real
    symbol "___mod_usb_device_table" as "symbol" when looking for the normal
    symbol "__mod_usb_device_table" as "name". The substring will thus return
    one byte into "symbol" and store it into "match". But then "match" will
    be indexed with the length of "symbol" instead of "name" and so we will
    exceed the storage. i.e. the code ends up doing:
    char foo[] = "abc"; return foo[strlen(foo)+1] == '\0';

    Signed-off-by: Mike Frysinger
    Signed-off-by: Rusty Russell
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     

17 Dec, 2009

1 commit

  • * 'for-33' of git://repo.or.cz/linux-kbuild: (29 commits)
    net: fix for utsrelease.h moving to generated
    gen_init_cpio: fixed fwrite warning
    kbuild: fix make clean after mismerge
    kbuild: generate modules.builtin
    genksyms: properly consider EXPORT_UNUSED_SYMBOL{,_GPL}()
    score: add asm/asm-offsets.h wrapper
    unifdef: update to upstream revision 1.190
    kbuild: specify absolute paths for cscope
    kbuild: create include/generated in silentoldconfig
    scripts/package: deb-pkg: use fakeroot if available
    scripts/package: add KBUILD_PKG_ROOTCMD variable
    scripts/package: tar-pkg: use tar --owner=root
    Kbuild: clean up marker
    net: add net_tstamp.h to headers_install
    kbuild: move utsrelease.h to include/generated
    kbuild: move autoconf.h to include/generated
    drop explicit include of autoconf.h
    kbuild: move compile.h to include/generated
    kbuild: drop include/asm
    kbuild: do not check for include/asm-$ARCH
    ...

    Fixed non-conflicting clean merge of modpost.c as per comments from
    Stephen Rothwell (modpost.c had grown an include of linux/autoconf.h
    that needed to be changed to generated/autoconf.h)

    Linus Torvalds
     

15 Dec, 2009

3 commits

  • memcmp() is wrong here, the symbol name can be shorter than KSYMTAB_PFX
    or CRC_PFX.

    Signed-off-by: Michal Marek
    Signed-off-by: Rusty Russell

    Michal Marek
     
  • Remove the unnecessary functions and variables.

    Signed-off-by: Wenji Huang
    Signed-off-by: Michal Marek
    Signed-off-by: Rusty Russell

    Wenji Huang
     
  • The next commit will require the use of MODULE_SYMBOL_PREFIX in
    .tmp_exports-asm.S. Currently it is mixed in with C structure
    definitions in "asm/module.h". Move the definition of this arch option
    into Kconfig, so it can be easily accessed by any code.

    This also lets modpost.c use the same definition. Previously modpost
    relied on a hardcoded list of architectures in mk_elfconfig.c.

    A build test for blackfin, one of the two MODULE_SYMBOL_PREFIX archs,
    showed the generated code was unchanged. vmlinux was identical save
    for build ids, and an apparently randomized suffix on a single "__key"
    symbol in the kallsyms data).

    Signed-off-by: Alan Jenkins
    Acked-by: Mike Frysinger (blackfin)
    CC: Sam Ravnborg
    Signed-off-by: Rusty Russell

    Alan Jenkins
     

12 Dec, 2009

2 commits

  • This patch fixes a bug when incrementing/decrementing on a BCD formatted
    integer (i.e. 0x09++ should be 0x10 not 0x0A). It just adds a function
    for incrementing/decrementing BCD integers by converting to decimal,
    doing the increment/decrement and then converting back to BCD.

    Signed-off-by: Nathaniel McCallum
    Signed-off-by: Greg Kroah-Hartman

    Nathaniel McCallum
     
  • The current code to generate usb modaliases from usb_device_id assumes
    that the device's bcdDevice descriptor will actually be in BCD format.
    While this should be a sane assumption, some devices don't follow spec
    and just use plain old hex. This causes drivers for these devices to
    generate invalid modalias lines which will never actually match for the
    hardware.

    The following patch adds hex support for bcdDevice in file2alias.c by
    detecting when a driver uses a hex formatted bcdDevice_(lo|hi) and
    adjusts the output to hex format accordingly.

    Drivers for devices which have bcdDevice conforming to BCD will have no
    change in modalias output. Drivers for devices which don't conform
    (i.e. ibmcam) should now generate valid modaliases.

    EXAMPLE OUTPUT (ibmcam; space added to highlight change)
    Old: usb:v0545p800D d030[10-9] dc*dsc*dp*ic*isc*ip*
    New: usb:v0545p800D d030a dc*dsc*dp*ic*isc*ip*

    Signed-off-by: Nathaniel McCallum
    Signed-off-by: Greg Kroah-Hartman

    Nathaniel McCallum
     

23 Sep, 2009

3 commits

  • This makes it consistent with other buses (platform, i2c, vio, ...). I'm
    not sure why we use the prefixes, but there must be a reason.

    This was easy enough to do it, and I did it.

    Signed-off-by: Anton Vorontsov
    Cc: David Brownell
    Cc: David Woodhouse
    Cc: Grant Likely
    Cc: Jean Delvare
    Cc: Ben Dooks
    Cc: Benjamin Herrenschmidt
    Cc: Dmitry Torokhov
    Cc: Samuel Ortiz
    Cc: "John W. Linville"
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • With this patch spi drivers can use standard spi_driver.id_table and
    MODULE_DEVICE_TABLE() mechanisms to bind against the devices. Just like
    we do with I2C drivers.

    This is useful when a single driver supports several variants of devices
    but it is not possible to detect them in run-time (like non-JEDEC chips
    probing in drivers/mtd/devices/m25p80.c), and when platform_data usage is
    overkill.

    This patch also makes life a lot easier on OpenFirmware platforms, since
    with OF we extensively use proper device IDs in modaliases.

    Signed-off-by: Anton Vorontsov
    Cc: David Brownell
    Cc: David Woodhouse
    Cc: Grant Likely
    Cc: Jean Delvare
    Cc: Ben Dooks
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • Signed-off-by: Trevor Keith
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Trevor Keith
     

21 Sep, 2009

1 commit


15 Jun, 2009

1 commit

  • * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (53 commits)
    .gitignore: ignore *.lzma files
    kbuild: add generic --set-str option to scripts/config
    kbuild: simplify argument loop in scripts/config
    kbuild: handle non-existing options in scripts/config
    kallsyms: generalize text region handling
    kallsyms: support kernel symbols in Blackfin on-chip memory
    documentation: make version fix
    kbuild: fix a compile warning
    gitignore: Add GNU GLOBAL files to top .gitignore
    kbuild: fix delay in setlocalversion on readonly source
    README: fix misleading pointer to the defconf directory
    vmlinux.lds.h update
    kernel-doc: cleanup perl script
    Improve vmlinux.lds.h support for arch specific linker scripts
    kbuild: fix headers_exports with boolean expression
    kbuild/headers_check: refine extern check
    kbuild: fix "Argument list too long" error for "make headers_check",
    ignore *.patch files
    Remove bashisms from scripts
    menu: fix embedded menu presentation
    ...

    Linus Torvalds
     

12 Jun, 2009

1 commit


10 Jun, 2009

2 commits

  • As requested by Guennadi Liakhovetski

    Cc: Guennadi Liakhovetski
    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • - add .init.rodata to INIT_DATA, and group all initconst flavors
    together
    - move strings generated from __setup_param() into .init.rodata
    - add .*init.rodata to modpost's sets of init sections
    - make modpost warn about references between meminit and cpuinit
    as well as memexit and cpuexit sections (as CPU and memory
    hotplug are independently selectable features)

    Signed-off-by: Jan Beulich
    Signed-off-by: Sam Ravnborg

    Jan Beulich
     

04 May, 2009

3 commits

  • mips emit the following debug sections:
    .mdebug* and .pdr

    They were included in the check for non-allocatable section
    and caused modpost to warn.

    Manuel Lauss suggested to fix this by adding the relevant
    sections to the list of sections we do not check.

    Signed-off-by: Sam Ravnborg
    Reported-by: Manuel Lauss

    Sam Ravnborg
     
  • Jean reported that he saw one warning for each module like the one below:
    WARNING: arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.o (.comment.SUSE.OPTs): unexpected non-allocatable section.

    The warning appeared with the improved version of the
    check of the flags in the sections.

    That check already ignored sections named ".comment" - but SUSE store
    additional info in the comment section and has named it in a SUSE
    specific way. Therefore modpost failed to ignore the section.

    The fix is to extend the pattern so we ignore all sections
    that start with the name ".comment.".

    Signed-off-by: Sam Ravnborg
    Reported-by: Jean Delvare
    Tested-by: Jean Delvare

    Sam Ravnborg
     
  • The missing TO_NATIVE(sechdrs[i].sh_flags) was causing many
    unexpected non-allocatable section warnings when cross-compiling
    for an architecture with a different endianness.

    Fix endianness of all the fields in the ELF header and
    section headers, not just some of them so we are not
    hit by this anohter time.

    Signed-off-by: Anders Kaseorg
    Reported-by: Sean MacLennan
    Tested-by: Sean MacLennan
    Signed-off-by: Sam Ravnborg

    Anders Kaseorg