16 Jul, 2020

1 commit


12 May, 2020

1 commit

  • scripts/mkcompile_h runs $(CC) just for getting the version string.
    Reuse CONFIG_CC_VERSION_TEXT for optimization.

    For GCC, this slightly changes the version string. I do not think it
    is a big deal as we do not have the defined format for LINUX_COMPILER.
    In fact, the recent commit 4dcc9a88448a ("kbuild: mkcompile_h:
    Include $LD version in /proc/version") added the linker version.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

08 Apr, 2020

2 commits

  • scripts/mkcompile_h uses $(CC) only for getting the version string.

    I suspected there was a specific reason why the additional flags were
    needed, and dug the commit history. This code dates back to at least
    2002 [1], but I could not get any more clue.

    Just get rid of it.

    [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=29f3df7eba8ddf91a55183f9967f76fbcc3ab742

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Kees Cook

    Masahiro Yamada
     
  • When doing Clang builds of the kernel, it is possible to link with
    either ld.bfd (binutils) or ld.lld (LLVM), but it is not possible to
    discover this from a running kernel. Add the "$LD -v" output to
    /proc/version.

    Signed-off-by: Kees Cook
    Reviewed-by: Nick Desaulniers
    Tested-by: Nick Desaulniers
    Reviewed-by: Nathan Chancellor
    Tested-by: Nathan Chancellor
    Reviewed-by: Fangrui Song
    Reviewed-by: Sedat Dilek
    Tested-by: Sedat Dilek
    Signed-off-by: Masahiro Yamada

    Kees Cook
     

14 Aug, 2019

1 commit

  • Update the build scripts and the version magic to reflect when
    CONFIG_PREEMPT_RT is enabled in the same way as CONFIG_PREEMPT is treated.

    The resulting version strings:

    Linux m 5.3.0-rc1+ #100 SMP Fri Jul 26 ...
    Linux m 5.3.0-rc1+ #101 SMP PREEMPT Fri Jul 26 ...
    Linux m 5.3.0-rc1+ #102 SMP PREEMPT_RT Fri Jul 26 ...

    The module vermagic:

    5.3.0-rc1+ SMP mod_unload modversions
    5.3.0-rc1+ SMP preempt mod_unload modversions
    5.3.0-rc1+ SMP preempt_rt mod_unload modversions

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Masahiro Yamada

    Thomas Gleixner
     

10 Jan, 2018

1 commit

  • Construct the init thread stack in the linker script rather than doing it
    by means of a union so that ia64's init_task.c can be got rid of.

    The following symbols are then made available from INIT_TASK_DATA() linker
    script macro:

    init_thread_union
    init_stack

    INIT_TASK_DATA() also expands the region to THREAD_SIZE to accommodate the
    size of the init stack. init_thread_union is given its own section so that
    it can be placed into the stack space in the right order. I'm assuming
    that the ia64 ordering is correct and that the task_struct is first and the
    thread_info second.

    Signed-off-by: David Howells
    Tested-by: Tony Luck
    Tested-by: Will Deacon (arm64)
    Tested-by: Palmer Dabbelt
    Acked-by: Thomas Gleixner

    David Howells
     

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
     

09 Sep, 2016

1 commit

  • Introduce LD_DEAD_CODE_DATA_ELIMINATION option for architectures to
    select to build with -ffunction-sections, -fdata-sections, and link
    with --gc-sections. It requires some work (documented) to ensure all
    unreferenced entrypoints are live, and requires toolchain and build
    verification, so it is made a per-arch option for now.

    On a random powerpc64le build, this yelds a significant size saving,
    it boots and runs fine, but there is a lot I haven't tested as yet, so
    these savings may be reduced if there are bugs in the link.

    text data bss dec filename
    11169741 1180744 1923176 14273661 vmlinux
    10445269 1004127 1919707 13369103 vmlinux.dce

    ~700K text, ~170K data, 6% removed from kernel image size.

    Signed-off-by: Nicholas Piggin
    Signed-off-by: Michal Marek

    Nicholas Piggin
     

05 May, 2012

2 commits

  • Now that all archs except ia64 are converted, replace the config and
    let the ia64 select CONFIG_ARCH_INIT_TASK

    Signed-off-by: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20120503085035.867948914@linutronix.de

    Thomas Gleixner
     
  • All archs define init_task in the same way (except ia64, but there is
    no particular reason why ia64 cannot use the common version). Create a
    generic instance so all archs can be converted over.

    The config switch is temporary and will be removed when all archs are
    converted over.

    Signed-off-by: Thomas Gleixner
    Cc: Benjamin Herrenschmidt
    Cc: Chen Liqin
    Cc: Chris Metcalf
    Cc: Chris Zankel
    Cc: David Howells
    Cc: David S. Miller
    Cc: Geert Uytterhoeven
    Cc: Guan Xuetao
    Cc: Haavard Skinnemoen
    Cc: Hirokazu Takata
    Cc: James E.J. Bottomley
    Cc: Jesper Nilsson
    Cc: Jonas Bonn
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Matt Turner
    Cc: Michal Simek
    Cc: Mike Frysinger
    Cc: Paul Mundt
    Cc: Ralf Baechle
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Russell King
    Cc: Yoshinori Sato
    Link: http://lkml.kernel.org/r/20120503085034.092585287@linutronix.de

    Thomas Gleixner
     

12 Dec, 2009

1 commit


12 Feb, 2008

1 commit

  • When make -s support were added to filechk to
    combination created with make V=1 were not
    covered.
    Fix it by explicitly cover this case too.

    Signed-off-by: Sam Ravnborg
    Cc: Mike Frysinger

    Sam Ravnborg
     

09 Feb, 2008

1 commit


15 Oct, 2007

1 commit

  • The variable CFLAGS is a wellknown variable and the usage by
    kbuild may result in unexpected behaviour.
    On top of that several people over time has asked for a way to
    pass in additional flags to gcc.

    This patch replace use of CFLAGS with KBUILD_CFLAGS all over the
    tree and enabling one to use:
    make CFLAGS=...
    to specify additional gcc commandline options.

    One usecase is when trying to find gcc bugs but other
    use cases has been requested too.

    Patch was tested on following architectures:
    alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k

    Test was simple to do a defconfig build, apply the patch and check
    that nothing got rebuild.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

12 Feb, 2007

1 commit

  • The file init/initramfs.c is always compiled and linked in the kernel
    vmlinux even when BLK_DEV_RAM and BLK_DEV_INITRD are disabled and the
    system isn't using any form of an initramfs or initrd. In this situation
    the code is only used to unpack a (static) default initial rootfilesystem.
    The current init/initramfs.c code. usr/initramfs_data.o compiles to a size
    of ~15 kbytes. Disabling BLK_DEV_RAM and BLK_DEV_INTRD shrinks the kernel
    code size with ~60 Kbytes.

    This patch avoids compiling in the code and data for initramfs support if
    CONFIG_BLK_DEV_INITRD is not defined. Instead of the initramfs code and
    data it uses a small routine in init/noinitramfs.c to setup an initial
    static default environment for mounting a rootfilesystem later on in the
    kernel initialisation process. The new code is: 164 bytes of size.

    The patch is separated in two parts:
    1) doesn't compile initramfs code when CONFIG_BLK_DEV_INITRD is not set
    2) changing all plaforms vmlinux.lds.S files to not reserve an area of
    PAGE_SIZE when CONFIG_BLK_DEV_INITRD is not set.

    [deweerdt@free.fr: warning fix]
    Signed-off-by: Jean-Paul Saman
    Cc: Al Viro
    Cc:
    Signed-off-by: Frederik Deweerdt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean-Paul Saman
     

11 Jan, 2007

1 commit

  • Revert previous attempts at messing with the linux banner string and
    simply use a separate format string for proc.

    Signed-off-by: Roman Zippel
    Acked-by: Olaf Hering
    Acked-by: Jean Delvare
    Cc: Andrey Borzenkov
    Cc: Andrew Morton
    Cc: Andy Whitcroft
    Cc: Herbert Poetzl
    Signed-off-by: Linus Torvalds

    Roman Zippel
     

23 Dec, 2006

1 commit

  • compile.h is created super-late in the build. But proc_misc.c want to include
    it, and it's generally not sane to have a header file in include/linux be
    created at the end of the build: it's either not present or, worse, wrong for
    most of the build.

    So the patch arranges for compile.h to be built at the start of the build
    process. It also consolidates the compile.h rules with those for version.h
    and utsname.h, so they all get built together.

    I hope. My chances of having got this right are about 2%.

    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

09 Dec, 2006

1 commit

  • utsname information is shown in the linux banner, which also is used for
    /proc/version (which can have different utsname values inside a uts
    namespaces). this patch makes the varying data arguments and changes the
    string to a format string, using those arguments.

    Signed-off-by: Herbert Poetzl
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Herbert Poetzl
     

27 Jun, 2006

1 commit


15 Jul, 2005

1 commit

  • From: Matt Mackall

    Add PREEMPT to UTS_VERSION where enabled as is done for SMP to make
    preempt kernels easily identifiable.
    Added SMP PREEMPT as comment in compile.h to force it to be
    updated when they change (sam).

    Signed-off-by: Matt Mackall
    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds