- 13 4月, 2015 2 次提交
-
-
由 Quentin Casasnovas 提交于
sched.text and .kprobes.text should behave exactly like .text with regards to how we should warn about referencing sections which might get discarded at runtime. Signed-off-by: NQuentin Casasnovas <quentin.casasnovas@oracle.com> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
由 Quentin Casasnovas 提交于
Prints a warning when a section references a section outside a strict white-list. This will be useful to print a warning if __ex_table references a non-executable section. Signed-off-by: NQuentin Casasnovas <quentin.casasnovas@oracle.com> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 03 10月, 2014 1 次提交
-
-
由 Kyle McMartin 提交于
Similar to ARM, AArch64 is generating $x and $d syms... which isn't terribly helpful when looking at %pF output and the like. Filter those out in kallsyms, modpost and when looking at module symbols. Seems simplest since none of these check EM_ARM anyway, to just add it to the strchr used, rather than trying to make things overly complicated. initcall_debug improves: dmesg_before.txt: initcall $x+0x0/0x154 [sg] returned 0 after 26331 usecs dmesg_after.txt: initcall init_sg+0x0/0x154 [sg] returned 0 after 15461 usecs Signed-off-by: NKyle McMartin <kyle@redhat.com> Acked-by: NRusty Russell <rusty@rustcorp.com.au> Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
-
- 27 8月, 2014 2 次提交
-
-
由 Mathias Krause 提交于
Avoid the variable length array (vla), just use PATH_MAX instead. This not only makes this code clang friedly, it also leads to a code size reduction: text data bss dec hex filename 51765 2224 12416 66405 10365 scripts/mod/modpost.old 51677 2224 12416 66317 1030d scripts/mod/modpost.new Signed-off-by: NMathias Krause <minipli@googlemail.com> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
由 Mathias Krause 提交于
Internally used symbols of modpost don't need to be externally visible; make them static. Also constify the string arrays so they resist in the r/o section instead of being runtime writable. Those changes lead to a small size reduction as can be seen below: text data bss dec hex filename 51381 2640 12416 66437 10385 scripts/mod/modpost.old 51765 2224 12416 66405 10365 scripts/mod/modpost.new Signed-off-by: NMathias Krause <minipli@googlemail.com> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 27 7月, 2014 2 次提交
-
-
由 Rasmus Villemoes 提交于
For several years, the pattern "foo$" has effectively been treated as equivalent to "foo" due to a bug in the (misnamed) helper number_prefix(). This hasn't been observed to cause any problems, so remove the broken $ functionality and change all foo$ patterns to foo. Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
由 Michal Nazarewicz 提交于
The scripts/mod/modpost.c triggers the following warning: scripts/mod/modpost.c: In function ‘remove_dot’: scripts/mod/modpost.c:1710:10: warning: ignoring return value of ‘strtoul’, declared with attribute warn_unused_result [-Wunused-result] The remove_dot function that calls strtoul does not care about the numeric value of the string that is parsed but only looks for the end of the numeric sequence. As such, it's equivalent to just skip over all digits. Signed-off-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 10 6月, 2014 1 次提交
-
-
由 Masahiro Yamada 提交于
Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
- 05 5月, 2014 1 次提交
-
-
由 Paul Bolle 提交于
Signed-off-by: NPaul Bolle <pebolle@tiscali.nl> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 28 4月, 2014 1 次提交
-
-
由 Christian Engelmayer 提交于
Function read_dump() memory maps the input via grab_file(), but fails to call the corresponding unmap function. Add the missing call to release_file(). Detected by Coverity: CID 1192419 Signed-off-by: NChristian Engelmayer <cengelma@gmx.at> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 19 2月, 2014 1 次提交
-
-
由 David A. Long 提交于
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: NDavid A. Long <dave.long@linaro.org> Acked-by: NRusty Russell <rusty@rustcorp.com.au> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 14 2月, 2014 3 次提交
-
-
由 Andi Kleen 提交于
- 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: NAndi Kleen <ak@linux.intel.com> Link: http://lkml.kernel.org/r/1391846481-31491-13-git-send-email-ak@linux.intel.comSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
-
由 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: NAndi Kleen <ak@linux.intel.com> Link: http://lkml.kernel.org/r/1391846481-31491-8-git-send-email-ak@linux.intel.comSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
-
由 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: NAndi Kleen <ak@linux.intel.com> Link: http://lkml.kernel.org/r/1391846481-31491-7-git-send-email-ak@linux.intel.comSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
-
- 15 1月, 2014 1 次提交
-
-
由 Andreas Schwab 提交于
GCC 4.8 now generates out-of-line vr save/restore functions when optimizing for size. They are needed for the raid6 altivec support. Signed-off-by: NAndreas Schwab <schwab@linux-m68k.org> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 13 11月, 2013 1 次提交
-
-
由 Andi Kleen 提交于
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: NAndi Kleen <ak@linux.intel.com> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 07 11月, 2013 1 次提交
-
-
由 Rusty Russell 提交于
Andi's change in e0f244c6 ("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: NStephen Rothwell <sfr@canb.auug.org.au> Tested-by: The Awesome Power Of linux-next Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 29 10月, 2013 1 次提交
-
-
由 Andi Kleen 提交于
Make the ksymtab symbols for EXPORT_SYMBOL visible. This prevents the LTO compiler from adding a .NUMBER prefix, which avoids various problems in later export processing. Cc: rusty@rustcorp.com.au Signed-off-by: NAndi Kleen <ak@linux.intel.com> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 23 9月, 2013 1 次提交
-
-
由 Guenter Roeck 提交于
Commit ea4054a2 (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 <rusty@rustcorp.com.au> Cc: Michael Marek <mmarek@suse.cz> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 20 8月, 2013 1 次提交
-
-
由 Chen Gang 提交于
Need permit '.cranges' section for sh64 architecture, or modpost will report warning: LD init/built-in.o WARNING: init/built-in.o (.cranges): unexpected non-allocatable section. Did you forget to use "ax"/"aw" in a .S file? Note that for example <linux/init.h> contains section definitions for use in .S files. Signed-off-by: NChen Gang <gang.chen@asianux.com> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 27 6月, 2013 1 次提交
-
-
由 Paul Gortmaker 提交于
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 <ralf@linux-mips.org>] Cc: Arnd Bergmann <arnd@arndb.de> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
- 20 5月, 2013 1 次提交
-
-
由 Tom Rini 提交于
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 <rusty@rustcorp.com.au> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-kernel@vger.kernel.org Cc: linux-kbuild@vger.kernel.org Signed-off-by: NTom Rini <trini@ti.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (wording update)
-
- 29 4月, 2013 1 次提交
-
-
由 James Hogan 提交于
Commit a4b6a77b ("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: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Reported-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NJames Hogan <james.hogan@imgtec.com> Cc: H. Peter Anvin <hpa@zytor.com> Tested-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Tested-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au> Cc: <stable@vger.kernel.org> # 3.9
-
- 05 4月, 2013 2 次提交
-
-
由 Rusty Russell 提交于
Because there are too many modules in the world. Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
由 Rusty Russell 提交于
We want a strends() function next, so make one and use it appropriately, making new_module() arg const while we're at it. Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 20 3月, 2013 1 次提交
-
-
由 James Hogan 提交于
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: NJames Hogan <james.hogan@imgtec.com> Cc: Michal Marek <mmarek@suse.cz> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jonathan Kliegman <kliegs@chromium.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (use VMLINUX_SYMBOL_STR)
-
- 15 3月, 2013 1 次提交
-
-
由 Rusty Russell 提交于
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: NRusty Russell <rusty@rustcorp.com.au> Reviewed-by: NJames Hogan <james.hogan@imgtec.com> Tested-by: James Hogan <james.hogan@imgtec.com> (metag)
-
- 25 1月, 2013 1 次提交
-
-
由 Andreas Schwab 提交于
Use the target compiler to compute the offsets for the fields of the device_id structures, so that it won't be broken by different alignments between the host and target ABIs. This also fixes missing endian corrections for some modaliases. Signed-off-by: NAndreas Schwab <schwab@linux-m68k.org> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
- 21 1月, 2013 1 次提交
-
-
由 Vineet Gupta 提交于
ARC relocatable object files contain one/more .gnu.linkonce.arcextmap.* sections (collated by kernel/vmlinux.lds into .arcextmap in final link). This section is used by debuggers to display the extension instructions and need-not be loaded by target (hence !SHF_ALLOC) The final kernel binary only needs .arcextmap entry in modpost's ignore list (section_white_list[]). However when building modules, modpost scans each object file individually, hence tripping on non-aggregated .gnu.linkonce.arcextmap.* entries as well. Thus need for the 2 entires ! Signed-off-by: NVineet Gupta <vgupta@synopsys.com> Acked-by: NSam Ravnborg <sam@ravnborg.org> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 01 12月, 2012 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
Now that the __dev* sections are not being generated, we don't need to check for them in modpost.c. Acked-by: NSam Ravnborg <sam@ravnborg.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 12 10月, 2012 1 次提交
-
-
由 Jonathan Kliegman 提交于
Allow .GCC.command.line sections in modules to prevent modpost warnings: WARNING: sound/usb/snd-usbmidi-lib.o (.GCC.command.line): unexpected non-allocatable section. Did you forget to use "ax"/"aw" in a .S file? Note that for example <linux/init.h> contains section definitions for use in .S files. Signed-off-by: NJonathan Kliegman <kliegs@chromium.org> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
- 04 10月, 2012 1 次提交
-
-
由 Max Filippov 提交于
Suppress warnings for two informational sections (.xt.lit and .xt.prop) used by the Xtensa architecture. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 17 6月, 2012 1 次提交
-
-
Functions used for PCI fixups (like DECLARE_PCI_FIXUP_HEADER) are often marked __init. This is okay as long as nobody is using PCI hotplug. However if one does execute | echo 1 > /sys/bus/pci/rescan and we hit a module which is marked __init istead of __devinit then we go boom because the code is removed after the kernel booted. This patch help to see those section mismatches. Cc: Michal Marek <mmarek@suse.cz> Cc: linux-kbuild@vger.kernel.org Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: NSebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 23 5月, 2012 2 次提交
-
-
由 Greg Kroah-Hartman 提交于
If the kernel build process is creating files automatically, the least it can do is create them in a properly formatted manner. Sure, it's a minor issue, but being consistent is nice. Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Alessio Igor Bogani <abogani@kernel.org> Cc: Tony Lindgren <tony@atomide.com> Cc: Ben Hutchings <ben@decadent.org.uk> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
由 Jesper Juhl 提交于
In case the open() call succeeds but the subsequent fstat() call fails, then we'll return without close()'ing the filedescriptor. Signed-off-by: NJesper Juhl <jj@chaosbits.net> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 10 4月, 2012 1 次提交
-
-
由 Frank Rowand 提交于
Commit f02e8a65 ("module: Sort exported symbols") sorts symbols placing each of them in its own elf section. This sorting and merging into the canonical sections are done by the linker. Unfortunately modpost to generate Module.symvers file parses vmlinux.o (which is not linked yet) and all modules object files (which aren't linked yet). These aren't sanitized by the linker yet. That breaks modpost that can't detect license properly for modules. This patch makes modpost aware of the new exported symbols structure. [ This above is a slightly corrected version of the explanation of the problem, copied from commit 62a26356 ("modpost: Fix modpost's license checking V3"). That commit fixed the problem for module object files, but not for vmlinux.o. This patch fixes modpost for vmlinux.o. ] Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NAlessio Igor Bogani <abogani@kernel.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 27 3月, 2012 1 次提交
-
-
由 Jan Beulich 提交于
This was lacking a comma between two supposed to be separate strings. Signed-off-by: NJan Beulich <jbeulich@suse.com> Cc: <stable@vger.kernel.org> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
- 15 2月, 2012 1 次提交
-
-
由 Tony Lindgren 提交于
It turns out that many compilers don't show section warnings on ARM currently because handling for ARM_CALL relocs are missing from modpost.c. Based on commit c2e26114 ([ARM] 3205/1: Handle new EABI relocations when loading kernel modules) it seems that R_ARM_PC24, R_ARM_CALL and R_ARM_JUMP24 can be handled the same way. Note that at least Debian libc6-dev is missing defines for both R_ARM_CALL and R_ARM_JUMP24 in /usr/include/elf.h. So for now we need to define them in modpost.c if not defined. Acked-by: NRusty Russell <rusty@rustcorp.com.au> Cc: Ben Hutchings <ben@decadent.org.uk> Cc: Anders Kaseorg <andersk@ksplice.com> Cc: Greg KH <gregkh@linuxfoundation.org> Signed-off-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 07 11月, 2011 1 次提交
-
-
由 Ben Hutchings 提交于
Use of the GPL or a compatible licence doesn't necessarily make the code any good. We already consider staging modules to be suspect, and this should also be true for out-of-tree modules which may receive very little review. Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Reviewed-by: NDave Jones <davej@redhat.com> Acked-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (patched oops-tracing.txt)
-
- 24 7月, 2011 1 次提交
-
-
由 Alessio Igor Bogani 提交于
The commit f02e8a65 sorts symbols placing each of them in its own elf section. The sorting and merging into the canonical sections are done by the linker. Unfortunately modpost to generate Module.symvers file parses vmlinux (already linked) and all modules object files (which aren't linked yet). These aren't sanitized by the linker yet. That breaks modpost that can't detect license properly for modules. This patch makes modpost aware of the new exported symbols structure. Thanks to Arnaud Lacombe <lacombar@gmail.com> and Anders Kaseorg <andersk@ksplice.com> for providing useful suggestions about code. This work was supported by a hardware donation from the CE Linux Forum. Reported-by: NJan Beulich <jbeulich@novell.com> Signed-off-by: NAlessio Igor Bogani <abogani@kernel.org> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-