14 Sep, 2020

1 commit


14 Jun, 2020

1 commit

  • Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
    '---help---'"), the number of '---help---' has been gradually
    decreasing, but there are still more than 2400 instances.

    This commit finishes the conversion. While I touched the lines,
    I also fixed the indentation.

    There are a variety of indentation styles found.

    a) 4 spaces + '---help---'
    b) 7 spaces + '---help---'
    c) 8 spaces + '---help---'
    d) 1 space + 1 tab + '---help---'
    e) 1 tab + '---help---' (correct indentation)
    f) 1 tab + 1 space + '---help---'
    g) 1 tab + 2 spaces + '---help---'

    In order to convert all of them to 1 tab + 'help', I ran the
    following commend:

    $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

02 Aug, 2018

1 commit

  • Move the source of lib/Kconfig.debug and arch/$(ARCH)/Kconfig.debug to
    the top-level Kconfig. For two architectures that means moving their
    arch-specific symbols in that menu into a new arch Kconfig.debug file,
    and for a few more creating a dummy file so that we can include it
    unconditionally.

    Also move the actual 'Kernel hacking' menu to lib/Kconfig.debug, where
    it belongs.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Masahiro Yamada

    Christoph Hellwig
     

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
     

23 Feb, 2017

1 commit

  • Pull s390 updates from Martin Schwidefsky:

    - New entropy generation for the pseudo random number generator.

    - Early boot printk output via sclp to help debug crashes on boot. This
    needs to be enabled with a kernel parameter.

    - Add proper no-execute support with a bit in the page table entry.

    - Bug fixes and cleanups.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (65 commits)
    s390/syscall: fix single stepped system calls
    s390/zcrypt: make ap_bus explicitly non-modular
    s390/zcrypt: Removed unneeded debug feature directory creation.
    s390: add missing "do {} while (0)" loop constructs to multiline macros
    s390/mm: add cond_resched call to kernel page table dumper
    s390: get rid of MACHINE_HAS_PFMF and MACHINE_HAS_HPAGE
    s390/mm: make memory_block_size_bytes available for !MEMORY_HOTPLUG
    s390: replace ACCESS_ONCE with READ_ONCE
    s390: Audit and remove any remaining unnecessary uses of module.h
    s390: mm: Audit and remove any unnecessary uses of module.h
    s390: kernel: Audit and remove any unnecessary uses of module.h
    s390/kdump: Use "LINUX" ELF note name instead of "CORE"
    s390: add no-execute support
    s390: report new vector facilities
    s390: use correct input data address for setup_randomness
    s390/sclp: get rid of common response code handling
    s390/sclp: don't add new lines to each printed string
    s390/sclp: make early sclp code readable
    s390/sclp: disable early sclp code as soon as the base sclp driver is active
    s390/sclp: move early printk code to drivers
    ...

    Linus Torvalds
     

08 Feb, 2017

1 commit

  • There are multiple architectures that support CONFIG_DEBUG_RODATA and
    CONFIG_SET_MODULE_RONX. These options also now have the ability to be
    turned off at runtime. Move these to an architecture independent
    location and make these options def_bool y for almost all of those
    arches.

    Signed-off-by: Laura Abbott
    Acked-by: Ingo Molnar
    Acked-by: Heiko Carstens
    Signed-off-by: Kees Cook

    Laura Abbott
     

16 Jan, 2017

1 commit

  • Use the early sclp code to provide a boot console. This boot console
    is available if the kernel parameter "earlyprintk" has been specified,
    just like it works for other architectures that also provide an early
    boot console.

    This makes debugging of early problems much easier, since now we
    finally have working console output even before memory detection is
    running.

    The boot console will be automatically disabled as soon as another
    console will be registered.

    Reviewed-by: Peter Oberparleiter
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

09 Jan, 2016

1 commit

  • Let all the archs that implement devmem_is_allowed() opt-in to a common
    definition of CONFIG_STRICT_DEVM in lib/Kconfig.debug.

    Cc: Kees Cook
    Cc: Russell King
    Cc: Will Deacon
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Andrew Morton
    Cc: Greg Kroah-Hartman
    Cc: "David S. Miller"
    Acked-by: Catalin Marinas
    Acked-by: Heiko Carstens
    [heiko: drop 'default y' for s390]
    Acked-by: Ingo Molnar
    Suggested-by: Arnd Bergmann
    Signed-off-by: Dan Williams

    Dan Williams
     

01 May, 2013

1 commit

  • The help text for this config is duplicated across the x86, parisc, and
    s390 Kconfig.debug files. Arnd Bergman noted that the help text was
    slightly misleading and should be fixed to state that enabling this
    option isn't a problem when using pre 4.4 gcc.

    To simplify the rewording, consolidate the text into lib/Kconfig.debug
    and modify it there to be more explicit about when you should say N to
    this config.

    Also, make the text a bit more generic by stating that this option
    enables compile time checks so we can cover architectures which emit
    warnings vs. ones which emit errors. The details of how an
    architecture decided to implement the checks isn't as important as the
    concept of compile time checking of copy_from_user() calls.

    While we're doing this, remove all the copy_from_user_overflow() code
    that's duplicated many times and place it into lib/ so that any
    architecture supporting this option can get the function for free.

    Signed-off-by: Stephen Boyd
    Acked-by: Arnd Bergmann
    Acked-by: Ingo Molnar
    Acked-by: H. Peter Anvin
    Cc: Arjan van de Ven
    Acked-by: Helge Deller
    Cc: Heiko Carstens
    Cc: Stephen Rothwell
    Cc: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     

09 Oct, 2012

1 commit

  • This is more or less the same as the x86 page table dumper which was
    merged four years ago: 926e5392 "x86: add code to dump the (kernel)
    page tables for visual inspection by kernel developers".

    We add a file at /sys/kernel/debug/kernel_page_tables for debugging
    purposes so it's quite easy to see the kernel page table layout and
    possible odd mappings:

    ---[ Identity Mapping ]---
    0x0000000000000000-0x0000000000100000 1M PTE RW
    ---[ Kernel Image Start ]---
    0x0000000000100000-0x0000000000800000 7M PMD RO
    0x0000000000800000-0x00000000008a9000 676K PTE RO
    0x00000000008a9000-0x0000000000900000 348K PTE RW
    0x0000000000900000-0x0000000001500000 12M PMD RW
    ---[ Kernel Image End ]---
    0x0000000001500000-0x0000000280000000 10219M PMD RW
    0x0000000280000000-0x000003d280000000 3904G PUD I
    ---[ vmemmap Area ]---
    0x000003d280000000-0x000003d288c00000 140M PTE RW
    0x000003d288c00000-0x000003d300000000 1908M PMD I
    0x000003d300000000-0x000003e000000000 52G PUD I
    ---[ vmalloc Area ]---
    0x000003e000000000-0x000003e000009000 36K PTE RW
    0x000003e000009000-0x000003e0000ee000 916K PTE I
    0x000003e0000ee000-0x000003e000146000 352K PTE RW
    0x000003e000146000-0x000003e000200000 744K PTE I
    0x000003e000200000-0x000003e080000000 2046M PMD I
    0x000003e080000000-0x0000040000000000 126G PUD I

    This usually makes only sense for kernel developers. The output
    with CONFIG_DEBUG_PAGEALLOC is not very helpful, because of the
    huge number of mapped out pages, however I decided for the time
    being to not add a !DEBUG_PAGEALLOC dependency.
    Maybe it's helpful for somebody even with that option.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

16 Mar, 2011

1 commit

  • Implement write protection for kernel modules text and read-only
    data sections by implementing set_memory_[ro|rw] on s390.
    Since s390 has no execute bit in the pte's NX is not supported.

    set_memory_[ro|rw] will only work on normal pages and not on
    large pages, so in case a large page should be modified bail
    out with a warning.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     

05 Jan, 2011

1 commit


10 Nov, 2010

1 commit


27 Feb, 2010

1 commit


03 Apr, 2009

1 commit

  • This fixes a build failure with generic debug pagealloc:

    mm/debug-pagealloc.c: In function 'set_page_poison':
    mm/debug-pagealloc.c:8: error: 'struct page' has no member named 'debug_flags'
    mm/debug-pagealloc.c: In function 'clear_page_poison':
    mm/debug-pagealloc.c:13: error: 'struct page' has no member named 'debug_flags'
    mm/debug-pagealloc.c: In function 'page_poison':
    mm/debug-pagealloc.c:18: error: 'struct page' has no member named 'debug_flags'
    mm/debug-pagealloc.c: At top level:
    mm/debug-pagealloc.c:120: error: redefinition of 'kernel_map_pages'
    include/linux/mm.h:1278: error: previous definition of 'kernel_map_pages' was here
    mm/debug-pagealloc.c: In function 'kernel_map_pages':
    mm/debug-pagealloc.c:122: error: 'debug_pagealloc_enabled' undeclared (first use in this function)

    by fixing

    - debug_flags should be in struct page
    - define DEBUG_PAGEALLOC config option for all architectures

    Signed-off-by: Akinobu Mita
    Reported-by: Alexander Beregalov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

01 Apr, 2009

1 commit

  • CONFIG_DEBUG_PAGEALLOC is now supported by x86, powerpc, sparc64, and
    s390. This patch implements it for the rest of the architectures by
    filling the pages with poison byte patterns after free_pages() and
    verifying the poison patterns before alloc_pages().

    This generic one cannot detect invalid page accesses immediately but
    invalid read access may cause invalid dereference by poisoned memory and
    invalid write access can be detected after a long delay.

    Signed-off-by: Akinobu Mita
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

05 Feb, 2008

1 commit


04 Jul, 2006

1 commit


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