01 Sep, 2020

1 commit

  • The .comment section doesn't belong in STABS_DEBUG. Split it out into a
    new macro named ELF_DETAILS. This will gain other non-debug sections
    that need to be accounted for when linking with --orphan-handling=warn.

    Signed-off-by: Kees Cook
    Signed-off-by: Ingo Molnar
    Cc: linux-arch@vger.kernel.org
    Link: https://lore.kernel.org/r/20200821194310.3089815-5-keescook@chromium.org

    Kees Cook
     

11 May, 2020

1 commit

  • An experimental patch series of mine reworks how warnings are processed
    in Kbuild. A side effect is a new warning about a harmless aliasing
    rule violation in an inline function:

    In file included from
    include/linux/rhashtable-types.h:15:0,
    from include/linux/ipc.h:7,
    from include/uapi/linux/sem.h:5,
    from include/linux/sem.h:5,
    from include/linux/sched.h:15,
    from include/linux/uaccess.h:6,
    from arch/parisc/boot/compressed/misc.c:7:
    include/linux/workqueue.h: In function 'work_static':
    include/linux/workqueue.h:212:2: warning: dereferencing
    type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
    return *work_data_bits(work) & WORK_STRUCT_STATIC;

    Make the decompressor use -fno-strict-aliasing like the rest of
    the kernel for consistency, and to ensure this warning never makes
    it into a release.

    Reported-by: kbuild test robot
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Helge Deller

    Arnd Bergmann
     

25 Mar, 2020

1 commit


12 Sep, 2019

1 commit


01 Aug, 2019

3 commits

  • Apparently we don't have an archclean target in our
    arch/parisc/Makefile, so files in there never get cleaned out by make
    mrproper. This, in turn means that the sizes.h file in
    arch/parisc/boot/compressed never gets removed and worse, when you
    transition to an O=build/parisc[64] build model it overrides the
    generated file. The upshot being my bzImage was building with a SZ_end
    that was too small.

    I fixed it by making mrproper clean everything.

    Signed-off-by: James Bottomley
    Cc: stable@vger.kernel.org # v4.20+
    Signed-off-by: Helge Deller

    James Bottomley
     
  • Same as on x86-64, strip the .comment, .note and debug sections from the
    Linux kernel before creating the compressed image for the boot loader.

    Reported-by: James Bottomley
    Reported-by: Sven Schnelle
    Cc: stable@vger.kernel.org # v4.20+
    Signed-off-by: Helge Deller

    Helge Deller
     
  • With debug info enabled (CONFIG_DEBUG_INFO=y) the resulting vmlinux may get
    that huge that we need to increase the start addresss for the decompression
    text section otherwise one will face a linker error.

    Reported-by: Sven Schnelle
    Tested-by: Sven Schnelle
    Cc: stable@vger.kernel.org # v4.14+
    Signed-off-by: Helge Deller

    Helge Deller
     

21 May, 2019

1 commit


06 May, 2019

1 commit


04 May, 2019

1 commit


22 Feb, 2019

1 commit


17 Oct, 2018

1 commit

  • Change the parisc vmlinuz boot code to include and process the real
    compressed vmlinux.gz ELF file instead of a compressed memory dump.
    This brings parisc in sync on how it's done on x86_64.

    The benefit of this change is that, e.g. for debugging purposes, one can
    then extract the vmlinux file out of the vmlinuz which was booted which
    wasn't possible before. This can be archieved with the existing
    scripts/extract-vmlinux script, which just needs a small tweak to prefer
    to extract a compressed file before trying the existing given binary.

    The downside of this approach is that due to the extra round of
    decompression/ELF processing we need more physical memory installed to
    be able to boot a kernel.

    Signed-off-by: Helge Deller

    Helge Deller
     

02 Feb, 2018

1 commit

  • Pull printk updates from Petr Mladek:

    - Add a console_msg_format command line option:

    The value "default" keeps the old "[time stamp] text\n" format. The
    value "syslog" allows to see the syslog-like "[timestamp] text" format.

    This feature was requested by people doing regression tests, for
    example, 0day robot. They want to have both filtered and full logs
    at hands.

    - Reduce the risk of softlockup:

    Pass the console owner in a busy loop.

    This is a new approach to the old problem. It was first proposed by
    Steven Rostedt on Kernel Summit 2017. It marks a context in which
    the console_lock owner calls console drivers and could not sleep.
    On the other side, printk() callers could detect this state and use
    a busy wait instead of a simple console_trylock(). Finally, the
    console_lock owner checks if there is a busy waiter at the end of
    the special context and eventually passes the console_lock to the
    waiter.

    The hand-off works surprisingly well and helps in many situations.
    Well, there is still a possibility of the softlockup, for example,
    when the flood of messages stops and the last owner still has too
    much to flush.

    There is increasing number of people having problems with
    printk-related softlockups. We might eventually need to get better
    solution. Anyway, this looks like a good start and promising
    direction.

    - Do not allow to schedule in console_unlock() called from printk():

    This reverts an older controversial commit. The reschedule helped
    to avoid softlockups. But it also slowed down the console output.
    This patch is obsoleted by the new console waiter logic described
    above. In fact, the reschedule made the hand-off less effective.

    - Deprecate "%pf" and "%pF" format specifier:

    It was needed on ia64, ppc64 and parisc64 to dereference function
    descriptors and show the real function address. It is done
    transparently by "%ps" and "pS" format specifier now.

    Sergey Senozhatsky found that all the function descriptors were in
    a special elf section and could be easily detected.

    - Remove printk_symbol() API:

    It has been obsoleted by "%pS" format specifier, and this change
    helped to remove few continuous lines and a less intuitive old API.

    - Remove redundant memsets:

    Sergey removed unnecessary memset when processing printk.devkmsg
    command line option.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: (27 commits)
    printk: drop redundant devkmsg_log_str memsets
    printk: Never set console_may_schedule in console_trylock()
    printk: Hide console waiter logic into helpers
    printk: Add console owner and waiter logic to load balance console writes
    kallsyms: remove print_symbol() function
    checkpatch: add pF/pf deprecation warning
    symbol lookup: introduce dereference_symbol_descriptor()
    parisc64: Add .opd based function descriptor dereference
    powerpc64: Add .opd based function descriptor dereference
    ia64: Add .opd based function descriptor dereference
    sections: split dereference_function_descriptor()
    openrisc: Fix conflicting types for _exext and _stext
    lib: do not use print_symbol()
    irq debug: do not use print_symbol()
    sysfs: do not use print_symbol()
    drivers: do not use print_symbol()
    x86: do not use print_symbol()
    unicore32: do not use print_symbol()
    sh: do not use print_symbol()
    mn10300: do not use print_symbol()
    ...

    Linus Torvalds
     

09 Jan, 2018

1 commit

  • We are moving towards separate kernel and module function descriptor
    dereference callbacks. This patch enables it for parisc64.

    For pointers that belong to the kernel
    - Added __start_opd and __end_opd pointers, to track the kernel
    .opd section address range;

    - Added dereference_kernel_function_descriptor(). Now we
    will dereference only function pointers that are within
    [__start_opd, __end_opd);

    For pointers that belong to a module
    - Added dereference_module_function_descriptor() to handle module
    function descriptor dereference. Now we will dereference only
    pointers that are within [module->opd.start, module->opd.end).

    Link: http://lkml.kernel.org/r/20171109234830.5067-5-sergey.senozhatsky@gmail.com
    To: Tony Luck
    To: Fenghua Yu
    To: Helge Deller
    To: Benjamin Herrenschmidt
    To: Paul Mackerras
    To: Michael Ellerman
    To: James Bottomley
    Cc: Andrew Morton
    Cc: Jessica Yu
    Cc: Steven Rostedt
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-parisc@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Sergey Senozhatsky
    Tested-by: Helge Deller #parisc64
    Signed-off-by: Petr Mladek

    Sergey Senozhatsky
     

18 Dec, 2017

1 commit

  • Static analysis tools complain that we intended to have curly braces
    around this indent block. In this case this assumption is wrong, so fix
    the indenting.

    Fixes: 2f3c7b8137ef ("parisc: Add core code for self-extracting kernel")
    Reported-by: Dan Carpenter
    Signed-off-by: Helge Deller
    Cc: # v4.14+

    Helge Deller
     

23 Sep, 2017

1 commit

  • gcc-7 optimizes the byte-wise accesses of get_unaligned_le32() into
    word-wise accesses if the 32-bit integer output_len is declared as
    external. This panics then the bootloader since we don't have the
    unaligned access fault trap handler installed during boot time.

    Avoid this optimization by declaring output_len as byte-aligned and thus
    unbreak the bootloader code.

    Additionally, compile the boot code optimized for size.

    Signed-off-by: Helge Deller

    Helge Deller
     

22 Aug, 2017

1 commit