05 Mar, 2020

1 commit

  • commit fcbb8461fd2376ba3782b5b8bd440c929b8e4980 upstream.

    There are both positive and negative options about this feature.
    At first, I thought it was a good idea, but actually Linus stated a
    negative opinion (https://lkml.org/lkml/2019/9/29/227). I admit it
    is ugly and annoying.

    The baseline I'd like to keep is the compile-test of uapi headers.
    (Otherwise, kernel developers have no way to ensure the correctness
    of the exported headers.)

    I will maintain a small build rule in usr/include/Makefile.
    Remove the other header test functionality.

    Signed-off-by: Masahiro Yamada
    [ added to 5.4.y due to start of build warnings from backported patches
    because of this feature - gregkh]
    Signed-off-by: Greg Kroah-Hartman

    Masahiro Yamada
     

01 Feb, 2020

1 commit

  • commit 87c9366e17259040a9118e06b6dc8de986e5d3d1 upstream.

    This reverts commit 786b2384bf1c ("um: Enable CONFIG_CONSTRUCTORS").

    There are two issues with this commit, uncovered by Anton in tests
    on some (Debian) systems:

    1) I completely forgot to call any constructors if CONFIG_CONSTRUCTORS
    isn't set. Don't recall now if it just wasn't needed on my system, or
    if I never tested this case.

    2) With that fixed, it works - with CONFIG_CONSTRUCTORS *unset*. If I
    set CONFIG_CONSTRUCTORS, it fails again, which isn't totally
    unexpected since whatever wanted to run is likely to have to run
    before the kernel init etc. that calls the constructors in this case.

    Basically, some constructors that gcc emits (libc has?) need to run
    very early during init; the failure mode otherwise was that the ptrace
    fork test already failed:

    ----------------------
    $ ./linux mem=512M
    Core dump limits :
    soft - 0
    hard - NONE
    Checking that ptrace can change system call numbers...check_ptrace : child exited with exitcode 6, while expecting 0; status 0x67f
    Aborted
    ----------------------

    Thinking more about this, it's clear that we simply cannot support
    CONFIG_CONSTRUCTORS in UML. All the cases we need now (gcov, kasan)
    involve not use of the __attribute__((constructor)), but instead
    some constructor code/entry generated by gcc. Therefore, we cannot
    distinguish between kernel constructors and system constructors.

    Thus, revert this commit.

    Cc: stable@vger.kernel.org [5.4+]
    Fixes: 786b2384bf1c ("um: Enable CONFIG_CONSTRUCTORS")
    Reported-by: Anton Ivanov
    Signed-off-by: Johannes Berg
    Acked-by: Anton Ivanov
    Signed-off-by: Greg Kroah-Hartman

    Signed-off-by: Richard Weinberger

    Johannes Berg
     

28 Sep, 2019

2 commits

  • Pull kernel lockdown mode from James Morris:
    "This is the latest iteration of the kernel lockdown patchset, from
    Matthew Garrett, David Howells and others.

    From the original description:

    This patchset introduces an optional kernel lockdown feature,
    intended to strengthen the boundary between UID 0 and the kernel.
    When enabled, various pieces of kernel functionality are restricted.
    Applications that rely on low-level access to either hardware or the
    kernel may cease working as a result - therefore this should not be
    enabled without appropriate evaluation beforehand.

    The majority of mainstream distributions have been carrying variants
    of this patchset for many years now, so there's value in providing a
    doesn't meet every distribution requirement, but gets us much closer
    to not requiring external patches.

    There are two major changes since this was last proposed for mainline:

    - Separating lockdown from EFI secure boot. Background discussion is
    covered here: https://lwn.net/Articles/751061/

    - Implementation as an LSM, with a default stackable lockdown LSM
    module. This allows the lockdown feature to be policy-driven,
    rather than encoding an implicit policy within the mechanism.

    The new locked_down LSM hook is provided to allow LSMs to make a
    policy decision around whether kernel functionality that would allow
    tampering with or examining the runtime state of the kernel should be
    permitted.

    The included lockdown LSM provides an implementation with a simple
    policy intended for general purpose use. This policy provides a coarse
    level of granularity, controllable via the kernel command line:

    lockdown={integrity|confidentiality}

    Enable the kernel lockdown feature. If set to integrity, kernel features
    that allow userland to modify the running kernel are disabled. If set to
    confidentiality, kernel features that allow userland to extract
    confidential information from the kernel are also disabled.

    This may also be controlled via /sys/kernel/security/lockdown and
    overriden by kernel configuration.

    New or existing LSMs may implement finer-grained controls of the
    lockdown features. Refer to the lockdown_reason documentation in
    include/linux/security.h for details.

    The lockdown feature has had signficant design feedback and review
    across many subsystems. This code has been in linux-next for some
    weeks, with a few fixes applied along the way.

    Stephen Rothwell noted that commit 9d1f8be5cf42 ("bpf: Restrict bpf
    when kernel lockdown is in confidentiality mode") is missing a
    Signed-off-by from its author. Matthew responded that he is providing
    this under category (c) of the DCO"

    * 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (31 commits)
    kexec: Fix file verification on S390
    security: constify some arrays in lockdown LSM
    lockdown: Print current->comm in restriction messages
    efi: Restrict efivar_ssdt_load when the kernel is locked down
    tracefs: Restrict tracefs when the kernel is locked down
    debugfs: Restrict debugfs when the kernel is locked down
    kexec: Allow kexec_file() with appropriate IMA policy when locked down
    lockdown: Lock down perf when in confidentiality mode
    bpf: Restrict bpf when kernel lockdown is in confidentiality mode
    lockdown: Lock down tracing and perf kprobes when in confidentiality mode
    lockdown: Lock down /proc/kcore
    x86/mmiotrace: Lock down the testmmiotrace module
    lockdown: Lock down module params that specify hardware parameters (eg. ioport)
    lockdown: Lock down TIOCSSERIAL
    lockdown: Prohibit PCMCIA CIS storage when the kernel is locked down
    acpi: Disable ACPI table override if the kernel is locked down
    acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down
    ACPI: Limit access to custom_method when the kernel is locked down
    x86/msr: Restrict MSR access when the kernel is locked down
    x86: Lock down IO port access when the kernel is locked down
    ...

    Linus Torvalds
     
  • Pull integrity updates from Mimi Zohar:
    "The major feature in this time is IMA support for measuring and
    appraising appended file signatures. In addition are a couple of bug
    fixes and code cleanup to use struct_size().

    In addition to the PE/COFF and IMA xattr signatures, the kexec kernel
    image may be signed with an appended signature, using the same
    scripts/sign-file tool that is used to sign kernel modules.

    Similarly, the initramfs may contain an appended signature.

    This contained a lot of refactoring of the existing appended signature
    verification code, so that IMA could retain the existing framework of
    calculating the file hash once, storing it in the IMA measurement list
    and extending the TPM, verifying the file's integrity based on a file
    hash or signature (eg. xattrs), and adding an audit record containing
    the file hash, all based on policy. (The IMA support for appended
    signatures patch set was posted and reviewed 11 times.)

    The support for appended signature paves the way for adding other
    signature verification methods, such as fs-verity, based on a single
    system-wide policy. The file hash used for verifying the signature and
    the signature, itself, can be included in the IMA measurement list"

    * 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
    ima: ima_api: Use struct_size() in kzalloc()
    ima: use struct_size() in kzalloc()
    sefltest/ima: support appended signatures (modsig)
    ima: Fix use after free in ima_read_modsig()
    MODSIGN: make new include file self contained
    ima: fix freeing ongoing ahash_request
    ima: always return negative code for error
    ima: Store the measurement again when appraising a modsig
    ima: Define ima-modsig template
    ima: Collect modsig
    ima: Implement support for module-style appended signatures
    ima: Factor xattr_verify() out of ima_appraise_measurement()
    ima: Add modsig appraise_type option for module-style appended signatures
    integrity: Select CONFIG_KEYS instead of depending on it
    PKCS#7: Introduce pkcs7_get_digest()
    PKCS#7: Refactor verify_pkcs7_signature()
    MODSIGN: Export module signature definitions
    ima: initialize the "template" field with the default template

    Linus Torvalds
     

23 Sep, 2019

1 commit

  • Pull modules updates from Jessica Yu:
    "The main bulk of this pull request introduces a new exported symbol
    namespaces feature. The number of exported symbols is increasingly
    growing with each release (we're at about 31k exports as of 5.3-rc7)
    and we currently have no way of visualizing how these symbols are
    "clustered" or making sense of this huge export surface.

    Namespacing exported symbols allows kernel developers to more
    explicitly partition and categorize exported symbols, as well as more
    easily limiting the availability of namespaced symbols to other parts
    of the kernel. For starters, we have introduced the USB_STORAGE
    namespace to demonstrate the API's usage. I have briefly summarized
    the feature and its main motivations in the tag below.

    Summary:

    - Introduce exported symbol namespaces.

    This new feature allows subsystem maintainers to partition and
    categorize their exported symbols into explicit namespaces. Module
    authors are now required to import the namespaces they need.

    Some of the main motivations of this feature include: allowing
    kernel developers to better manage the export surface, allow
    subsystem maintainers to explicitly state that usage of some
    exported symbols should only be limited to certain users (think:
    inter-module or inter-driver symbols, debugging symbols, etc), as
    well as more easily limiting the availability of namespaced symbols
    to other parts of the kernel.

    With the module import requirement, it is also easier to spot the
    misuse of exported symbols during patch review.

    Two new macros are introduced: EXPORT_SYMBOL_NS() and
    EXPORT_SYMBOL_NS_GPL(). The API is thoroughly documented in
    Documentation/kbuild/namespaces.rst.

    - Some small code and kbuild cleanups here and there"

    * tag 'modules-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
    module: Remove leftover '#undef' from export header
    module: remove unneeded casts in cmp_name()
    module: move CONFIG_UNUSED_SYMBOLS to the sub-menu of MODULES
    module: remove redundant 'depends on MODULES'
    module: Fix link failure due to invalid relocation on namespace offset
    usb-storage: export symbols in USB_STORAGE namespace
    usb-storage: remove single-use define for debugging
    docs: Add documentation for Symbol Namespaces
    scripts: Coccinelle script for namespace dependencies.
    modpost: add support for generating namespace dependencies
    export: allow definition default namespaces in Makefiles or sources
    module: add config option MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
    modpost: add support for symbol namespaces
    module: add support for symbol namespaces.
    export: explicitly align struct kernel_symbol
    module: support reading multiple values per modinfo tag

    Linus Torvalds
     

22 Sep, 2019

2 commits

  • Pull UML updates from Richard Weinberger:

    - virtio support

    - fixes for our new time travel mode

    - various improvements to make lockdep and kasan work better

    - SPDX header updates

    * tag 'for-linus-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: (25 commits)
    um: irq: Fix LAST_IRQ usage in init_IRQ()
    um: Add SPDX headers for files in arch/um/include
    um: Add SPDX headers for files in arch/um/os-Linux
    um: Add SPDX headers to files in arch/um/kernel/
    um: Add SPDX headers for files in arch/um/drivers
    um: virtio: Implement VHOST_USER_PROTOCOL_F_REPLY_ACK
    um: virtio: Implement VHOST_USER_PROTOCOL_F_SLAVE_REQ
    um: drivers: Add virtio vhost-user driver
    um: Use real DMA barriers
    um: Don't use generic barrier.h
    um: time-travel: Restrict time update in IRQ handler
    um: time-travel: Fix periodic timers
    um: Enable CONFIG_CONSTRUCTORS
    um: Place (soft)irq text with macros
    um: Fix VDSO compiler warning
    um: Implement TRACE_IRQFLAGS_SUPPORT
    um: Remove misleading #define ARCh_IRQ_ENABLED
    um: Avoid using uninitialized regs
    um: Remove sig_info[SIGALRM]
    um: Error handling fixes in vector drivers
    ...

    Linus Torvalds
     
  • Pull asm inline support from Miguel Ojeda:
    "Make use of gcc 9's "asm inline()" (Rasmus Villemoes):

    gcc 9+ (and gcc 8.3, 7.5) provides a way to override the otherwise
    crude heuristic that gcc uses to estimate the size of the code
    represented by an asm() statement. From the gcc docs

    If you use 'asm inline' instead of just 'asm', then for inlining
    purposes the size of the asm is taken as the minimum size, ignoring
    how many instructions GCC thinks it is.

    For compatibility with older compilers, we obviously want a

    #if [understands asm inline]
    #define asm_inline asm inline
    #else
    #define asm_inline asm
    #endif

    But since we #define the identifier inline to attach some attributes,
    we have to use an alternate spelling of that keyword. gcc provides
    both __inline__ and __inline, and we currently #define both to inline,
    so they all have the same semantics.

    We have to free up one of __inline__ and __inline, and the latter is
    by far the easiest.

    The two x86 changes cause smaller code gen differences than I'd
    expect, but I think we do want the asm_inline thing available sooner
    or later, so this is just to get the ball rolling"

    * tag 'compiler-attributes-for-linus-v5.4' of git://github.com/ojeda/linux:
    x86: bug.h: use asm_inline in _BUG_FLAGS definitions
    x86: alternative.h: use asm_inline for all alternative variants
    compiler-types.h: add asm_inline definition
    compiler_types.h: don't #define __inline
    lib/zstd/mem.h: replace __inline by inline
    staging: rtl8723bs: replace __inline by inline

    Linus Torvalds
     

20 Sep, 2019

1 commit

  • Pull Kbuild updates from Masahiro Yamada:

    - add modpost warn exported symbols marked as 'static' because 'static'
    and EXPORT_SYMBOL is an odd combination

    - break the build early if gold linker is used

    - optimize the Bison rule to produce .c and .h files by a single
    pattern rule

    - handle PREEMPT_RT in the module vermagic and UTS_VERSION

    - warn CONFIG options leaked to the user-space except existing ones

    - make single targets work properly

    - rebuild modules when module linker scripts are updated

    - split the module final link stage into scripts/Makefile.modfinal

    - fix the missed error code in merge_config.sh

    - improve the error message displayed on the attempt of the O= build in
    unclean source tree

    - remove 'clean-dirs' syntax

    - disable -Wimplicit-fallthrough warning for Clang

    - add CONFIG_CC_OPTIMIZE_FOR_SIZE_O3 for ARC

    - remove ARCH_{CPP,A,C}FLAGS variables

    - add $(BASH) to run bash scripts

    - change *CFLAGS_.o to take the relative path to $(obj)
    instead of the basename

    - stop suppressing Clang's -Wunused-function warnings when W=1

    - fix linux/export.h to avoid genksyms calculating CRC of trimmed
    exported symbols

    - misc cleanups

    * tag 'kbuild-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (63 commits)
    genksyms: convert to SPDX License Identifier for lex.l and parse.y
    modpost: use __section in the output to *.mod.c
    modpost: use MODULE_INFO() for __module_depends
    export.h, genksyms: do not make genksyms calculate CRC of trimmed symbols
    export.h: remove defined(__KERNEL__), which is no longer needed
    kbuild: allow Clang to find unused static inline functions for W=1 build
    kbuild: rename KBUILD_ENABLE_EXTRA_GCC_CHECKS to KBUILD_EXTRA_WARN
    kbuild: refactor scripts/Makefile.extrawarn
    merge_config.sh: ignore unwanted grep errors
    kbuild: change *FLAGS_.o to take the path relative to $(obj)
    modpost: add NOFAIL to strndup
    modpost: add guid_t type definition
    kbuild: add $(BASH) to run scripts with bash-extension
    kbuild: remove ARCH_{CPP,A,C}FLAGS
    kbuild,arc: add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC
    kbuild: Do not enable -Wimplicit-fallthrough for clang for now
    kbuild: clean up subdir-ymn calculation in Makefile.clean
    kbuild: remove unneeded '+' marker from cmd_clean
    kbuild: remove clean-dirs syntax
    kbuild: check clean srctree even earlier
    ...

    Linus Torvalds
     

17 Sep, 2019

1 commit

  • Pull scheduler updates from Ingo Molnar:

    - MAINTAINERS: Add Mark Rutland as perf submaintainer, Juri Lelli and
    Vincent Guittot as scheduler submaintainers. Add Dietmar Eggemann,
    Steven Rostedt, Ben Segall and Mel Gorman as scheduler reviewers.

    As perf and the scheduler is getting bigger and more complex,
    document the status quo of current responsibilities and interests,
    and spread the review pain^H^H^H^H fun via an increase in the Cc:
    linecount generated by scripts/get_maintainer.pl. :-)

    - Add another series of patches that brings the -rt (PREEMPT_RT) tree
    closer to mainline: split the monolithic CONFIG_PREEMPT dependencies
    into a new CONFIG_PREEMPTION category that will allow the eventual
    introduction of CONFIG_PREEMPT_RT. Still a few more hundred patches
    to go though.

    - Extend the CPU cgroup controller with uclamp.min and uclamp.max to
    allow the finer shaping of CPU bandwidth usage.

    - Micro-optimize energy-aware wake-ups from O(CPUS^2) to O(CPUS).

    - Improve the behavior of high CPU count, high thread count
    applications running under cpu.cfs_quota_us constraints.

    - Improve balancing with SCHED_IDLE (SCHED_BATCH) tasks present.

    - Improve CPU isolation housekeeping CPU allocation NUMA locality.

    - Fix deadline scheduler bandwidth calculations and logic when cpusets
    rebuilds the topology, or when it gets deadline-throttled while it's
    being offlined.

    - Convert the cpuset_mutex to percpu_rwsem, to allow it to be used from
    setscheduler() system calls without creating global serialization.
    Add new synchronization between cpuset topology-changing events and
    the deadline acceptance tests in setscheduler(), which were broken
    before.

    - Rework the active_mm state machine to be less confusing and more
    optimal.

    - Rework (simplify) the pick_next_task() slowpath.

    - Improve load-balancing on AMD EPYC systems.

    - ... and misc cleanups, smaller fixes and improvements - please see
    the Git log for more details.

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (53 commits)
    sched/psi: Correct overly pessimistic size calculation
    sched/fair: Speed-up energy-aware wake-ups
    sched/uclamp: Always use 'enum uclamp_id' for clamp_id values
    sched/uclamp: Update CPU's refcount on TG's clamp changes
    sched/uclamp: Use TG's clamps to restrict TASK's clamps
    sched/uclamp: Propagate system defaults to the root group
    sched/uclamp: Propagate parent clamps
    sched/uclamp: Extend CPU's cgroup controller
    sched/topology: Improve load balancing on AMD EPYC systems
    arch, ia64: Make NUMA select SMP
    sched, perf: MAINTAINERS update, add submaintainers and reviewers
    sched/fair: Use rq_lock/unlock in online_fair_sched_group
    cpufreq: schedutil: fix equation in comment
    sched: Rework pick_next_task() slow-path
    sched: Allow put_prev_task() to drop rq->lock
    sched/fair: Expose newidle_balance()
    sched: Add task_struct pointer to sched_class::set_curr_task
    sched: Rework CPU hotplug task selection
    sched/{rt,deadline}: Fix set_next_task vs pick_next_task
    sched: Fix kerneldoc comment for ia64_set_curr_task
    ...

    Linus Torvalds
     

16 Sep, 2019

2 commits

  • We do need to call the constructors for *modules*, and
    at least for KASAN in the future, we must call even the
    kernel constructors only later when the kernel has been
    initialized.

    Instead of relying on libc to call them, emit an empty
    section for libc and let the kernel's CONSTRUCTORS code
    do the rest of the job.

    Tested that it indeed doesn't work in modules, and does
    work after the fixes in both, with a few functions with
    __attribute__((constructor)) in both dynamic and static
    builds.

    Signed-off-by: Johannes Berg
    Signed-off-by: Richard Weinberger

    Johannes Berg
     
  • This adds an asm_inline macro which expands to "asm inline" [1] when
    the compiler supports it. This is currently gcc 9.1+, gcc 8.3
    and (once released) gcc 7.5 [2]. It expands to just "asm" for other
    compilers.

    Using asm inline("foo") instead of asm("foo") overrules gcc's
    heuristic estimate of the size of the code represented by the asm()
    statement, and makes gcc use the minimum possible size instead. That
    can in turn affect gcc's inlining decisions.

    I wasn't sure whether to make this a function-like macro or not - this
    way, it can be combined with volatile as

    asm_inline volatile()

    but perhaps we'd prefer to spell that

    asm_inline_volatile()

    anyway.

    The Kconfig logic is taken from an RFC patch by Masahiro Yamada [3].

    [1] Technically, asm __inline, since both inline and __inline__
    are macros that attach various attributes, making gcc barf if one
    literally does "asm inline()". However, the third spelling __inline is
    available for referring to the bare keyword.

    [2] https://lore.kernel.org/lkml/20190907001411.GG9749@gate.crashing.org/

    [3] https://lore.kernel.org/lkml/1544695154-15250-1-git-send-email-yamada.masahiro@socionext.com/

    Signed-off-by: Rasmus Villemoes
    Signed-off-by: Miguel Ojeda

    Rasmus Villemoes
     

12 Sep, 2019

2 commits


10 Sep, 2019

1 commit

  • If MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is enabled (default=n), the
    requirement for modules to import all namespaces that are used by
    the module is relaxed.

    Enabling this option effectively allows (invalid) modules to be loaded
    while only a warning is emitted.

    Disabling this option keeps the enforcement at module loading time and
    loading is denied if the module's imports are not satisfactory.

    Reviewed-by: Martijn Coenen
    Reviewed-by: Greg Kroah-Hartman
    Signed-off-by: Matthias Maennich
    Signed-off-by: Jessica Yu

    Matthias Maennich
     

04 Sep, 2019

1 commit

  • arch/arc/Makefile overrides -O2 with -O3. This is the only user of
    ARCH_CFLAGS. There is no user of ARCH_CPPFLAGS or ARCH_AFLAGS.
    My plan is to remove ARCH_{CPP,A,C}FLAGS after refactoring the ARC
    Makefile.

    Currently, ARC has no way to enable -Wmaybe-uninitialized because both
    -O3 and -Os disable it. Enabling it will be useful for compile-testing.
    This commit allows allmodconfig (, which defaults to -O2) to enable it.

    Add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y to all the defconfig files
    in arch/arc/configs/ in order to keep the current config settings.

    Signed-off-by: Masahiro Yamada
    Acked-by: Vineet Gupta

    Masahiro Yamada
     

03 Sep, 2019

1 commit

  • The cgroup CPU bandwidth controller allows to assign a specified
    (maximum) bandwidth to the tasks of a group. However this bandwidth is
    defined and enforced only on a temporal base, without considering the
    actual frequency a CPU is running on. Thus, the amount of computation
    completed by a task within an allocated bandwidth can be very different
    depending on the actual frequency the CPU is running that task.
    The amount of computation can be affected also by the specific CPU a
    task is running on, especially when running on asymmetric capacity
    systems like Arm's big.LITTLE.

    With the availability of schedutil, the scheduler is now able
    to drive frequency selections based on actual task utilization.
    Moreover, the utilization clamping support provides a mechanism to
    bias the frequency selection operated by schedutil depending on
    constraints assigned to the tasks currently RUNNABLE on a CPU.

    Giving the mechanisms described above, it is now possible to extend the
    cpu controller to specify the minimum (or maximum) utilization which
    should be considered for tasks RUNNABLE on a cpu.
    This makes it possible to better defined the actual computational
    power assigned to task groups, thus improving the cgroup CPU bandwidth
    controller which is currently based just on time constraints.

    Extend the CPU controller with a couple of new attributes uclamp.{min,max}
    which allow to enforce utilization boosting and capping for all the
    tasks in a group.

    Specifically:

    - uclamp.min: defines the minimum utilization which should be considered
    i.e. the RUNNABLE tasks of this group will run at least at a
    minimum frequency which corresponds to the uclamp.min
    utilization

    - uclamp.max: defines the maximum utilization which should be considered
    i.e. the RUNNABLE tasks of this group will run up to a
    maximum frequency which corresponds to the uclamp.max
    utilization

    These attributes:

    a) are available only for non-root nodes, both on default and legacy
    hierarchies, while system wide clamps are defined by a generic
    interface which does not depends on cgroups. This system wide
    interface enforces constraints on tasks in the root node.

    b) enforce effective constraints at each level of the hierarchy which
    are a restriction of the group requests considering its parent's
    effective constraints. Root group effective constraints are defined
    by the system wide interface.
    This mechanism allows each (non-root) level of the hierarchy to:
    - request whatever clamp values it would like to get
    - effectively get only up to the maximum amount allowed by its parent

    c) have higher priority than task-specific clamps, defined via
    sched_setattr(), thus allowing to control and restrict task requests.

    Add two new attributes to the cpu controller to collect "requested"
    clamp values. Allow that at each non-root level of the hierarchy.
    Keep it simple by not caring now about "effective" values computation
    and propagation along the hierarchy.

    Update sysctl_sched_uclamp_handler() to use the newly introduced
    uclamp_mutex so that we serialize system default updates with cgroup
    relate updates.

    Signed-off-by: Patrick Bellasi
    Signed-off-by: Peter Zijlstra (Intel)
    Reviewed-by: Michal Koutny
    Acked-by: Tejun Heo
    Cc: Alessio Balsini
    Cc: Dietmar Eggemann
    Cc: Joel Fernandes
    Cc: Juri Lelli
    Cc: Linus Torvalds
    Cc: Morten Rasmussen
    Cc: Paul Turner
    Cc: Peter Zijlstra
    Cc: Quentin Perret
    Cc: Rafael J . Wysocki
    Cc: Steve Muckle
    Cc: Suren Baghdasaryan
    Cc: Thomas Gleixner
    Cc: Todd Kjos
    Cc: Vincent Guittot
    Cc: Viresh Kumar
    Link: https://lkml.kernel.org/r/20190822132811.31294-2-patrick.bellasi@arm.com
    Signed-off-by: Ingo Molnar

    Patrick Bellasi
     

29 Aug, 2019

1 commit

  • CONFIG_CC_OPTIMIZE_FOR_SIZE was originally an independent boolean
    option, but commit 877417e6ffb9 ("Kbuild: change CC_OPTIMIZE_FOR_SIZE
    definition") turned it into a choice between _PERFORMANCE and _SIZE.

    The phrase "If unsure, say N." sounds like an independent option.
    Reword the help text to make it appropriate for the choice menu.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

22 Aug, 2019

1 commit

  • Add CONFIG_ASM_MODVERSIONS. This allows to remove one if-conditional
    nesting in scripts/Makefile.build.

    scripts/Makefile.build is run every time Kbuild descends into a
    sub-directory. So, I want to avoid $(wildcard ...) evaluation
    where possible although computing $(wildcard ...) is so cheap that
    it may not make measurable performance difference.

    Signed-off-by: Masahiro Yamada
    Acked-by: Geert Uytterhoeven

    Masahiro Yamada
     

20 Aug, 2019

2 commits

  • This reverts commit 71c67a31f09fa8fdd1495dffd96a5f0d4cef2ede.

    Commit 117acf5c29dd ("powerpc/Makefile: Always pass --synthetic to nm if
    supported") removed the only conditional definition of $(NM), so we can
    revert our temporary bodge to avoid Kconfig recursion and go back to
    passing $(NM) through to the 'tools-support-relr.sh' when detecting
    support for RELR relocations.

    Signed-off-by: Will Deacon

    Will Deacon
     
  • If the kernel is locked down, require that all modules have valid
    signatures that we can verify.

    I have adjusted the errors generated:

    (1) If there's no signature (ENODATA) or we can't check it (ENOPKG,
    ENOKEY), then:

    (a) If signatures are enforced then EKEYREJECTED is returned.

    (b) If there's no signature or we can't check it, but the kernel is
    locked down then EPERM is returned (this is then consistent with
    other lockdown cases).

    (2) If the signature is unparseable (EBADMSG, EINVAL), the signature fails
    the check (EKEYREJECTED) or a system error occurs (eg. ENOMEM), we
    return the error we got.

    Note that the X.509 code doesn't check for key expiry as the RTC might not
    be valid or might not have been transferred to the kernel's clock yet.

    [Modified by Matthew Garrett to remove the IMA integration. This will
    be replaced with integration with the IMA architecture policy
    patchset.]

    Signed-off-by: David Howells
    Signed-off-by: Matthew Garrett
    Reviewed-by: Kees Cook
    Cc: Jessica Yu
    Signed-off-by: James Morris

    David Howells
     

07 Aug, 2019

1 commit

  • Commit 5cf896fb6be3 ("arm64: Add support for relocating the kernel with
    RELR relocations") introduced CONFIG_TOOLS_SUPPORT_RELR, which checks
    for RELR support in the toolchain as part of the kernel configuration.
    During this procedure, "$(NM)" is invoked to see if it supports the new
    relocation format, however PowerPC conditionally overrides this variable
    in the architecture Makefile in order to pass '--synthetic' when
    targetting PPC64.

    This conditional override causes Kconfig to recurse forever, since
    CONFIG_TOOLS_SUPPORT_RELR cannot be determined without $(NM) being
    defined, but that in turn depends on CONFIG_PPC64:

    $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu-
    scripts/kconfig/conf --syncconfig Kconfig
    scripts/kconfig/conf --syncconfig Kconfig
    scripts/kconfig/conf --syncconfig Kconfig
    [...]

    In this particular case, it looks like PowerPC may be able to pass
    '--synthetic' unconditionally to nm or even drop it altogether. While
    that is being resolved, let's just bodge the RELR check by picking up
    $(NM) directly from the environment in whatever state it happens to be
    in.

    Cc: Peter Collingbourne
    Reported-by: Stephen Rothwell
    Suggested-by: Masahiro Yamada
    Signed-off-by: Will Deacon

    Will Deacon
     

06 Aug, 2019

1 commit

  • IMA will use the module_signature format for append signatures, so export
    the relevant definitions and factor out the code which verifies that the
    appended signature trailer is valid.

    Also, create a CONFIG_MODULE_SIG_FORMAT option so that IMA can select it
    and be able to use mod_check_sig() without having to depend on either
    CONFIG_MODULE_SIG or CONFIG_MODULES.

    s390 duplicated the definition of struct module_signature so now they can
    use the new header instead.

    Signed-off-by: Thiago Jung Bauermann
    Acked-by: Jessica Yu
    Reviewed-by: Philipp Rudo
    Cc: Heiko Carstens
    Signed-off-by: Mimi Zohar

    Thiago Jung Bauermann
     

05 Aug, 2019

1 commit

  • RELR is a relocation packing format for relative relocations.
    The format is described in a generic-abi proposal:
    https://groups.google.com/d/topic/generic-abi/bX460iggiKg/discussion

    The LLD linker can be instructed to pack relocations in the RELR
    format by passing the flag --pack-dyn-relocs=relr.

    This patch adds a new config option, CONFIG_RELR. Enabling this option
    instructs the linker to pack vmlinux's relative relocations in the RELR
    format, and causes the kernel to apply the relocations at startup along
    with the RELA relocations. RELA relocations still need to be applied
    because the linker will emit RELA relative relocations if they are
    unrepresentable in the RELR format (i.e. address not a multiple of 2).

    Enabling CONFIG_RELR reduces the size of a defconfig kernel image
    with CONFIG_RANDOMIZE_BASE by 3.5MB/16% uncompressed, or 550KB/5%
    compressed (lz4).

    Signed-off-by: Peter Collingbourne
    Tested-by: Nick Desaulniers
    Reviewed-by: Nick Desaulniers
    Signed-off-by: Will Deacon

    Peter Collingbourne
     

17 Jul, 2019

2 commits

  • Merge more updates from Andrew Morton:
    "VM:
    - z3fold fixes and enhancements by Henry Burns and Vitaly Wool

    - more accurate reclaimed slab caches calculations by Yafang Shao

    - fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by
    Christoph Hellwig

    - !CONFIG_MMU fixes by Christoph Hellwig

    - new novmcoredd parameter to omit device dumps from vmcore, by
    Kairui Song

    - new test_meminit module for testing heap and pagealloc
    initialization, by Alexander Potapenko

    - ioremap improvements for huge mappings, by Anshuman Khandual

    - generalize kprobe page fault handling, by Anshuman Khandual

    - device-dax hotplug fixes and improvements, by Pavel Tatashin

    - enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V

    - add pte_devmap() support for arm64, by Robin Murphy

    - unify locked_vm accounting with a helper, by Daniel Jordan

    - several misc fixes

    core/lib:
    - new typeof_member() macro including some users, by Alexey Dobriyan

    - make BIT() and GENMASK() available in asm, by Masahiro Yamada

    - changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better
    code generation, by Alexey Dobriyan

    - rbtree code size optimizations, by Michel Lespinasse

    - convert struct pid count to refcount_t, by Joel Fernandes

    get_maintainer.pl:
    - add --no-moderated switch to skip moderated ML's, by Joe Perches

    misc:
    - ptrace PTRACE_GET_SYSCALL_INFO interface

    - coda updates

    - gdb scripts, various"

    [ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ]

    * emailed patches from Andrew Morton : (100 commits)
    fs/select.c: use struct_size() in kmalloc()
    mm: add account_locked_vm utility function
    arm64: mm: implement pte_devmap support
    mm: introduce ARCH_HAS_PTE_DEVMAP
    mm: clean up is_device_*_page() definitions
    mm/mmap: move common defines to mman-common.h
    mm: move MAP_SYNC to asm-generic/mman-common.h
    device-dax: "Hotremove" persistent memory that is used like normal RAM
    mm/hotplug: make remove_memory() interface usable
    device-dax: fix memory and resource leak if hotplug fails
    include/linux/lz4.h: fix spelling and copy-paste errors in documentation
    ipc/mqueue.c: only perform resource calculation if user valid
    include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures
    scripts/gdb: add helpers to find and list devices
    scripts/gdb: add lx-genpd-summary command
    drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
    kernel/pid.c: convert struct pid count to refcount_t
    drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings
    select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining()
    select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR
    ...

    Linus Torvalds
     
  • This fixes a couple typos I noticed in the slab Kconfig:

    sacrifies -> sacrifices
    accellerate -> accelerate

    Seeing as no other instances of these typos are found elsewhere in the
    kernel and that I originally added one of the two, I can only assume
    working on slab must have caused damage to the spelling centers of my
    brain.

    Link: http://lkml.kernel.org/r/201905292203.CD000546EB@keescook
    Signed-off-by: Kees Cook
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     

15 Jul, 2019

2 commits


13 Jul, 2019

1 commit

  • Pull Kbuild updates from Masahiro Yamada:

    - remove headers_{install,check}_all targets

    - remove unreasonable 'depends on !UML' from CONFIG_SAMPLES

    - re-implement 'make headers_install' more cleanly

    - add new header-test-y syntax to compile-test headers

    - compile-test exported headers to ensure they are compilable in
    user-space

    - compile-test headers under include/ to ensure they are self-contained

    - remove -Waggregate-return, -Wno-uninitialized, -Wno-unused-value
    flags

    - add -Werror=unknown-warning-option for Clang

    - add 128-bit built-in types support to genksyms

    - fix missed rebuild of modules.builtin

    - propagate 'No space left on device' error in fixdep to Make

    - allow Clang to use its integrated assembler

    - improve some coccinelle scripts

    - add a new flag KBUILD_ABS_SRCTREE to request Kbuild to use absolute
    path for $(srctree).

    - do not ignore errors when compression utility is missing

    - misc cleanups

    * tag 'kbuild-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (49 commits)
    kbuild: use -- separater intead of $(filter-out ...) for cc-cross-prefix
    kbuild: Inform user to pass ARCH= for make mrproper
    kbuild: fix compression errors getting ignored
    kbuild: add a flag to force absolute path for srctree
    kbuild: replace KBUILD_SRCTREE with boolean building_out_of_srctree
    kbuild: remove src and obj from the top Makefile
    scripts/tags.sh: remove unused environment variables from comments
    scripts/tags.sh: drop SUBARCH support for ARM
    kbuild: compile-test kernel headers to ensure they are self-contained
    kheaders: include only headers into kheaders_data.tar.xz
    kheaders: remove meaningless -R option of 'ls'
    kbuild: support header-test-pattern-y
    kbuild: do not create wrappers for header-test-y
    kbuild: compile-test exported headers to ensure they are self-contained
    init/Kconfig: add CONFIG_CC_CAN_LINK
    kallsyms: exclude kasan local symbols on s390
    kbuild: add more hints about SUBDIRS replacement
    coccinelle: api/stream_open: treat all wait_.*() calls as blocking
    coccinelle: put_device: Add a cast to an expression for an assignment
    coccinelle: put_device: Adjust a message construction
    ...

    Linus Torvalds
     

10 Jul, 2019

2 commits

  • Pull Documentation updates from Jonathan Corbet:
    "It's been a relatively busy cycle for docs:

    - A fair pile of RST conversions, many from Mauro. These create more
    than the usual number of simple but annoying merge conflicts with
    other trees, unfortunately. He has a lot more of these waiting on
    the wings that, I think, will go to you directly later on.

    - A new document on how to use merges and rebases in kernel repos,
    and one on Spectre vulnerabilities.

    - Various improvements to the build system, including automatic
    markup of function() references because some people, for reasons I
    will never understand, were of the opinion that
    :c:func:``function()`` is unattractive and not fun to type.

    - We now recommend using sphinx 1.7, but still support back to 1.4.

    - Lots of smaller improvements, warning fixes, typo fixes, etc"

    * tag 'docs-5.3' of git://git.lwn.net/linux: (129 commits)
    docs: automarkup.py: ignore exceptions when seeking for xrefs
    docs: Move binderfs to admin-guide
    Disable Sphinx SmartyPants in HTML output
    doc: RCU callback locks need only _bh, not necessarily _irq
    docs: format kernel-parameters -- as code
    Doc : doc-guide : Fix a typo
    platform: x86: get rid of a non-existent document
    Add the RCU docs to the core-api manual
    Documentation: RCU: Add TOC tree hooks
    Documentation: RCU: Rename txt files to rst
    Documentation: RCU: Convert RCU UP systems to reST
    Documentation: RCU: Convert RCU linked list to reST
    Documentation: RCU: Convert RCU basic concepts to reST
    docs: filesystems: Remove uneeded .rst extension on toctables
    scripts/sphinx-pre-install: fix out-of-tree build
    docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/
    Documentation: PGP: update for newer HW devices
    Documentation: Add section about CPU vulnerabilities for Spectre
    Documentation: platform: Delete x86-laptop-drivers.txt
    docs: Note that :c:func: should no longer be used
    ...

    Linus Torvalds
     
  • Pull block updates from Jens Axboe:
    "This is the main block updates for 5.3. Nothing earth shattering or
    major in here, just fixes, additions, and improvements all over the
    map. This contains:

    - Series of documentation fixes (Bart)

    - Optimization of the blk-mq ctx get/put (Bart)

    - null_blk removal race condition fix (Bob)

    - req/bio_op() cleanups (Chaitanya)

    - Series cleaning up the segment accounting, and request/bio mapping
    (Christoph)

    - Series cleaning up the page getting/putting for bios (Christoph)

    - block cgroup cleanups and moving it to where it is used (Christoph)

    - block cgroup fixes (Tejun)

    - Series of fixes and improvements to bcache, most notably a write
    deadlock fix (Coly)

    - blk-iolatency STS_AGAIN and accounting fixes (Dennis)

    - Series of improvements and fixes to BFQ (Douglas, Paolo)

    - debugfs_create() return value check removal for drbd (Greg)

    - Use struct_size(), where appropriate (Gustavo)

    - Two lighnvm fixes (Heiner, Geert)

    - MD fixes, including a read balance and corruption fix (Guoqing,
    Marcos, Xiao, Yufen)

    - block opal shadow mbr additions (Jonas, Revanth)

    - sbitmap compare-and-exhange improvemnts (Pavel)

    - Fix for potential bio->bi_size overflow (Ming)

    - NVMe pull requests:
    - improved PCIe suspent support (Keith Busch)
    - error injection support for the admin queue (Akinobu Mita)
    - Fibre Channel discovery improvements (James Smart)
    - tracing improvements including nvmetc tracing support (Minwoo Im)
    - misc fixes and cleanups (Anton Eidelman, Minwoo Im, Chaitanya
    Kulkarni)"

    - Various little fixes and improvements to drivers and core"

    * tag 'for-5.3/block-20190708' of git://git.kernel.dk/linux-block: (153 commits)
    blk-iolatency: fix STS_AGAIN handling
    block: nr_phys_segments needs to be zero for REQ_OP_WRITE_ZEROES
    blk-mq: simplify blk_mq_make_request()
    blk-mq: remove blk_mq_put_ctx()
    sbitmap: Replace cmpxchg with xchg
    block: fix .bi_size overflow
    block: sed-opal: check size of shadow mbr
    block: sed-opal: ioctl for writing to shadow mbr
    block: sed-opal: add ioctl for done-mark of shadow mbr
    block: never take page references for ITER_BVEC
    direct-io: use bio_release_pages in dio_bio_complete
    block_dev: use bio_release_pages in bio_unmap_user
    block_dev: use bio_release_pages in blkdev_bio_end_io
    iomap: use bio_release_pages in iomap_dio_bio_end_io
    block: use bio_release_pages in bio_map_user_iov
    block: use bio_release_pages in bio_unmap_user
    block: optionally mark pages dirty in bio_release_pages
    block: move the BIO_NO_PAGE_REF check into bio_release_pages
    block: skd_main.c: Remove call to memset after dma_alloc_coherent
    block: mtip32xx: Remove call to memset after dma_alloc_coherent
    ...

    Linus Torvalds
     

09 Jul, 2019

2 commits

  • The headers in include/ are globally used in the kernel source tree
    to provide common APIs. They are included from external modules, too.

    It will be useful to make as many headers self-contained as possible
    so that we do not have to rely on a specific include order.

    There are more than 4000 headers in include/. In my rough analysis,
    70% of them are already self-contained. With efforts, most of them
    can be self-contained.

    For now, we must exclude more than 1000 headers just because they
    cannot be compiled as standalone units. I added them to header-test-.
    The blacklist was mostly generated by a script, so the reason of the
    breakage should be checked later.

    Signed-off-by: Masahiro Yamada
    Tested-by: Jani Nikula
    Reviewed-by: Joel Fernandes (Google)

    Masahiro Yamada
     
  • Pull cgroup updates from Tejun Heo:
    "Documentation updates and the addition of cgroup_parse_float() which
    will be used by new controllers including blk-iocost"

    * 'for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
    docs: cgroup-v1: convert docs to ReST and rename to *.rst
    cgroup: Move cgroup_parse_float() implementation out of CONFIG_SYSFS
    cgroup: add cgroup_parse_float()

    Linus Torvalds
     

08 Jul, 2019

2 commits

  • Multiple people have suggested compile-testing UAPI headers to ensure
    they can be really included from user-space. "make headers_check" is
    obviously not enough to catch bugs, and we often leak unresolved
    references to user-space.

    Use the new header-test-y syntax to implement it. Please note exported
    headers are compile-tested with a completely different set of compiler
    flags. The header search path is set to $(objtree)/usr/include since
    exported headers should not include unexported ones.

    We use -std=gnu89 for the kernel space since the kernel code highly
    depends on GNU extensions. On the other hand, UAPI headers should be
    written in more standardized C, so they are compiled with -std=c90.
    This will emit errors if C++ style comments, the keyword 'inline', etc.
    are used. Please use C style comments (/* ... */), '__inline__', etc.
    in UAPI headers.

    There is additional compiler requirement to enable this test because
    many of UAPI headers include , , ,
    etc. directly or indirectly. You cannot use kernel.org pre-built
    toolchains [1] since they lack .

    I reused CONFIG_CC_CAN_LINK to check the system header availability.
    The intention is slightly different, but a compiler that can link
    userspace programs provide system headers.

    For now, a lot of headers need to be excluded because they cannot
    be compiled standalone, but this is a good start point.

    [1] https://mirrors.edge.kernel.org/pub/tools/crosstool/index.html

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Sam Ravnborg

    Masahiro Yamada
     
  • Currently, scripts/cc-can-link.sh is run just for BPFILTER_UMH, but
    defining CC_CAN_LINK will be useful in other places.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

25 Jun, 2019

1 commit

  • Utilization clamping allows to clamp the CPU's utilization within a
    [util_min, util_max] range, depending on the set of RUNNABLE tasks on
    that CPU. Each task references two "clamp buckets" defining its minimum
    and maximum (util_{min,max}) utilization "clamp values". A CPU's clamp
    bucket is active if there is at least one RUNNABLE tasks enqueued on
    that CPU and refcounting that bucket.

    When a task is {en,de}queued {on,from} a rq, the set of active clamp
    buckets on that CPU can change. If the set of active clamp buckets
    changes for a CPU a new "aggregated" clamp value is computed for that
    CPU. This is because each clamp bucket enforces a different utilization
    clamp value.

    Clamp values are always MAX aggregated for both util_min and util_max.
    This ensures that no task can affect the performance of other
    co-scheduled tasks which are more boosted (i.e. with higher util_min
    clamp) or less capped (i.e. with higher util_max clamp).

    A task has:
    task_struct::uclamp[clamp_id]::bucket_id
    to track the "bucket index" of the CPU's clamp bucket it refcounts while
    enqueued, for each clamp index (clamp_id).

    A runqueue has:
    rq::uclamp[clamp_id]::bucket[bucket_id].tasks
    to track how many RUNNABLE tasks on that CPU refcount each
    clamp bucket (bucket_id) of a clamp index (clamp_id).
    It also has a:
    rq::uclamp[clamp_id]::bucket[bucket_id].value
    to track the clamp value of each clamp bucket (bucket_id) of a clamp
    index (clamp_id).

    The rq::uclamp::bucket[clamp_id][] array is scanned every time it's
    needed to find a new MAX aggregated clamp value for a clamp_id. This
    operation is required only when it's dequeued the last task of a clamp
    bucket tracking the current MAX aggregated clamp value. In this case,
    the CPU is either entering IDLE or going to schedule a less boosted or
    more clamped task.
    The expected number of different clamp values configured at build time
    is small enough to fit the full unordered array into a single cache
    line, for configurations of up to 7 buckets.

    Add to struct rq the basic data structures required to refcount the
    number of RUNNABLE tasks for each clamp bucket. Add also the max
    aggregation required to update the rq's clamp value at each
    enqueue/dequeue event.

    Use a simple linear mapping of clamp values into clamp buckets.
    Pre-compute and cache bucket_id to avoid integer divisions at
    enqueue/dequeue time.

    Signed-off-by: Patrick Bellasi
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Alessio Balsini
    Cc: Dietmar Eggemann
    Cc: Joel Fernandes
    Cc: Juri Lelli
    Cc: Linus Torvalds
    Cc: Morten Rasmussen
    Cc: Paul Turner
    Cc: Peter Zijlstra
    Cc: Quentin Perret
    Cc: Rafael J . Wysocki
    Cc: Steve Muckle
    Cc: Suren Baghdasaryan
    Cc: Tejun Heo
    Cc: Thomas Gleixner
    Cc: Todd Kjos
    Cc: Vincent Guittot
    Cc: Viresh Kumar
    Link: https://lkml.kernel.org/r/20190621084217.8167-2-patrick.bellasi@arm.com
    Signed-off-by: Ingo Molnar

    Patrick Bellasi
     

21 Jun, 2019

1 commit


15 Jun, 2019

3 commits

  • Sometimes it's useful to be able to explicitly ensure certain headers
    remain self-contained, i.e. that they are compilable as standalone
    units, by including and/or forward declaring everything they depend on.

    Add special target header-test-y where individual Makefiles can add
    headers to be tested if CONFIG_HEADER_TEST is enabled. This will
    generate a dummy C file per header that gets built as part of extra-y.

    Signed-off-by: Jani Nikula
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Masahiro Yamada

    Jani Nikula
     
  • In order to prepare to add them to the Kernel API book,
    convert the files to ReST format.

    The conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • Convert the cgroup-v1 files to ReST format, in order to
    allow a later addition to the admin-guide.

    The conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Tejun Heo
    Signed-off-by: Tejun Heo

    Mauro Carvalho Chehab
     

09 Jun, 2019

1 commit

  • Pull char/misc driver fixes from Greg KH:
    "Here are some small char and misc driver fixes for 5.2-rc4 to resolve
    a number of reported issues.

    The most "notable" one here is the kernel headers in proc^Wsysfs
    fixes. Those changes move the header file info into sysfs and fixes
    the build issues that you reported.

    Other than that, a bunch of small habanalabs driver fixes, some fpga
    driver fixes, and a few other tiny driver fixes.

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'char-misc-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    habanalabs: Read upper bits of trace buffer from RWPHI
    habanalabs: Fix virtual address access via debugfs for 2MB pages
    fpga: zynqmp-fpga: Correctly handle error pointer
    habanalabs: fix bug in checking huge page optimization
    habanalabs: Avoid using a non-initialized MMU cache mutex
    habanalabs: fix debugfs code
    uapi/habanalabs: add opcode for enable/disable device debug mode
    habanalabs: halt debug engines on user process close
    test_firmware: Use correct snprintf() limit
    genwqe: Prevent an integer overflow in the ioctl
    parport: Fix mem leak in parport_register_dev_model
    fpga: dfl: expand minor range when registering chrdev region
    fpga: dfl: Add lockdep classes for pdata->lock
    fpga: dfl: afu: Pass the correct device to dma_mapping_error()
    fpga: stratix10-soc: fix use-after-free on s10_init()
    w1: ds2408: Fix typo after 49695ac46861 (reset on output_write retry with readback)
    kheaders: Do not regenerate archive if config is not changed
    kheaders: Move from proc to sysfs
    lkdtm/bugs: Adjust recursion test to avoid elision
    lkdtm/usercopy: Moves the KERNEL_DS test to non-canonical

    Linus Torvalds