13 Mar, 2019

3 commits

  • Merge misc updates from Andrew Morton:

    - a few misc things

    - the rest of MM

    - remove flex_arrays, replace with new simple radix-tree implementation

    * emailed patches from Andrew Morton : (38 commits)
    Drop flex_arrays
    sctp: convert to genradix
    proc: commit to genradix
    generic radix trees
    selinux: convert to kvmalloc
    md: convert to kvmalloc
    openvswitch: convert to kvmalloc
    of: fix kmemleak crash caused by imbalance in early memory reservation
    mm: memblock: update comments and kernel-doc
    memblock: split checks whether a region should be skipped to a helper function
    memblock: remove memblock_{set,clear}_region_flags
    memblock: drop memblock_alloc_*_nopanic() variants
    memblock: memblock_alloc_try_nid: don't panic
    treewide: add checks for the return value of memblock_alloc*()
    swiotlb: add checks for the return value of memblock_alloc*()
    init/main: add checks for the return value of memblock_alloc*()
    mm/percpu: add checks for the return value of memblock_alloc*()
    sparc: add checks for the return value of memblock_alloc*()
    ia64: add checks for the return value of memblock_alloc*()
    arch: don't memset(0) memory returned by memblock_alloc()
    ...

    Linus Torvalds
     
  • All existing users have been converted to generic radix trees

    Link: http://lkml.kernel.org/r/20181217131929.11727-8-kent.overstreet@gmail.com
    Signed-off-by: Kent Overstreet
    Acked-by: Dave Hansen
    Cc: Alexey Dobriyan
    Cc: Al Viro
    Cc: Eric Paris
    Cc: Marcelo Ricardo Leitner
    Cc: Matthew Wilcox
    Cc: Neil Horman
    Cc: Paul Moore
    Cc: Pravin B Shelar
    Cc: Shaohua Li
    Cc: Stephen Smalley
    Cc: Vlad Yasevich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kent Overstreet
     
  • Very simple radix tree implementation that supports storing arbitrary
    size entries, up to PAGE_SIZE - upcoming patches will convert existing
    flex_array users to genradixes. The new genradix code has a much
    simpler API and implementation, and doesn't have a hard limit on the
    number of elements like flex_array does.

    Link: http://lkml.kernel.org/r/20181217131929.11727-5-kent.overstreet@gmail.com
    Signed-off-by: Kent Overstreet
    Cc: Alexey Dobriyan
    Cc: Al Viro
    Cc: Dave Hansen
    Cc: Eric Paris
    Cc: Marcelo Ricardo Leitner
    Cc: Matthew Wilcox
    Cc: Neil Horman
    Cc: Paul Moore
    Cc: Pravin B Shelar
    Cc: Shaohua Li
    Cc: Stephen Smalley
    Cc: Vlad Yasevich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kent Overstreet
     

12 Mar, 2019

1 commit

  • Pull XArray updates from Matthew Wilcox:
    "This pull request changes the xa_alloc() API. I'm only aware of one
    subsystem that has started trying to use it, and we agree on the fixup
    as part of the merge.

    The xa_insert() error code also changed to match xa_alloc() (EEXIST to
    EBUSY), and I added xa_alloc_cyclic(). Beyond that, the usual
    bugfixes, optimisations and tweaking.

    I now have a git tree with all users of the radix tree and IDR
    converted over to the XArray that I'll be feeding to maintainers over
    the next few weeks"

    * tag 'xarray-5.1-rc1' of git://git.infradead.org/users/willy/linux-dax:
    XArray: Fix xa_reserve for 2-byte aligned entries
    XArray: Fix xa_erase of 2-byte aligned entries
    XArray: Use xa_cmpxchg to implement xa_reserve
    XArray: Fix xa_release in allocating arrays
    XArray: Mark xa_insert and xa_reserve as must_check
    XArray: Add cyclic allocation
    XArray: Redesign xa_alloc API
    XArray: Add support for 1s-based allocation
    XArray: Change xa_insert to return -EBUSY
    XArray: Update xa_erase family descriptions
    XArray tests: RCU lock prohibits GFP_KERNEL

    Linus Torvalds
     

10 Mar, 2019

2 commits

  • Pull documentation updates from Jonathan Corbet:
    "A fairly routine cycle for docs - lots of typo fixes, some new
    documents, and more translations. There's also some LICENSES
    adjustments from Thomas"

    * tag 'docs-5.1' of git://git.lwn.net/linux: (74 commits)
    docs: Bring some order to filesystem documentation
    Documentation/locking/lockdep: Drop last two chars of sample states
    doc: rcu: Suspicious RCU usage is a warning
    docs: driver-api: iio: fix errors in documentation
    Documentation/process/howto: Update for 4.x -> 5.x versioning
    docs: Explicitly state that the 'Fixes:' tag shouldn't split lines
    doc: security: Add kern-doc for lsm_hooks.h
    doc: sctp: Merge and clean up rst files
    Docs: Correct /proc/stat path
    scripts/spdxcheck.py: fix C++ comment style detection
    doc: fix typos in license-rules.rst
    Documentation: fix admin-guide/README.rst minimum gcc version requirement
    doc: process: complete removal of info about -git patches
    doc: translations: sync translations 'remove info about -git patches'
    perf-security: wrap paragraphs on 72 columns
    perf-security: elaborate on perf_events/Perf privileged users
    perf-security: document collected perf_events/Perf data categories
    perf-security: document perf_events/Perf resource control
    sysfs.txt: add note on available attribute macros
    docs: kernel-doc: typo "if ... if" -> "if ... is"
    ...

    Linus Torvalds
     
  • Pull printk updates from Petr Mladek:

    - Allow to sort mixed lines by an extra information about the caller

    - Remove no longer used LOG_PREFIX.

    - Some clean up and documentation update.

    * tag 'printk-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk:
    printk/docs: Add extra integer types to printk-formats
    printk: Remove no longer used LOG_PREFIX.
    lib/vsprintf: Remove %pCr remnant in comment
    printk: Pass caller information to log_store().
    printk: Add caller information to printk() output.

    Linus Torvalds
     

04 Mar, 2019

1 commit

  • A few commonly used integer types were absent from this table, so add
    them.

    Link: https://github.com/ClangBuiltLinux/linux/issues/378
    Suggested-by: Nick Desaulniers
    Link: http://lkml.kernel.org/r/20190303123647.22020-1-louis@kragniz.eu
    Cc: pmladek@suse.com
    Cc: geert+renesas@glider.be
    Cc: andriy.shevchenko@linux.intel.com
    Cc: linux-doc@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: clang-built-linux@googlegroups.com
    Cc: ndesaulniers@google.com
    Cc: jflat@chromium.org
    Cc: Louis Taylor
    Signed-off-by: Louis Taylor
    [pmladek@suse.com: sorted both variants the same way by size]
    Signed-off-by: Petr Mladek

    Louis Taylor
     

21 Feb, 2019

1 commit


07 Feb, 2019

3 commits

  • This differs slightly from the IDR equivalent in five ways.

    1. It can allocate up to UINT_MAX instead of being limited to INT_MAX,
    like xa_alloc(). Also like xa_alloc(), it will write to the 'id'
    pointer before placing the entry in the XArray.
    2. The 'next' cursor is allocated separately from the XArray instead
    of being part of the IDR. This saves memory for all the users which
    do not use the cyclic allocation API and suits some users better.
    3. It returns -EBUSY instead of -ENOSPC.
    4. It will attempt to wrap back to the minimum value on memory allocation
    failure as well as on an -EBUSY error, assuming that a user would
    rather allocate a small ID than suffer an ID allocation failure.
    5. It reports whether it has wrapped, which is important to some users.

    Signed-off-by: Matthew Wilcox

    Matthew Wilcox
     
  • A lot of places want to allocate IDs starting at 1 instead of 0.
    While the xa_alloc() API supports this, it's not very efficient if lots
    of IDs are allocated, due to having to walk down to the bottom of the
    tree to see if ID 1 is available, then all the way over to the next
    non-allocated ID. This method marks ID 0 as being occupied which wastes
    one slot in the XArray, but preserves xa_empty() as working.

    Signed-off-by: Matthew Wilcox

    Matthew Wilcox
     
  • Userspace translates EEXIST to "File exists" which isn't a very good
    error message for the problem. "Device or resource busy" is a better
    indication of what went wrong.

    Signed-off-by: Matthew Wilcox

    Matthew Wilcox
     

04 Feb, 2019

1 commit

  • This adds an smp_acquire__after_ctrl_dep() barrier on successful
    decrease of refcounter value from 1 to 0 for refcount_dec(sub)_and_test
    variants and therefore gives stronger memory ordering guarantees than
    prior versions of these functions.

    Co-developed-by: Peter Zijlstra (Intel)
    Signed-off-by: Elena Reshetova
    Signed-off-by: Peter Zijlstra (Intel)
    Reviewed-by: Andrea Parri
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: dvyukov@google.com
    Cc: keescook@chromium.org
    Cc: stern@rowland.harvard.edu
    Link: https://lkml.kernel.org/r/1548847131-27854-2-git-send-email-elena.reshetova@intel.com
    Signed-off-by: Ingo Molnar

    Elena Reshetova
     

02 Feb, 2019

1 commit

  • sphinx emits warning

    WARNING: undefined label: memory-allocation ...

    This seems to be caused by the use of a hyphen in the label name instead
    of an underscore. Using an underscore for the label name and the
    reference clears the warning.

    Use underscore not hyphen in label and reference.

    Signed-off-by: Tobin C. Harding
    Signed-off-by: Jonathan Corbet

    Tobin C. Harding
     

15 Jan, 2019

3 commits


07 Jan, 2019

1 commit


06 Jan, 2019

1 commit

  • Pull documentation fixes from Jonathan Corbet:
    "A handful of late-arriving documentation fixes"

    * tag 'docs-5.0-fixes' of git://git.lwn.net/linux:
    doc: filesystems: fix bad references to nonexistent ext4.rst file
    Documentation/admin-guide: update URL of LKML information link
    Docs/kernel-api.rst: Remove blk-tag.c reference

    Linus Torvalds
     

04 Jan, 2019

1 commit

  • After 7ca01926463a, legacy rq tagging was removed, so block/blk-tag.c
    does not exists anymore. When generating pdfdocs, sphinx complains about
    this missing file:

    Error: Cannot open file ./block/blk-tag.c
    Error: Cannot open file ./block/blk-tag.c
    Error: Cannot open file ./block/blk-tag.c
    Error: Cannot open file ./block/blk-tag.c

    So remove blk-tag.c traces from kernel-api.rst file to silence these
    warnings.

    Signed-off-by: Marcos Paulo de Souza
    Signed-off-by: Jonathan Corbet

    Marcos Paulo de Souza
     

02 Jan, 2019

1 commit

  • Pull RTC updates from Alexandre Belloni:
    "Subsystem:
    - new %ptR printk format
    - rename core files
    - allow registration of multiple nvmem devices

    New driver:
    - i.MX system controller RTC

    Driver updates:
    - abx80x: handle voltage ioctls, correct binding doc
    - m41t80: correct month in alarm reads
    - pcf85363: add pcf85263 support
    - pcf8523: properly handle battery low flag
    - s3c: limit alarm to one year in the future as ALMYEAR is broken
    - sun6i: rework clock output binding"

    * tag 'rtc-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (54 commits)
    rtc: rename core files
    rtc: nvmem: fix possible use after free
    rtc: add i.MX system controller RTC support
    dt-bindings: fsl: scu: add rtc binding
    rtc: pcf2123: Add Microcrystal rv2123
    rtc: class: reimplement devm_rtc_device_register
    rtc: enforce rtc_timer_init private_data type
    rtc: abx80x: Implement RTC_VL_READ,CLR ioctls
    rtc: pcf85363: Add support for NXP pcf85263 rtc
    dt-bindings: rtc: pcf85363: Document pcf85263 real-time clock
    rtc: pcf8523: don't return invalid date when battery is low
    dt-bindings: rtc: use a generic node name for ds1307
    PM: Switch to use %ptR
    m68k/mac: Switch to use %ptR
    Input: hp_sdc_rtc - Switch to use %ptR
    rtc: tegra: Switch to use %ptR
    rtc: s5m: Switch to use %ptR
    rtc: s3c: Switch to use %ptR
    rtc: rx8025: Switch to use %ptR
    rtc: rx6110: Switch to use %ptR
    ...

    Linus Torvalds
     

30 Dec, 2018

1 commit

  • Pull documentation update from Jonathan Corbet:
    "A fairly normal cycle for documentation stuff. We have a new document
    on perf security, more Italian translations, more improvements to the
    memory-management docs, improvements to the pathname lookup
    documentation, and the usual array of smaller fixes.

    As is often the case, there are a few reaches outside of
    Documentation/ to adjust kerneldoc comments"

    * tag 'docs-5.0' of git://git.lwn.net/linux: (38 commits)
    docs: improve pathname-lookup document structure
    configfs: fix wrong name of struct in documentation
    docs/mm-api: link slab_common.c to "The Slab Cache" section
    slab: make kmem_cache_create{_usercopy} description proper kernel-doc
    doc:process: add links where missing
    docs/core-api: make mm-api.rst more structured
    x86, boot: documentation whitespace fixup
    Documentation: devres: note checking needs when converting
    doc:it: add some process/* translations
    doc:it: fixes in process/1.Intro
    Documentation: convert path-lookup from markdown to resturctured text
    Documentation/admin-guide: update admin-guide index.rst
    Documentation/admin-guide: introduce perf-security.rst file
    scripts/kernel-doc: Fix struct and struct field attribute processing
    Documentation: dev-tools: Fix typos in index.rst
    Correct gen_init_cpio tool's documentation
    Document /proc/pid PID reuse behavior
    Documentation: update path-lookup.md for parallel lookups
    Documentation: Use "while" instead of "whilst"
    dmaengine: Add mailing list address to the documentation
    ...

    Linus Torvalds
     

20 Dec, 2018

1 commit


11 Dec, 2018

1 commit

  • There are users which print time and date represented by content of
    struct rtc_time in human readable format.

    Instead of open coding that each time introduce %ptR[dt][r] specifier.

    Cc: Arnd Bergmann
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Dmitry Torokhov
    Cc: Geert Uytterhoeven
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: Jason Wessel
    Cc: Jonathan Corbet
    Cc: Jonathan Hunter
    Cc: Krzysztof Kozlowski
    Cc: "Rafael J. Wysocki"
    Cc: Thierry Reding
    Cc: Petr Mladek
    Signed-off-by: Andy Shevchenko
    Reviewed-by: Petr Mladek
    Signed-off-by: Alexandre Belloni

    Andy Shevchenko
     

07 Dec, 2018

1 commit

  • The mm-api.rst covers variety of memory management APIs under "More Memory
    Management Functions" section. The descriptions included there are in a
    random order there are quite a few of them which makes the section too
    long.

    Regrouping the documentation by subject and splitting the long "More Memory
    Management Functions" section into several smaller sections makes the
    generated html more usable.

    Signed-off-by: Mike Rapoport
    Signed-off-by: Jonathan Corbet

    Mike Rapoport
     

06 Dec, 2018

1 commit


21 Nov, 2018

2 commits

  • Whilst making an unrelated change to some Documentation, Linus sayeth:

    | Afaik, even in Britain, "whilst" is unusual and considered more
    | formal, and "while" is the common word.
    |
    | [...]
    |
    | Can we just admit that we work with computers, and we don't need to
    | use þe eald Englisc spelling of words that most of the world never
    | uses?

    dictionary.com refers to the word as "Chiefly British", which is
    probably an undesirable attribute for technical documentation.

    Replace all occurrences under Documentation/ with "while".

    Cc: David Howells
    Cc: Liam Girdwood
    Cc: Chris Wilson
    Cc: Michael Halcrow
    Cc: Jonathan Corbet
    Reported-by: Linus Torvalds
    Signed-off-by: Will Deacon
    Signed-off-by: Jonathan Corbet

    Will Deacon
     
  • I just went looking for the memory allocation guide in the MM docs instead
    of in the core API. For the benefit of the next person who makes that
    mistake, link to it from the MM docs.

    Signed-off-by: Matthew Wilcox
    Acked-by: Mike Rapoport
    Signed-off-by: Jonathan Corbet

    Matthew Wilcox
     

06 Nov, 2018

4 commits


31 Oct, 2018

1 commit

  • Link: http://lkml.kernel.org/r/1536927045-23536-31-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Hocko
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

29 Oct, 2018

1 commit

  • Pull XArray conversion from Matthew Wilcox:
    "The XArray provides an improved interface to the radix tree data
    structure, providing locking as part of the API, specifying GFP flags
    at allocation time, eliminating preloading, less re-walking the tree,
    more efficient iterations and not exposing RCU-protected pointers to
    its users.

    This patch set

    1. Introduces the XArray implementation

    2. Converts the pagecache to use it

    3. Converts memremap to use it

    The page cache is the most complex and important user of the radix
    tree, so converting it was most important. Converting the memremap
    code removes the only other user of the multiorder code, which allows
    us to remove the radix tree code that supported it.

    I have 40+ followup patches to convert many other users of the radix
    tree over to the XArray, but I'd like to get this part in first. The
    other conversions haven't been in linux-next and aren't suitable for
    applying yet, but you can see them in the xarray-conv branch if you're
    interested"

    * 'xarray' of git://git.infradead.org/users/willy/linux-dax: (90 commits)
    radix tree: Remove multiorder support
    radix tree test: Convert multiorder tests to XArray
    radix tree tests: Convert item_delete_rcu to XArray
    radix tree tests: Convert item_kill_tree to XArray
    radix tree tests: Move item_insert_order
    radix tree test suite: Remove multiorder benchmarking
    radix tree test suite: Remove __item_insert
    memremap: Convert to XArray
    xarray: Add range store functionality
    xarray: Move multiorder_check to in-kernel tests
    xarray: Move multiorder_shrink to kernel tests
    xarray: Move multiorder account test in-kernel
    radix tree test suite: Convert iteration test to XArray
    radix tree test suite: Convert tag_tagged_items to XArray
    radix tree: Remove radix_tree_clear_tags
    radix tree: Remove radix_tree_maybe_preload_order
    radix tree: Remove split/join code
    radix tree: Remove radix_tree_update_node_t
    page cache: Finish XArray conversion
    dax: Convert page fault handlers to XArray
    ...

    Linus Torvalds
     

26 Oct, 2018

1 commit

  • Pull printk updates from Petr Mladek:

    - Fix two more locations where printf formatting leaked pointers

    - Better log_buf_len parameter handling

    - Add prefix to messages from printk code

    - Do not miss messages on other consoles when the log is replayed on a
    new one

    - Reduce race between console registration and panic() when the log
    might get replayed on all consoles

    - Some cont buffer code clean up

    - Call console only when there is something to do (log vs cont buffer)

    * tag 'printk-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk:
    lib/vsprintf: Hash printed address for netdev bits fallback
    lib/vsprintf: Hash legacy clock addresses
    lib/vsprintf: Prepare for more general use of ptr_to_id()
    lib/vsprintf: Make ptr argument conts in ptr_to_id()
    printk: fix integer overflow in setup_log_buf()
    printk: do not preliminary split up cont buffer
    printk: lock/unlock console only for new logbuf entries
    printk: keep kernel cont support always enabled
    printk: Give error on attempt to set log buffer length to over 2G
    printk: Add KBUILD_MODNAME and remove a redundant print prefix
    printk: Correct wrong casting
    printk: Fix panic caused by passing log_buf_len to command line
    printk: CON_PRINTBUFFER console registration is a bit racy
    printk: Do not miss new messages when replaying the log

    Linus Torvalds
     

25 Oct, 2018

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "This is a fairly typical cycle for documentation. There's some welcome
    readability improvements for the formatted output, some LICENSES
    updates including the addition of the ISC license, the removal of the
    unloved and unmaintained 00-INDEX files, the deprecated APIs document
    from Kees, more MM docs from Mike Rapoport, and the usual pile of typo
    fixes and corrections"

    * tag 'docs-4.20' of git://git.lwn.net/linux: (41 commits)
    docs: Fix typos in histogram.rst
    docs: Introduce deprecated APIs list
    kernel-doc: fix declaration type determination
    doc: fix a typo in adding-syscalls.rst
    docs/admin-guide: memory-hotplug: remove table of contents
    doc: printk-formats: Remove bogus kobject references for device nodes
    Documentation: preempt-locking: Use better example
    dm flakey: Document "error_writes" feature
    docs/completion.txt: Fix a couple of punctuation nits
    LICENSES: Add ISC license text
    LICENSES: Add note to CDDL-1.0 license that it should not be used
    docs/core-api: memory-hotplug: add some details about locking internals
    docs/core-api: rename memory-hotplug-notifier to memory-hotplug
    docs: improve readability for people with poorer eyesight
    yama: clarify ptrace_scope=2 in Yama documentation
    docs/vm: split memory hotplug notifier description to Documentation/core-api
    docs: move memory hotplug description into admin-guide/mm
    doc: Fix acronym "FEKEK" in ecryptfs
    docs: fix some broken documentation references
    iommu: Fix passthrough option documentation
    ...

    Linus Torvalds
     

21 Oct, 2018

4 commits


16 Oct, 2018

1 commit