13 Jul, 2017

1 commit

  • The add_device_randomness() function would ignore incoming bytes if the
    crng wasn't ready. This additionally makes sure to make an early enough
    call to add_latent_entropy() to influence the initial stack canary,
    which is especially important on non-x86 systems where it stays the same
    through the life of the boot.

    Link: http://lkml.kernel.org/r/20170626233038.GA48751@beast
    Signed-off-by: Kees Cook
    Cc: "Theodore Ts'o"
    Cc: Arnd Bergmann
    Cc: Greg Kroah-Hartman
    Cc: Ingo Molnar
    Cc: Jessica Yu
    Cc: Steven Rostedt (VMware)
    Cc: Viresh Kumar
    Cc: Tejun Heo
    Cc: Prarit Bhargava
    Cc: Lokesh Vutla
    Cc: Nicholas Piggin
    Cc: AKASHI Takahiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     

07 Jul, 2017

2 commits

  • Some hardened environments want to build kernels with slab_nomerge
    already set (so that they do not depend on remembering to set the kernel
    command line option). This is desired to reduce the risk of kernel heap
    overflows being able to overwrite objects from merged caches and changes
    the requirements for cache layout control, increasing the difficulty of
    these attacks. By keeping caches unmerged, these kinds of exploits can
    usually only damage objects in the same cache (though the risk to
    metadata exploitation is unchanged).

    Link: http://lkml.kernel.org/r/20170620230911.GA25238@beast
    Signed-off-by: Kees Cook
    Cc: Daniel Micay
    Cc: David Windsor
    Cc: Eric Biggers
    Cc: Christoph Lameter
    Cc: Jonathan Corbet
    Cc: Daniel Micay
    Cc: David Windsor
    Cc: Eric Biggers
    Cc: Pekka Enberg
    Cc: David Rientjes
    Cc: Joonsoo Kim
    Cc: "Rafael J. Wysocki"
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Mauro Carvalho Chehab
    Cc: "Paul E. McKenney"
    Cc: Arnd Bergmann
    Cc: Andy Lutomirski
    Cc: Nicolas Pitre
    Cc: Tejun Heo
    Cc: Daniel Mack
    Cc: Sebastian Andrzej Siewior
    Cc: Sergey Senozhatsky
    Cc: Helge Deller
    Cc: Rik van Riel
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • Pull cgroup changes from Tejun Heo:

    - Waiman made the debug controller work and a lot more useful on
    cgroup2

    - There were a couple issues with cgroup subtree delegation. The
    documentation on delegating to a non-root user was missing some part
    and cgroup namespace support wasn't factoring in delegation at all.
    The documentation is updated and the now there is a mount option to
    make cgroup namespace fit for delegation

    * 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
    cgroup: implement "nsdelegate" mount option
    cgroup: restructure cgroup_procs_write_permission()
    cgroup: "cgroup.subtree_control" should be writeable by delegatee
    cgroup: fix lockdep warning in debug controller
    cgroup: refactor cgroup_masks_read() in the debug controller
    cgroup: make debug an implicit controller on cgroup2
    cgroup: Make debug cgroup support v2 and thread mode
    cgroup: Make Kconfig prompt of debug cgroup more accurate
    cgroup: Move debug cgroup to its own file
    cgroup: Keep accurate count of tasks in each css_set

    Linus Torvalds
     

04 Jul, 2017

1 commit

  • Pull scheduler updates from Ingo Molnar:
    "The main changes in this cycle were:

    - Add the SYSTEM_SCHEDULING bootup state to move various scheduler
    debug checks earlier into the bootup. This turns silent and
    sporadically deadly bugs into nice, deterministic splats. Fix some
    of the splats that triggered. (Thomas Gleixner)

    - A round of restructuring and refactoring of the load-balancing and
    topology code (Peter Zijlstra)

    - Another round of consolidating ~20 of incremental scheduler code
    history: this time in terms of wait-queue nomenclature. (I didn't
    get much feedback on these renaming patches, and we can still
    easily change any names I might have misplaced, so if anyone hates
    a new name, please holler and I'll fix it.) (Ingo Molnar)

    - sched/numa improvements, fixes and updates (Rik van Riel)

    - Another round of x86/tsc scheduler clock code improvements, in hope
    of making it more robust (Peter Zijlstra)

    - Improve NOHZ behavior (Frederic Weisbecker)

    - Deadline scheduler improvements and fixes (Luca Abeni, Daniel
    Bristot de Oliveira)

    - Simplify and optimize the topology setup code (Lauro Ramos
    Venancio)

    - Debloat and decouple scheduler code some more (Nicolas Pitre)

    - Simplify code by making better use of llist primitives (Byungchul
    Park)

    - ... plus other fixes and improvements"

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (103 commits)
    sched/cputime: Refactor the cputime_adjust() code
    sched/debug: Expose the number of RT/DL tasks that can migrate
    sched/numa: Hide numa_wake_affine() from UP build
    sched/fair: Remove effective_load()
    sched/numa: Implement NUMA node level wake_affine()
    sched/fair: Simplify wake_affine() for the single socket case
    sched/numa: Override part of migrate_degrades_locality() when idle balancing
    sched/rt: Move RT related code from sched/core.c to sched/rt.c
    sched/deadline: Move DL related code from sched/core.c to sched/deadline.c
    sched/cpuset: Only offer CONFIG_CPUSETS if SMP is enabled
    sched/fair: Spare idle load balancing on nohz_full CPUs
    nohz: Move idle balancer registration to the idle path
    sched/loadavg: Generalize "_idle" naming to "_nohz"
    sched/core: Drop the unused try_get_task_struct() helper function
    sched/fair: WARN() and refuse to set buddy when !se->on_rq
    sched/debug: Fix SCHED_WARN_ON() to return a value on !CONFIG_SCHED_DEBUG as well
    sched/wait: Disambiguate wq_entry->task_list and wq_head->task_list naming
    sched/wait: Move bit_wait_table[] and related functionality from sched/core.c to sched/wait_bit.c
    sched/wait: Split out the wait_bit*() APIs from into
    sched/wait: Re-adjust macro line continuation backslashes in
    ...

    Linus Torvalds
     

23 Jun, 2017

1 commit

  • Make CONFIG_CPUSETS=y depend on SMP as this feature makes no sense
    on UP. This allows for configuring out cpuset_cpumask_can_shrink()
    and task_can_attach() entirely, which shrinks the kernel a bit.

    Signed-off-by: Nicolas Pitre
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20170614171926.8345-2-nicolas.pitre@linaro.org
    Signed-off-by: Ingo Molnar

    Nicolas Pitre
     

15 Jun, 2017

1 commit


09 Jun, 2017

6 commits

  • RCU's Kconfig options are scattered, and there are enough of them
    that it would be good for them to be more centralized. This commit
    therefore extracts RCU's Kconfig options from init/Kconfig into a new
    kernel/rcu/Kconfig file.

    Reported-by: Ingo Molnar
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • The CONFIG_RCU_NOCB_CPU_ALL, CONFIG_RCU_NOCB_CPU_NONE, and
    CONFIG_RCU_NOCB_CPU_ZERO Kconfig options are used only in testing and
    are redundant with the rcu_nocbs= boot parameter. This commit therefore
    removes these three Kconfig options and adjusts the rcutorture scripts
    to use the boot parameter instead.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • RCU's debugfs tracing used to be the only reasonable low-level debug
    information available, but ftrace and event tracing has since surpassed
    the RCU debugfs level of usefulness. This commit therefore removes
    RCU's debugfs tracing.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Classic SRCU was only ever intended to be a fallback in case of issues
    with Tree/Tiny SRCU, and the latter two are doing quite well in testing.
    This commit therefore removes Classic SRCU.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Anything that can be done with the RCU_KTHREAD_PRIO Kconfig option can
    also be done with the rcutree.kthread_prio kernel boot parameter.
    This commit therefore removes this Kconfig option.

    Reported-by: Linus Torvalds
    Signed-off-by: Paul E. McKenney
    Cc: Frederic Weisbecker
    Cc: Rik van Riel

    Paul E. McKenney
     
  • The rcu_segcblist structure provides quite a bit of functionality, and
    Tiny SRCU needs almost none of it. So this commit replaces Tiny SRCU's
    uses of rcu_segcblist with a simple singly linked list with tail pointer.
    This change significantly reduces Tiny SRCU's memory footprint, more
    than making up for the growth caused by the creation of rcu_segcblist.c

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     

08 Jun, 2017

1 commit

  • Commit d160a727c40e ("srcu: Make SRCU be built by default") in response
    to build errors, which were caused by code that included srcu.h
    despite !SRCU. However, srcutiny.o is almost 2K of code, which is not
    insignificant for those attempting to run the Linux kernel on IoT devices.
    This commit therefore makes SRCU be once again optional, and adjusts
    srcu.h to allow error-free inclusion in !SRCU kernel builds.

    Signed-off-by: Paul E. McKenney
    Acked-by: Nicolas Pitre

    Paul E. McKenney
     

23 May, 2017

2 commits

  • might_sleep() and smp_processor_id() checks are enabled after the boot
    process is done. That hides bugs in the SMP bringup and driver
    initialization code.

    Enable it right when the scheduler starts working, i.e. when init task and
    kthreadd have been created and right before the idle task enables
    preemption.

    Tested-by: Mark Rutland
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Mark Rutland
    Cc: Greg Kroah-Hartman
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/20170516184736.272225698@linutronix.de
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • Some of the boot code in init_kernel_freeable() which runs before SMP
    bringup assumes (rightfully) that it runs on the boot CPU and therefore can
    use smp_processor_id() in preemptible context.

    That works so far because the smp_processor_id() check starts to be
    effective after smp bringup. That's just wrong. Starting with SMP bringup
    and the ability to move threads around, smp_processor_id() in preemptible
    context is broken.

    Aside of that it does not make sense to allow init to run on all CPUs
    before sched_smp_init() has been run.

    Pin the init to the boot CPU so the existing code can continue to use
    smp_processor_id() without triggering the checks when the enabling of those
    checks starts earlier.

    Tested-by: Mark Rutland
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Greg Kroah-Hartman
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/20170516184734.943149935@linutronix.de
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     

11 May, 2017

1 commit

  • Pull RCU updates from Ingo Molnar:
    "The main changes are:

    - Debloat RCU headers

    - Parallelize SRCU callback handling (plus overlapping patches)

    - Improve the performance of Tree SRCU on a CPU-hotplug stress test

    - Documentation updates

    - Miscellaneous fixes"

    * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (74 commits)
    rcu: Open-code the rcu_cblist_n_lazy_cbs() function
    rcu: Open-code the rcu_cblist_n_cbs() function
    rcu: Open-code the rcu_cblist_empty() function
    rcu: Separately compile large rcu_segcblist functions
    srcu: Debloat the header
    srcu: Adjust default auto-expediting holdoff
    srcu: Specify auto-expedite holdoff time
    srcu: Expedite first synchronize_srcu() when idle
    srcu: Expedited grace periods with reduced memory contention
    srcu: Make rcutorture writer stalls print SRCU GP state
    srcu: Exact tracking of srcu_data structures containing callbacks
    srcu: Make SRCU be built by default
    srcu: Fix Kconfig botch when SRCU not selected
    rcu: Make non-preemptive schedule be Tasks RCU quiescent state
    srcu: Expedite srcu_schedule_cbs_snp() callback invocation
    srcu: Parallelize callback handling
    kvm: Move srcu_struct fields to end of struct kvm
    rcu: Fix typo in PER_RCU_NODE_PERIOD header comment
    rcu: Use true/false in assignment to bool
    rcu: Use bool value directly
    ...

    Linus Torvalds
     

09 May, 2017

3 commits

  • Pull tty/serial updates from Greg KH:
    "Here is the "big" TTY/Serial patch updates for 4.12-rc1

    Not a lot of new things here, the normal number of serial driver
    updates and additions, tiny bugs fixed, and some core files split up
    to make future changes a bit easier for Nicolas's "tiny-tty" work.

    All of these have been in linux-next for a while"

    * tag 'tty-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (62 commits)
    serial: small Makefile reordering
    tty: split job control support into a file of its own
    tty: move baudrate handling code to a file of its own
    console: move console_init() out of tty_io.c
    serial: 8250_early: Add earlycon support for Palmchip UART
    tty: pl011: use "qdf2400_e44" as the earlycon name for QDF2400 E44
    vt: make mouse selection of non-ASCII consistent
    vt: set mouse selection word-chars to gpm's default
    imx-serial: Reduce RX DMA startup latency when opening for reading
    serial: omap: suspend device on probe errors
    serial: omap: fix runtime-pm handling on unbind
    tty: serial: omap: add UPF_BOOT_AUTOCONF flag for DT init
    serial: samsung: Remove useless spinlock
    serial: samsung: Add missing checks for dma_map_single failure
    serial: samsung: Use right device for DMA-mapping calls
    serial: imx: setup DCEDTE early and ensure DCD and RI irqs to be off
    tty: fix comment typo s/repsonsible/responsible/
    tty: amba-pl011: Fix spurious TX interrupts
    serial: xuartps: Enable clocks in the pm disable case also
    serial: core: Re-use struct uart_port {name} field
    ...

    Linus Torvalds
     
  • sys_newlstat is a system call implementation that is meant for user
    space, and that copies kernel-internal data structure to the user
    format, which is not needed for in-kernel users.

    Further, as we rearrange the system call implementation so we can extend
    it with 64-bit time_t, the prototype for sys_newlstat changes.

    This changes the initramfs code to use vfs_lstat directly, to get it out
    of the way of the time_t changes, and make it slightly more efficient in
    the process. Along the same lines we also replace sys_stat and
    sys_stat64 with vfs_stat.

    Link: http://lkml.kernel.org/r/20170314214932.4052842-1-arnd@arndb.de
    Signed-off-by: Arnd Bergmann
    Cc: Alexander Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • Many "embedded" architectures provide CMDLINE_FORCE to allow the kernel
    to override the command line provided by an inflexible bootloader.
    However there is currrently no way for the kernel to override the
    initramfs image provided by the bootloader meaning there are still ways
    for bootloaders to make things difficult for us.

    Fix this by introducing INITRAMFS_FORCE which can prevent the kernel
    from loading the bootloader supplied image.

    We use CMDLINE_FORCE (and its friend CMDLINE_EXTEND) to imply that the
    system has an inflexible bootloader. This allow us to avoid presenting
    this config option to users of systems where inflexible bootloaders
    aren't usually a problem.

    Link: http://lkml.kernel.org/r/20170217121940.30126-1-daniel.thompson@linaro.org
    Signed-off-by: Daniel Thompson
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Thompson
     

07 May, 2017

1 commit

  • Commit 17a9be317475 ("initramfs: Always do fput() and load modules after
    rootfs populate") introduced an error for the

    CONFIG_BLK_DEV_RAM=y

    case, because even though the code looks fine, the compiler really wants
    a statement after a label, or you'll get complaints:

    init/initramfs.c: In function 'populate_rootfs':
    init/initramfs.c:644:2: error: label at end of compound statement

    That commit moved the subsequent statements to outside the compound
    statement, leaving the label without any associated statements.

    Reported-by: Jörg Otte
    Fixes: 17a9be317475 ("initramfs: Always do fput() and load modules after rootfs populate")
    Cc: Al Viro
    Cc: Stafford Horne
    Cc: stable@vger.kernel.org # if 17a9be317475 gets backported
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

06 May, 2017

1 commit

  • Pull initramfs fix from Stafford Horne:
    "This is a fix for an issue that has caused 4.11 to not boot on
    OpenRISC. I should have caught this during the 4.11 cycle but I had
    been busy on testing some other series of patches.

    I would have considered pushing it though a different path but Al Viro
    suggested submitting directly to you.

    Also, its just one as I havent really got anything else ready on my
    queue for 4.12.

    Summary:

    - Ensure fput() flush is done even for builtin initramfs"

    * tag 'initramfs-fix-4.12-rc1' of git://github.com/stffrdhrn/linux:
    initramfs: Always do fput() and load modules after rootfs populate

    Linus Torvalds
     

05 May, 2017

1 commit

  • In OpenRISC we do not have a bootloader passed initrd, but the built in
    initramfs does contain the /init and other binaries, including modules.
    The previous commit 08865514805d2 ("initramfs: finish fput() before
    accessing any binary from initramfs") made a change to only call fput()
    if the bootloader initrd was available, this caused intermittent crashes
    for OpenRISC.

    This patch changes the fput() to happen unconditionally if any rootfs is
    loaded. Also, I added some comments to make it a bit more clear why we
    call unpack_to_rootfs() multiple times.

    Fixes: 08865514805d2 ("initramfs: finish fput() before accessing any binary from initramfs")
    Cc: stable@vger.kernel.org
    Cc: Lokesh Vutla
    Cc: Al Viro
    Acked-by: Al Viro
    Signed-off-by: Stafford Horne

    Stafford Horne
     

04 May, 2017

1 commit

  • Pull tracing updates from Steven Rostedt:
    "New features for this release:

    - Pretty much a full rewrite of the processing of function plugins.
    i.e. echo do_IRQ:stacktrace > set_ftrace_filter

    - The rewrite was needed to add plugins to be unique to tracing
    instances. i.e. mkdir instance/foo; cd instances/foo; echo
    do_IRQ:stacktrace > set_ftrace_filter The old way was written very
    hacky. This removes a lot of those hacks.

    - New "function-fork" tracing option. When set, pids in the
    set_ftrace_pid will have their children added when the processes
    with their pids listed in the set_ftrace_pid file forks.

    - Exposure of "maxactive" for kretprobe in kprobe_events

    - Allow for builtin init functions to be traced by the function
    tracer (via the kernel command line). Module init function tracing
    will come in the next release.

    - Added more selftests, and have selftests also test in an instance"

    * tag 'trace-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (60 commits)
    ring-buffer: Return reader page back into existing ring buffer
    selftests: ftrace: Allow some event trigger tests to run in an instance
    selftests: ftrace: Have some basic tests run in a tracing instance too
    selftests: ftrace: Have event tests also run in an tracing instance
    selftests: ftrace: Make func_event_triggers and func_traceonoff_triggers tests do instances
    selftests: ftrace: Allow some tests to be run in a tracing instance
    tracing/ftrace: Allow for instances to trigger their own stacktrace probes
    tracing/ftrace: Allow for the traceonoff probe be unique to instances
    tracing/ftrace: Enable snapshot function trigger to work with instances
    tracing/ftrace: Allow instances to have their own function probes
    tracing/ftrace: Add a better way to pass data via the probe functions
    ftrace: Dynamically create the probe ftrace_ops for the trace_array
    tracing: Pass the trace_array into ftrace_probe_ops functions
    tracing: Have the trace_array hold the list of registered func probes
    ftrace: If the hash for a probe fails to update then free what was initialized
    ftrace: Have the function probes call their own function
    ftrace: Have each function probe use its own ftrace_ops
    ftrace: Have unregister_ftrace_function_probe_func() return a value
    ftrace: Add helper function ftrace_hash_move_and_update_ops()
    ftrace: Remove data field from ftrace_func_probe structure
    ...

    Linus Torvalds
     

03 May, 2017

1 commit

  • Pull trivial tree updates from Jiri Kosina.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
    tty: fix comment for __tty_alloc_driver()
    init/main: properly align the multi-line comment
    init/main: Fix double "the" in comment
    Fix dead URLs to ftp.kernel.org
    drivers: Clean up duplicated email address
    treewide: Fix typo in xml/driver-api/basics.xml
    tools/testing/selftests/powerpc: remove redundant CFLAGS in Makefile: "-Wall -O2 -Wall" -> "-O2 -Wall"
    selftests/timers: Spelling s/privledges/privileges/
    HID: picoLCD: Spelling s/REPORT_WRTIE_MEMORY/REPORT_WRITE_MEMORY/
    net: phy: dp83848: Fix Typo
    UBI: Fix typos
    Documentation: ftrace.txt: Correct nice value of 120 priority
    net: fec: Fix typo in error msg and comment
    treewide: Fix typos in printk

    Linus Torvalds
     

02 May, 2017

1 commit


24 Apr, 2017

4 commits

  • SRCU is optional, and included only if there is a "select SRCU" in effect.
    However, we now have Tiny SRCU, so this commit defaults CONFIG_SRCU=y.

    Reported-by: kbuild test robot
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Add a tab before it to follow standard practices. Also add the missing
    full stop '.'.

    Signed-off-by: Viresh Kumar
    Signed-off-by: Jiri Kosina

    Viresh Kumar
     
  • s/the\ the/the

    Signed-off-by: Viresh Kumar
    Signed-off-by: Jiri Kosina

    Viresh Kumar
     
  • If the CONFIG_SRCU option is not selected, for example, when building
    arch/tile allnoconfig, the following build errors appear:

    kernel/rcu/tree.o: In function `srcu_online_cpu':
    tree.c:(.text+0x4248): multiple definition of `srcu_online_cpu'
    kernel/rcu/srcutree.o:srcutree.c:(.text+0x2120): first defined here
    kernel/rcu/tree.o: In function `srcu_offline_cpu':
    tree.c:(.text+0x4250): multiple definition of `srcu_offline_cpu'
    kernel/rcu/srcutree.o:srcutree.c:(.text+0x2160): first defined here

    The corresponding .config file shows CONFIG_TREE_SRCU=y, but no sign
    of CONFIG_SRCU, which fatally confuses SRCU's #ifdefs, resulting in
    the above errors. The reason this occurs is the folowing line in
    init/Kconfig's definition for TREE_SRCU:

    default y if !TINY_RCU && !CLASSIC_SRCU

    If CONFIG_CLASSIC_SRCU=n, as it will be in for allnoconfig, and if
    CONFIG_SMP=y, then we will get CONFIG_TREE_SRCU=y but no CONFIG_SRCU,
    as seen in the .config file, and which will result in the above errors.
    This error did not show up during rcutorture testing because rcutorture
    forces CONFIG_SRCU=y, as it must to prevent build errors in rcutorture.c.

    This commit therefore conditions TREE_SRCU (and TINY_SRCU, while it is
    at it) with SRCU, like this:

    default y if SRCU && !TINY_RCU && !CLASSIC_SRCU

    Reported-by: kbuild test robot
    Reported-by: Ingo Molnar
    Signed-off-by: Paul E. McKenney
    Link: http://lkml.kernel.org/r/20170423162205.GP3956@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

23 Apr, 2017

1 commit


21 Apr, 2017

1 commit


20 Apr, 2017

1 commit


19 Apr, 2017

3 commits

  • The TREE_SRCU rewrite is large and a bit on the non-simple side, so
    this commit helps reduce risk by allowing the old v4.11 SRCU algorithm
    to be selected using a new CLASSIC_SRCU Kconfig option that depends
    on RCU_EXPERT. The default is to use the new TREE_SRCU and TINY_SRCU
    algorithms, in order to help get these the testing that they need.
    However, if your users do not require the update-side scalability that
    is to be provided by TREE_SRCU, select RCU_EXPERT and then CLASSIC_SRCU
    to revert back to the old classic SRCU algorithm.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • In response to automated complaints about modifications to SRCU
    increasing its size, this commit creates a tiny SRCU that is
    used in SMP=n && PREEMPT=n builds.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • All the console driver handling code lives in printk.c.
    Move console_init() there as well so console support can still be used
    when the TTY code is configured out. No logical changes from this patch.

    Signed-off-by: Nicolas Pitre
    Signed-off-by: Greg Kroah-Hartman

    Nicolas Pitre
     

04 Apr, 2017

1 commit

  • Relying on free_reserved_area() to call ftrace to free init memory proved to
    not be sufficient. The issue is that on x86, when debug_pagealloc is
    enabled, the init memory is not freed, but simply set as not present. Since
    ftrace was uninformed of this, starting function tracing still tries to
    update pages that are not present according to the page tables, causing
    ftrace to bug, as well as killing the kernel itself.

    Instead of relying on free_reserved_area(), have init/main.c call ftrace
    directly just before it frees the init memory. Then it needs to use
    __init_begin and __init_end to know where the init memory location is.
    Looking at all archs (and testing what I can), it appears that this should
    work for each of them.

    Reported-by: kernel test robot
    Reported-by: Fengguang Wu
    Signed-off-by: Steven Rostedt (VMware)

    Steven Rostedt (VMware)
     

01 Apr, 2017

1 commit

  • Yang Li has reported that drain_all_pages triggers a WARN_ON which means
    that this function is called earlier than the mm_percpu_wq is
    initialized on arm64 with CMA configured:

    WARNING: CPU: 2 PID: 1 at mm/page_alloc.c:2423 drain_all_pages+0x244/0x25c
    Modules linked in:
    CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.11.0-rc1-next-20170310-00027-g64dfbc5 #127
    Hardware name: Freescale Layerscape 2088A RDB Board (DT)
    task: ffffffc07c4a6d00 task.stack: ffffffc07c4a8000
    PC is at drain_all_pages+0x244/0x25c
    LR is at start_isolate_page_range+0x14c/0x1f0
    [...]
    drain_all_pages+0x244/0x25c
    start_isolate_page_range+0x14c/0x1f0
    alloc_contig_range+0xec/0x354
    cma_alloc+0x100/0x1fc
    dma_alloc_from_contiguous+0x3c/0x44
    atomic_pool_init+0x7c/0x208
    arm64_dma_init+0x44/0x4c
    do_one_initcall+0x38/0x128
    kernel_init_freeable+0x1a0/0x240
    kernel_init+0x10/0xfc
    ret_from_fork+0x10/0x20

    Fix this by moving the whole setup_vmstat which is an initcall right now
    to init_mm_internals which will be called right after the WQ subsystem
    is initialized.

    Link: http://lkml.kernel.org/r/20170315164021.28532-1-mhocko@kernel.org
    Signed-off-by: Michal Hocko
    Reported-by: Yang Li
    Tested-by: Yang Li
    Tested-by: Xiaolong Ye
    Cc: Mel Gorman
    Cc: Vlastimil Babka
    Cc: Tetsuo Handa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Hocko
     

25 Mar, 2017

2 commits


12 Mar, 2017

1 commit

  • Pull random updates from Ted Ts'o:
    "Change get_random_{int,log} to use the CRNG used by /dev/urandom and
    getrandom(2). It's faster and arguably more secure than cut-down MD5
    that we had been using.

    Also do some code cleanup"

    * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
    random: move random_min_urandom_seed into CONFIG_SYSCTL ifdef block
    random: convert get_random_int/long into get_random_u32/u64
    random: use chacha20 for get_random_int/long
    random: fix comment for unused random_min_urandom_seed
    random: remove variable limit
    random: remove stale urandom_init_wait
    random: remove stale maybe_reseed_primary_crng

    Linus Torvalds