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
     

14 May, 2017

1 commit


04 May, 2017

1 commit

  • Define NR_CPUS required by the timer subsystem.

    Fixes this make warning:

    scripts/kconfig/conf --oldconfig arch/x86/um/Kconfig
    kernel/time/Kconfig:155:warning: range is invalid

    Signed-off-by: Nikola Kotur
    Signed-off-by: Richard Weinberger

    Nikola Kotur
     

27 Mar, 2017

1 commit

  • By using "UD0" for WARN()s we remove the function call and its possible
    __FILE__ and __LINE__ immediate arguments from the instruction stream.

    Total image size will not change much, what we win in the instruction
    stream we'll lose because of the __bug_table entries. Still, saves on
    I$ footprint and the total image size does go down a bit.

    text data filename
    10702123 4530992 defconfig-build/vmlinux.orig
    10682460 4530992 defconfig-build/vmlinux.patched

    (UML didn't seem to use GENERIC_BUG at all, so remove it)

    Signed-off-by: Peter Zijlstra (Intel)
    Reviewed-by: Josh Poimboeuf
    Cc: Arjan van de Ven
    Cc: Borislav Petkov
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Richard Weinberger
    Cc: Thomas Gleixner
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

05 Aug, 2016

1 commit

  • Pull UML updates from Richard Weinberger:
    "Beside of various fixes this also contains patches to enable features
    such was Kcov, kmemleak and TRACE_IRQFLAGS_SUPPORT on UML"

    * 'for-linus-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
    hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common()
    um: Support kcov
    um: Enable TRACE_IRQFLAGS_SUPPORT
    um: Use asm-generic/irqflags.h
    um: Fix possible deadlock in sig_handler_common()
    um: Select HAVE_DEBUG_KMEMLEAK
    um: Setup physical memory in setup_arch()
    um: Eliminate null test after alloc_bootmem

    Linus Torvalds
     

04 Aug, 2016

3 commits

  • This adds support for kcov to UML.

    There is a small problem where UML will randomly segfault during boot;
    this is because current_thread_info() occasionally returns an invalid
    (non-NULL) pointer and we try to dereference it in
    __sanitizer_cov_trace_pc(). I consider this a bug in UML itself and this
    patch merely exposes it.

    [v2: disable instrumentation in UML-specific code]

    Cc: Quentin Casasnovas
    Cc: Richard Weinberger
    Cc: Thomas Meyer
    Cc: user-mode-linux-devel
    Cc: Dmitry Vyukov
    Signed-off-by: Vegard Nossum
    Signed-off-by: Richard Weinberger

    Vegard Nossum
     
  • Now we have everything we need, so enable
    TRACE_IRQFLAGS_SUPPORT.

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • Now we have the infrastructure to support kmemleak.
    Enable the HAVE flag.

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     

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
     

11 Jan, 2016

1 commit

  • This brings SECCOMP_MODE_STRICT and SECCOMP_MODE_FILTER support through
    prctl(2) and seccomp(2) to User-mode Linux for i386 and x86_64
    subarchitectures.

    secure_computing() is called first in handle_syscall() so that the
    syscall emulation will be aborted quickly if matching a seccomp rule.

    This is inspired from Meredydd Luff's patch
    (https://gerrit.chromium.org/gerrit/21425).

    Signed-off-by: Mickaël Salaün
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Ingo Molnar
    Cc: Kees Cook
    Cc: Andy Lutomirski
    Cc: Will Drewry
    Cc: Chris Metcalf
    Cc: Michael Ellerman
    Cc: James Hogan
    Cc: Meredydd Luff
    Cc: David Drysdale
    Signed-off-by: Richard Weinberger
    Acked-by: Kees Cook

    Mickaël Salaün
     

04 Jan, 2015

1 commit

  • futex_atomic_cmpxchg_inatomic() does not work on UML because
    it triggers a copy_from_user() in kernel context.
    On UML copy_from_user() can only be used if the kernel was called
    by a real user space process such that UML can use ptrace()
    to fetch the value.

    Reported-by: Miklos Szeredi
    Suggested-by: Geert Uytterhoeven
    Signed-off-by: Richard Weinberger
    Tested-by: Daniel Walter

    Richard Weinberger
     

14 Oct, 2014

1 commit


20 Mar, 2014

1 commit

  • Currently AUDITSYSCALL has a long list of architecture depencency:
    depends on AUDIT && (X86 || PARISC || PPC || S390 || IA64 || UML ||
    SPARC64 || SUPERH || (ARM && AEABI && !OABI_COMPAT) || ALPHA)
    The purpose of this patch is to replace it with HAVE_ARCH_AUDITSYSCALL
    for simplicity.

    Signed-off-by: AKASHI Takahiro
    Acked-by: Will Deacon (arm)
    Acked-by: Richard Guy Briggs (audit)
    Acked-by: Matt Turner (alpha)
    Acked-by: Michael Ellerman (powerpc)
    Signed-off-by: Eric Paris

    AKASHI Takahiro
     

17 Nov, 2013

1 commit

  • arch/um/defconfig only lists one default configuration, and that applies
    only to the i386 architecture. Replace it with two minimal
    configuration files generated using `make savedefconfig`:

    i386_defconfig and x86_64_defconfig

    The build scripts now require two updates:

    1. um's Kconfig (arch/x86/um/Kconfig) should specify an ARCH_DEFCONFIG
    section explicitly pointing to these scripts if the required
    variables are set. Take care to remove the DEFCONFIG_LIST section
    defined in the included file arch/um/Kconfig.common.

    2. um's Makefile (arch/um/Makefile) should set KBUILD_DEFCONFIG properly
    for the top-level Makefile to pick up. Copy the logic in
    arch/x86/Makefile to properly pick the defconfig file depending on
    the actual architecture; except we're working with $SUBARCH here,
    instead of $ARCH.

    Now, you can do:

    $ ARCH=um make defconfig
    $ ARCH=um make

    and successfully build User-Mode Linux on an x86_64 box in default
    configuration.

    Cc: Richard Weinberger
    Cc: Jeff Dike
    Signed-off-by: Ramkumar Ramachandra
    Signed-off-by: Richard Weinberger

    Ramkumar Ramachandra
     

13 Sep, 2013

1 commit


19 Jan, 2013

1 commit

  • The option allows you to remove TTY and compile without errors. This
    saves space on systems that won't support TTY interfaces anyway.
    bloat-o-meter output is below.

    The bulk of this patch consists of Kconfig changes adding "depends on
    TTY" to various serial devices and similar drivers that require the TTY
    layer. Ideally, these dependencies would occur on a common intermediate
    symbol such as SERIO, but most drivers "select SERIO" rather than
    "depends on SERIO", and "select" does not respect dependencies.

    bloat-o-meter output comparing our previous minimal to new minimal by
    removing TTY. The list is filtered to not show removed entries with awk
    '$3 != "-"' as the list was very long.

    add/remove: 0/226 grow/shrink: 2/14 up/down: 6/-35356 (-35350)
    function old new delta
    chr_dev_init 166 170 +4
    allow_signal 80 82 +2
    static.__warned 143 142 -1
    disallow_signal 63 62 -1
    __set_special_pids 95 94 -1
    unregister_console 126 121 -5
    start_kernel 546 541 -5
    register_console 593 588 -5
    copy_from_user 45 40 -5
    sys_setsid 128 120 -8
    sys_vhangup 32 19 -13
    do_exit 1543 1526 -17
    bitmap_zero 60 40 -20
    arch_local_irq_save 137 117 -20
    release_task 674 652 -22
    static.spin_unlock_irqrestore 308 260 -48

    Signed-off-by: Joe Millenbach
    Reviewed-by: Jamey Sharp
    Reviewed-by: Josh Triplett
    Signed-off-by: Greg Kroah-Hartman

    Joe Millenbach
     

09 Oct, 2012

1 commit

  • Introduce HAVE_UID16 config option and select it in corresponding
    architecture Kconfig files. UID16 now only depends on HAVE_UID16.

    Signed-off-by: Catalin Marinas
    Acked-by: Geert Uytterhoeven
    Cc: Russell King
    Cc: Mike Frysinger
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Catalin Marinas
     

25 May, 2012

1 commit

  • Pull timer updates from Thomas Gleixner.

    Various trivial conflict fixups in arch Kconfig due to addition of
    unrelated entries nearby. And one slightly more subtle one for sparc32
    (new user of GENERIC_CLOCKEVENTS), fixed up as per Thomas.

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits)
    timekeeping: Fix a few minor newline issues.
    time: remove obsolete declaration
    ntp: Fix a stale comment and a few stray newlines.
    ntp: Correct TAI offset during leap second
    timers: Fixup the Kconfig consolidation fallout
    x86: Use generic time config
    unicore32: Use generic time config
    um: Use generic time config
    tile: Use generic time config
    sparc: Use: generic time config
    sh: Use generic time config
    score: Use generic time config
    s390: Use generic time config
    openrisc: Use generic time config
    powerpc: Use generic time config
    mn10300: Use generic time config
    mips: Use generic time config
    microblaze: Use generic time config
    m68k: Use generic time config
    m32r: Use generic time config
    ...

    Linus Torvalds
     

22 May, 2012

1 commit


21 May, 2012

1 commit


25 Mar, 2012

1 commit


12 Jan, 2012

1 commit

  • frv, h8300, m68k, microblaze, openrisc, score, um and xtensa currently
    do not register a CPU device. Add the config option GENERIC_CPU_DEVICES
    which causes a generic CPU device to be registered for each present CPU,
    and make all these architectures select it.

    Richard Weinberger covered UML and suggested using
    per_cpu.

    Signed-off-by: Ben Hutchings
    Signed-off-by: Linus Torvalds

    Ben Hutchings
     

30 Mar, 2011

1 commit


25 Mar, 2011

1 commit


15 Feb, 2011

1 commit


21 Jan, 2011

1 commit


12 Oct, 2010

1 commit


20 Sep, 2010

1 commit


27 Jul, 2010

1 commit

  • Now that all arches have been converted over to use generic time via
    clocksources or arch_gettimeoffset(), we can remove the GENERIC_TIME
    config option and simplify the generic code.

    Signed-off-by: John Stultz
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    John Stultz
     

23 Oct, 2008

1 commit

  • Teach scripts/kconfig/Makefile and top-level Makefile that arch/*/Makefile
    is allowed to say Kconfig := .
    Rewrite arch/um/Kconfig and arch/um/Kconfig. so that the latter
    would be top-level one (and include the pieces of the former).

    Signed-off-by: Al Viro
    Signed-off-by: H. Peter Anvin

    Al Viro