24 Sep, 2020

1 commit

  • There was a request to preprocess the module linker script like we
    do for the vmlinux one. (https://lkml.org/lkml/2020/8/21/512)

    The difference between vmlinux.lds and module.lds is that the latter
    is needed for external module builds, thus must be cleaned up by
    'make mrproper' instead of 'make clean'. Also, it must be created
    by 'make modules_prepare'.

    You cannot put it in arch/$(SRCARCH)/kernel/, which is cleaned up by
    'make clean'. I moved arch/$(SRCARCH)/kernel/module.lds to
    arch/$(SRCARCH)/include/asm/module.lds.h, which is included from
    scripts/module.lds.S.

    scripts/module.lds is fine because 'make clean' keeps all the
    build artifacts under scripts/.

    You can add arch-specific sections in .

    Signed-off-by: Masahiro Yamada
    Tested-by: Jessica Yu
    Acked-by: Will Deacon
    Acked-by: Geert Uytterhoeven
    Acked-by: Palmer Dabbelt
    Reviewed-by: Kees Cook
    Acked-by: Jessica Yu

    Masahiro Yamada
     

10 Aug, 2020

1 commit

  • To build host programs, you need to add the program names to 'hostprogs'
    to use the necessary build rule, but it is not enough to build them
    because there is no dependency.

    There are two types of host programs: built as the prerequisite of
    another (e.g. gen_crc32table in lib/Makefile), or always built when
    Kbuild visits the Makefile (e.g. genksyms in scripts/genksyms/Makefile).

    The latter is typical in Makefiles under scripts/, which contains host
    programs globally used during the kernel build. To build them, you need
    to add them to both 'hostprogs' and 'always-y'.

    This commit adds hostprogs-always-y as a shorthand.

    The same applies to user programs. net/bpfilter/Makefile builds
    bpfilter_umh on demand, hence always-y is unneeded. In contrast,
    programs under samples/ are added to both 'userprogs' and 'always-y'
    so they are always built when Kbuild visits the Makefiles.

    userprogs-always-y works as a shorthand.

    Signed-off-by: Masahiro Yamada
    Acked-by: Miguel Ojeda

    Masahiro Yamada
     

08 Apr, 2020

1 commit

  • I do not like to add an extra include path for every tool with no
    good reason. This should be specified per file.

    This line was added by commit 6520fe5564ac ("x86, realmode: 16-bit
    real-mode code support for relocs tool"), which did not touch
    anything else in scripts/. I see no reason to add this.

    Also, remove the comment about kallsyms because we do not have any
    for the rest of programs.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

04 Feb, 2020

1 commit

  • In old days, the "host-progs" syntax was used for specifying host
    programs. It was renamed to the current "hostprogs-y" in 2004.

    It is typically useful in scripts/Makefile because it allows Kbuild to
    selectively compile host programs based on the kernel configuration.

    This commit renames like follows:

    always -> always-y
    hostprogs-y -> hostprogs

    So, scripts/Makefile will look like this:

    always-$(CONFIG_BUILD_BIN2C) += ...
    always-$(CONFIG_KALLSYMS) += ...
    ...
    hostprogs := $(always-y) $(always-m)

    I think this makes more sense because a host program is always a host
    program, irrespective of the kernel configuration. We want to specify
    which ones to compile by CONFIG options, so always-y will be handier.

    The "always", "hostprogs-y", "hostprogs-m" will be kept for backward
    compatibility for a while.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

30 Jan, 2020

1 commit

  • Pull tty/serial driver updates from Greg KH:
    "Here are the big set of tty and serial driver updates for 5.6-rc1

    Included in here are:
    - dummy_con cleanups (touches lots of arch code)
    - sysrq logic cleanups (touches lots of serial drivers)
    - samsung driver fixes (wasn't really being built)
    - conmakeshash move to tty subdir out of scripts
    - lots of small tty/serial driver updates

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

    * tag 'tty-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (140 commits)
    tty: n_hdlc: Use flexible-array member and struct_size() helper
    tty: baudrate: SPARC supports few more baud rates
    tty: baudrate: Synchronise baud_table[] and baud_bits[]
    tty: serial: meson_uart: Add support for kernel debugger
    serial: imx: fix a race condition in receive path
    serial: 8250_bcm2835aux: Document struct bcm2835aux_data
    serial: 8250_bcm2835aux: Use generic remapping code
    serial: 8250_bcm2835aux: Allocate uart_8250_port on stack
    serial: 8250_bcm2835aux: Suppress register_port error on -EPROBE_DEFER
    serial: 8250_bcm2835aux: Suppress clk_get error on -EPROBE_DEFER
    serial: 8250_bcm2835aux: Fix line mismatch on driver unbind
    serial_core: Remove unused member in uart_port
    vt: Correct comment documenting do_take_over_console()
    vt: Delete comment referencing non-existent unbind_con_driver()
    arch/xtensa/setup: Drop dummy_con initialization
    arch/x86/setup: Drop dummy_con initialization
    arch/unicore32/setup: Drop dummy_con initialization
    arch/sparc/setup: Drop dummy_con initialization
    arch/sh/setup: Drop dummy_con initialization
    arch/s390/setup: Drop dummy_con initialization
    ...

    Linus Torvalds
     

17 Dec, 2019

1 commit


13 Dec, 2019

2 commits

  • The ORC unwinder has two tables: .orc_unwind_ip and .orc_unwind, which
    need to be sorted for binary search. Previously this sorting was done
    during bootup.

    Sort them at build time to speed up booting.

    Add the ORC tables sorting in a parallel build process to speed up the build.

    [ mingo: Rewrote the changelog and fixed some comments. ]

    Suggested-by: Andy Lutomirski
    Suggested-by: Peter Zijlstra
    Reported-by: kbuild test robot
    Signed-off-by: Shile Zhang
    Acked-by: Peter Zijlstra (Intel)
    Cc: Josh Poimboeuf
    Cc: Masahiro Yamada
    Cc: Michal Marek
    Cc: linux-kbuild@vger.kernel.org
    Link: https://lkml.kernel.org/r/20191204004633.88660-7-shile.zhang@linux.alibaba.com
    Signed-off-by: Ingo Molnar

    Shile Zhang
     
  • Use a more generic name for additional table sorting usecases,
    such as the upcoming ORC table sorting feature. This tool is
    not tied to exception table sorting anymore.

    No functional changes intended.

    [ mingo: Rewrote the changelog. ]

    Signed-off-by: Shile Zhang
    Acked-by: Peter Zijlstra (Intel)
    Cc: Josh Poimboeuf
    Cc: Masahiro Yamada
    Cc: Michal Marek
    Cc: linux-kbuild@vger.kernel.org
    Link: https://lkml.kernel.org/r/20191204004633.88660-6-shile.zhang@linux.alibaba.com
    Signed-off-by: Ingo Molnar

    Shile Zhang
     

11 Nov, 2019

1 commit


28 Sep, 2019

1 commit

  • Pull integrity updates from Mimi Zohar:
    "The major feature in this time is IMA support for measuring and
    appraising appended file signatures. In addition are a couple of bug
    fixes and code cleanup to use struct_size().

    In addition to the PE/COFF and IMA xattr signatures, the kexec kernel
    image may be signed with an appended signature, using the same
    scripts/sign-file tool that is used to sign kernel modules.

    Similarly, the initramfs may contain an appended signature.

    This contained a lot of refactoring of the existing appended signature
    verification code, so that IMA could retain the existing framework of
    calculating the file hash once, storing it in the IMA measurement list
    and extending the TPM, verifying the file's integrity based on a file
    hash or signature (eg. xattrs), and adding an audit record containing
    the file hash, all based on policy. (The IMA support for appended
    signatures patch set was posted and reviewed 11 times.)

    The support for appended signature paves the way for adding other
    signature verification methods, such as fs-verity, based on a single
    system-wide policy. The file hash used for verifying the signature and
    the signature, itself, can be included in the IMA measurement list"

    * 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
    ima: ima_api: Use struct_size() in kzalloc()
    ima: use struct_size() in kzalloc()
    sefltest/ima: support appended signatures (modsig)
    ima: Fix use after free in ima_read_modsig()
    MODSIGN: make new include file self contained
    ima: fix freeing ongoing ahash_request
    ima: always return negative code for error
    ima: Store the measurement again when appraising a modsig
    ima: Define ima-modsig template
    ima: Collect modsig
    ima: Implement support for module-style appended signatures
    ima: Factor xattr_verify() out of ima_appraise_measurement()
    ima: Add modsig appraise_type option for module-style appended signatures
    integrity: Select CONFIG_KEYS instead of depending on it
    PKCS#7: Introduce pkcs7_get_digest()
    PKCS#7: Refactor verify_pkcs7_signature()
    MODSIGN: Export module signature definitions
    ima: initialize the "template" field with the default template

    Linus Torvalds
     

25 Aug, 2019

1 commit


06 Aug, 2019

1 commit

  • IMA will use the module_signature format for append signatures, so export
    the relevant definitions and factor out the code which verifies that the
    appended signature trailer is valid.

    Also, create a CONFIG_MODULE_SIG_FORMAT option so that IMA can select it
    and be able to use mod_check_sig() without having to depend on either
    CONFIG_MODULE_SIG or CONFIG_MODULES.

    s390 duplicated the definition of struct module_signature so now they can
    use the new header instead.

    Signed-off-by: Thiago Jung Bauermann
    Acked-by: Jessica Yu
    Reviewed-by: Philipp Rudo
    Cc: Heiko Carstens
    Signed-off-by: Mimi Zohar

    Thiago Jung Bauermann
     

15 Jun, 2019

1 commit


27 Feb, 2019

1 commit


01 Dec, 2018

2 commits


02 Oct, 2018

1 commit

  • There is nothing arch specific about building dtb files other than their
    location under /arch/*/boot/dts/. Keeping each arch aligned is a pain.
    The dependencies and supported targets are all slightly different.
    Also, a cross-compiler for each arch is needed, but really the host
    compiler preprocessor is perfectly fine for building dtbs. Move the
    build rules to a common location and remove the arch specific ones. This
    is done in a single step to avoid warnings about overriding rules.

    The build dependencies had been a mixture of 'scripts' and/or 'prepare'.
    These pull in several dependencies some of which need a target compiler
    (specifically devicetable-offsets.h) and aren't needed to build dtbs.
    All that is really needed is dtc, so adjust the dependencies to only be
    dtc.

    This change enables support 'dtbs_install' on some arches which were
    missing the target.

    Acked-by: Will Deacon
    Acked-by: Paul Burton
    Acked-by: Ley Foon Tan
    Acked-by: Masahiro Yamada
    Cc: Michal Marek
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Yoshinori Sato
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: linux-kbuild@vger.kernel.org
    Cc: linux-snps-arc@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: uclinux-h8-devel@lists.sourceforge.jp
    Cc: linux-mips@linux-mips.org
    Cc: nios2-dev@lists.rocketboards.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-xtensa@linux-xtensa.org
    Signed-off-by: Rob Herring

    Rob Herring
     

18 Jul, 2018

2 commits

  • In preparation for enabling command line LDLIBS, re-name HOST_LOADLIBES
    to KBUILD_HOSTLDLIBS as the internal use only flags. Also rename
    existing usage to HOSTLDLIBS for consistency. This should not have any
    visible effects.

    Signed-off-by: Laura Abbott
    Signed-off-by: Masahiro Yamada

    Laura Abbott
     
  • Commit 8370edea81e3 ("bin2c: move bin2c in scripts/basic") moved bin2c
    to the scripts/basic/ directory, incorrectly stating "Kexec wants to
    use bin2c and it wants to use it really early in the build process.
    See arch/x86/purgatory/ code in later patches."

    Commit bdab125c9301 ("Revert "kexec/purgatory: Add clean-up for
    purgatory directory"") and commit d6605b6bbee8 ("x86/build: Remove
    unnecessary preparation for purgatory") removed the redundant
    purgatory build magic entirely.

    That means that the move of bin2c was unnecessary in the first place.

    fixdep is the only host program that deserves to sit in the
    scripts/basic/ directory.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

24 Jun, 2017

1 commit


16 May, 2017

1 commit


08 Jun, 2016

1 commit

  • This patch allows to build the whole kernel with GCC plugins. It was ported from
    grsecurity/PaX. The infrastructure supports building out-of-tree modules and
    building in a separate directory. Cross-compilation is supported too.
    Currently the x86, arm, arm64 and uml architectures enable plugins.

    The directory of the gcc plugins is scripts/gcc-plugins. You can use a file or a directory
    there. The plugins compile with these options:
    * -fno-rtti: gcc is compiled with this option so the plugins must use it too
    * -fno-exceptions: this is inherited from gcc too
    * -fasynchronous-unwind-tables: this is inherited from gcc too
    * -ggdb: it is useful for debugging a plugin (better backtrace on internal
    errors)
    * -Wno-narrowing: to suppress warnings from gcc headers (ipa-utils.h)
    * -Wno-unused-variable: to suppress warnings from gcc headers (gcc_version
    variable, plugin-version.h)

    The infrastructure introduces a new Makefile target called gcc-plugins. It
    supports all gcc versions from 4.5 to 6.0. The scripts/gcc-plugin.sh script
    chooses the proper host compiler (gcc-4.7 can be built by either gcc or g++).
    This script also checks the availability of the included headers in
    scripts/gcc-plugins/gcc-common.h.

    The gcc-common.h header contains frequently included headers for GCC plugins
    and it has a compatibility layer for the supported gcc versions.

    The gcc-generate-*-pass.h headers automatically generate the registration
    structures for GIMPLE, SIMPLE_IPA, IPA and RTL passes.

    Note that 'make clean' keeps the *.so files (only the distclean or mrproper
    targets clean all) because they are needed for out-of-tree modules.

    Based on work created by the PaX Team.

    Signed-off-by: Emese Revfy
    Acked-by: Kees Cook
    Signed-off-by: Michal Marek

    Emese Revfy
     

26 Feb, 2016

1 commit

  • Place a system_extra_cert buffer of configurable size, right after the
    system_certificate_list, so that inserted keys can be readily processed by
    the existing mechanism. Added script takes a key file and a kernel image
    and inserts its contents to the reserved area. The
    system_certificate_list_size is also adjusted accordingly.

    Call the script as:

    scripts/insert-sys-cert -b -c

    If vmlinux has no symbol table, supply System.map file with -s flag.
    Subsequent runs replace the previously inserted key, instead of appending
    the new one.

    Signed-off-by: Mehmet Kayaalp
    Signed-off-by: David Howells
    Acked-by: Mimi Zohar

    Mehmet Kayaalp
     

28 Sep, 2015

1 commit

  • Currently the encoding of documents generated by DocBook depends on
    the current locale. Make the output reproducible independently of
    the locale, by setting the encoding to UTF-8 (LC_CTYPE=C.UTF-8) by
    preference, or ASCII (LC_CTYPE=C) as a fallback.

    LC_CTYPE can normally be overridden by LC_ALL, but the top-level
    Makefile unsets that.

    Signed-off-by: Ben Hutchings
    [jc: added check-lc_ctype to .gitignore]
    Signed-off-by: Jonathan Corbet

    Ben Hutchings
     

13 Aug, 2015

1 commit


07 Aug, 2015

2 commits

  • Where an external PEM file or PKCS#11 URI is given, we can get the cert
    from it for ourselves instead of making the user drop signing_key.x509
    in place for us.

    Signed-off-by: David Woodhouse
    Signed-off-by: David Howells

    David Woodhouse
     
  • Move to using PKCS#7 messages as module signatures because:

    (1) We have to be able to support the use of X.509 certificates that don't
    have a subjKeyId set. We're currently relying on this to look up the
    X.509 certificate in the trusted keyring list.

    (2) PKCS#7 message signed information blocks have a field that supplies the
    data required to match with the X.509 certificate that signed it.

    (3) The PKCS#7 certificate carries fields that specify the digest algorithm
    used to generate the signature in a standardised way and the X.509
    certificates specify the public key algorithm in a standardised way - so
    we don't need our own methods of specifying these.

    (4) We now have PKCS#7 message support in the kernel for signed kexec purposes
    and we can make use of this.

    To make this work, the old sign-file script has been replaced with a program
    that needs compiling in a previous patch. The rules to build it are added
    here.

    Signed-off-by: David Howells
    Tested-by: Vivek Goyal

    David Howells
     

18 Feb, 2015

1 commit

  • This provides the basic infrastructure to load kernel-specific python
    helper scripts when debugging the kernel in gdb.

    The loading mechanism is based on gdb loading for -gdb.py when
    opening . Therefore, this places a corresponding link to the
    main helper script into the output directory that contains vmlinux.

    The main scripts will pull in submodules containing Linux specific gdb
    commands and functions. To avoid polluting the source directory with
    compiled python modules, we link to them from the object directory.

    Due to gdb.parse_and_eval and string redirection for gdb.execute, we
    depend on gdb >= 7.2.

    This feature is enabled via CONFIG_GDB_SCRIPTS.

    Signed-off-by: Jan Kiszka
    Acked-by: Michal Marek [kbuild stuff]
    Cc: Thomas Gleixner
    Cc: Jason Wessel
    Cc: Andi Kleen
    Cc: Ben Widawsky
    Cc: Borislav Petkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kiszka
     

09 Aug, 2014

1 commit

  • This patch series does not do kernel signature verification yet. I plan
    to post another patch series for that. Now distributions are already
    signing PE/COFF bzImage with PKCS7 signature I plan to parse and verify
    those signatures.

    Primary goal of this patchset is to prepare groundwork so that kernel
    image can be signed and signatures be verified during kexec load. This
    should help with two things.

    - It should allow kexec/kdump on secureboot enabled machines.

    - In general it can help even without secureboot. By being able to verify
    kernel image signature in kexec, it should help with avoiding module
    signing restrictions. Matthew Garret showed how to boot into a custom
    kernel, modify first kernel's memory and then jump back to old kernel and
    bypass any policy one wants to.

    This patch (of 15):

    Kexec wants to use bin2c and it wants to use it really early in the build
    process. See arch/x86/purgatory/ code in later patches.

    So move bin2c in scripts/basic so that it can be built very early and
    be usable by arch/x86/purgatory/

    Signed-off-by: Vivek Goyal
    Cc: Borislav Petkov
    Cc: Michael Kerrisk
    Cc: Yinghai Lu
    Cc: Eric Biederman
    Cc: H. Peter Anvin
    Cc: Matthew Garrett
    Cc: Greg Kroah-Hartman
    Cc: Dave Young
    Cc: WANG Chao
    Cc: Baoquan He
    Cc: Andy Lutomirski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     

10 Jun, 2014

1 commit


15 Mar, 2014

1 commit


08 Oct, 2012

1 commit

  • Add a simple ASN.1 grammar compiler. This produces a bytecode output that can
    be fed to a decoder to inform the decoder how to interpret the ASN.1 stream it
    is trying to parse.

    Action functions can be specified in the grammar by interpolating:

    ({ foo })

    after a type, for example:

    SubjectPublicKeyInfo ::= SEQUENCE {
    algorithm AlgorithmIdentifier,
    subjectPublicKey BIT STRING ({ do_key_data })
    }

    The decoder is expected to call these after matching this type and parsing the
    contents if it is a constructed type.

    The grammar compiler does not currently support the SET type (though it does
    support SET OF) as I can't see a good way of tracking which members have been
    encountered yet without using up extra stack space.

    Currently, the grammar compiler will fail if more than 256 bytes of bytecode
    would be produced or more than 256 actions have been specified as it uses
    8-bit jump values and action indices to keep space usage down.

    Signed-off-by: David Howells
    Signed-off-by: Rusty Russell

    David Howells
     

24 May, 2012

1 commit

  • Pull exception table generation updates from Ingo Molnar:
    "The biggest change here is to allow the build-time sorting of the
    exception table, to speed up booting. This is achieved by the
    architecture enabling BUILDTIME_EXTABLE_SORT. This option is enabled
    for x86 and MIPS currently.

    On x86 a number of fixes and changes were needed to allow build-time
    sorting of the exception table, in particular a relocation invariant
    exception table format was needed. This required the abstracting out
    of exception table protocol and the removal of 20 years of accumulated
    assumptions about the x86 exception table format.

    While at it, this tree also cleans up various other aspects of
    exception handling, such as early(er) exception handling for
    rdmsr_safe() et al.

    All in one, as the result of these changes the x86 exception code is
    now pretty nice and modern. As an added bonus any regressions in this
    code will be early and violent crashes, so if you see any of those,
    you'll know whom to blame!"

    Fix up trivial conflicts in arch/{mips,x86}/Kconfig files due to nearby
    modifications of other core architecture options.

    * 'x86-extable-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (35 commits)
    Revert "x86, extable: Disable presorted exception table for now"
    scripts/sortextable: Handle relative entries, and other cleanups
    x86, extable: Switch to relative exception table entries
    x86, extable: Disable presorted exception table for now
    x86, extable: Add _ASM_EXTABLE_EX() macro
    x86, extable: Remove open-coded exception table entries in arch/x86/ia32/ia32entry.S
    x86, extable: Remove open-coded exception table entries in arch/x86/include/asm/xsave.h
    x86, extable: Remove open-coded exception table entries in arch/x86/include/asm/kvm_host.h
    x86, extable: Remove the now-unused __ASM_EX_SEC macros
    x86, extable: Remove open-coded exception table entries in arch/x86/xen/xen-asm_32.S
    x86, extable: Remove open-coded exception table entries in arch/x86/um/checksum_32.S
    x86, extable: Remove open-coded exception table entries in arch/x86/lib/usercopy_32.c
    x86, extable: Remove open-coded exception table entries in arch/x86/lib/putuser.S
    x86, extable: Remove open-coded exception table entries in arch/x86/lib/getuser.S
    x86, extable: Remove open-coded exception table entries in arch/x86/lib/csum-copy_64.S
    x86, extable: Remove open-coded exception table entries in arch/x86/lib/copy_user_nocache_64.S
    x86, extable: Remove open-coded exception table entries in arch/x86/lib/copy_user_64.S
    x86, extable: Remove open-coded exception table entries in arch/x86/lib/checksum_32.S
    x86, extable: Remove open-coded exception table entries in arch/x86/kernel/test_rodata.c
    x86, extable: Remove open-coded exception table entries in arch/x86/kernel/entry_64.S
    ...

    Linus Torvalds
     

19 May, 2012

1 commit

  • A new option is added to the relocs tool called '--realmode'.
    This option causes the generation of 16-bit segment relocations
    and 32-bit linear relocations for the real-mode code. When
    the real-mode code is moved to the low-memory during kernel
    initialization, these relocation entries can be used to
    relocate the code properly.

    In the assembly code 16-bit segment relocations must be relative
    to the 'real_mode_seg' absolute symbol. Linear relocations must be
    relative to a symbol prefixed with 'pa_'.

    16-bit segment relocation is used to load cs:ip in 16-bit code.
    Linear relocations are used in the 32-bit code for relocatable
    data references. They are declared in the linker script of the
    real-mode code.

    The relocs tool is moved to arch/x86/tools/relocs.c, and added new
    target archscripts that can be used to build scripts needed building
    an architecture. be compiled before building the arch/x86 tree.

    [ hpa: accelerating this because it detects invalid absolute
    relocations, a serious bug in binutils 2.22.52.0.x which currently
    produces bad kernels. ]

    Signed-off-by: H. Peter Anvin
    Link: http://lkml.kernel.org/r/1336501366-28617-2-git-send-email-jarkko.sakkinen@intel.com
    Signed-off-by: Jarkko Sakkinen
    Signed-off-by: H. Peter Anvin
    Cc:

    H. Peter Anvin
     

25 Apr, 2012

1 commit

  • x86 is now using relative rather than absolute addresses in its
    exception table, so we add a sorter for these. If there are
    relocations on the __ex_table section, they are redundant and probably
    incorrect after the sort, so they are zeroed out leaving them valid
    and consistent.

    Also use the unaligned safe accessors from tools/{be,le}_byteshift.h

    Signed-off-by: David Daney
    Link: http://lkml.kernel.org/r/1335291795-26693-2-git-send-email-ddaney.cavm@gmail.com
    Signed-off-by: H. Peter Anvin

    David Daney
     

20 Apr, 2012

1 commit


03 May, 2011

1 commit


17 Mar, 2011

1 commit

  • While changing our build system over to use the headers_install target
    as part of our klibc build, the following message started showing up in
    our logs:

    make[2]: `scripts/unifdef' is up to date.

    It turns out that the build blindly invokes a recursive make on this
    target, which causes make to emit this message when the target is
    already up to date. This isn't seen for most targets as the rest of the
    build relies primarily on the default target and on PHONY targets when
    invoking make recursively.

    Silence the above message when building unifdef as part of
    headers_install by hiding it behind a new PHONY target called
    "build_unifdef" that has an empty recipe.

    Signed-off-by: Mike Waychison
    Acked-by: WANG Cong
    Signed-off-by: Michal Marek

    Mike Waychison
     

15 Oct, 2010

1 commit

  • This patch adds the support for the C version of recordmcount and
    compile times show ~ 12% improvement.

    After verifying this works, other archs can add:

    HAVE_C_MCOUNT_RECORD

    in its Kconfig and it will use the C version of recordmcount
    instead of the perl version.

    Cc:
    Cc: Michal Marek
    Cc: linux-kbuild@vger.kernel.org
    Cc: John Reiser
    Signed-off-by: Steven Rostedt

    Steven Rostedt