11 Mar, 2020

3 commits


03 Mar, 2020

1 commit


25 Feb, 2020

1 commit


01 Feb, 2020

2 commits

  • In order to provide a clearer, more symmetric API for pinning and
    unpinning DMA pages. This way, pin_user_pages*() calls match up with
    unpin_user_pages*() calls, and the API is a lot closer to being
    self-explanatory.

    Link: http://lkml.kernel.org/r/20200107224558.2362728-23-jhubbard@nvidia.com
    Signed-off-by: John Hubbard
    Reviewed-by: Jan Kara
    Cc: Alex Williamson
    Cc: Aneesh Kumar K.V
    Cc: Björn Töpel
    Cc: Christoph Hellwig
    Cc: Daniel Vetter
    Cc: Dan Williams
    Cc: Hans Verkuil
    Cc: Ira Weiny
    Cc: Jason Gunthorpe
    Cc: Jason Gunthorpe
    Cc: Jens Axboe
    Cc: Jerome Glisse
    Cc: Jonathan Corbet
    Cc: Kirill A. Shutemov
    Cc: Leon Romanovsky
    Cc: Mauro Carvalho Chehab
    Cc: Mike Rapoport
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    John Hubbard
     
  • Introduce pin_user_pages*() variations of get_user_pages*() calls, and
    also pin_longterm_pages*() variations.

    For now, these are placeholder calls, until the various call sites are
    converted to use the correct get_user_pages*() or pin_user_pages*() API.

    These variants will eventually all set FOLL_PIN, which is also
    introduced, and thoroughly documented.

    pin_user_pages()
    pin_user_pages_remote()
    pin_user_pages_fast()

    All pages that are pinned via the above calls, must be unpinned via
    put_user_page().

    The underlying rules are:

    * FOLL_PIN is a gup-internal flag, so the call sites should not directly
    set it. That behavior is enforced with assertions.

    * Call sites that want to indicate that they are going to do DirectIO
    ("DIO") or something with similar characteristics, should call a
    get_user_pages()-like wrapper call that sets FOLL_PIN. These wrappers
    will:

    * Start with "pin_user_pages" instead of "get_user_pages". That
    makes it easy to find and audit the call sites.

    * Set FOLL_PIN

    * For pages that are received via FOLL_PIN, those pages must be returned
    via put_user_page().

    Thanks to Jan Kara and Vlastimil Babka for explaining the 4 cases in
    this documentation. (I've reworded it and expanded upon it.)

    Link: http://lkml.kernel.org/r/20200107224558.2362728-12-jhubbard@nvidia.com
    Signed-off-by: John Hubbard
    Reviewed-by: Jan Kara
    Reviewed-by: Mike Rapoport [Documentation]
    Reviewed-by: Jérôme Glisse
    Cc: Jonathan Corbet
    Cc: Ira Weiny
    Cc: Alex Williamson
    Cc: Aneesh Kumar K.V
    Cc: Björn Töpel
    Cc: Christoph Hellwig
    Cc: Daniel Vetter
    Cc: Dan Williams
    Cc: Hans Verkuil
    Cc: Jason Gunthorpe
    Cc: Jason Gunthorpe
    Cc: Jens Axboe
    Cc: Kirill A. Shutemov
    Cc: Leon Romanovsky
    Cc: Mauro Carvalho Chehab
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    John Hubbard
     

30 Jan, 2020

1 commit

  • Pull SCSI updates from James Bottomley:
    "This series is slightly unusual because it includes Arnd's compat
    ioctl tree here:

    1c46a2cf2dbd Merge tag 'block-ioctl-cleanup-5.6' into 5.6/scsi-queue

    Excluding Arnd's changes, this is mostly an update of the usual
    drivers: megaraid_sas, mpt3sas, qla2xxx, ufs, lpfc, hisi_sas.

    There are a couple of core and base updates around error propagation
    and atomicity in the attribute container base we use for the SCSI
    transport classes.

    The rest is minor changes and updates"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (149 commits)
    scsi: hisi_sas: Rename hisi_sas_cq.pci_irq_mask
    scsi: hisi_sas: Add prints for v3 hw interrupt converge and automatic affinity
    scsi: hisi_sas: Modify the file permissions of trigger_dump to write only
    scsi: hisi_sas: Replace magic number when handle channel interrupt
    scsi: hisi_sas: replace spin_lock_irqsave/spin_unlock_restore with spin_lock/spin_unlock
    scsi: hisi_sas: use threaded irq to process CQ interrupts
    scsi: ufs: Use UFS device indicated maximum LU number
    scsi: ufs: Add max_lu_supported in struct ufs_dev_info
    scsi: ufs: Delete is_init_prefetch from struct ufs_hba
    scsi: ufs: Inline two functions into their callers
    scsi: ufs: Move ufshcd_get_max_pwr_mode() to ufshcd_device_params_init()
    scsi: ufs: Split ufshcd_probe_hba() based on its called flow
    scsi: ufs: Delete struct ufs_dev_desc
    scsi: ufs: Fix ufshcd_probe_hba() reture value in case ufshcd_scsi_add_wlus() fails
    scsi: ufs-mediatek: enable low-power mode for hibern8 state
    scsi: ufs: export some functions for vendor usage
    scsi: ufs-mediatek: add dbg_register_dump implementation
    scsi: qla2xxx: Fix a NULL pointer dereference in an error path
    scsi: qla1280: Make checking for 64bit support consistent
    scsi: megaraid_sas: Update driver version to 07.713.01.00-rc1
    ...

    Linus Torvalds
     

29 Jan, 2020

1 commit

  • Pull crypto updates from Herbert Xu:
    "API:
    - Removed CRYPTO_TFM_RES flags
    - Extended spawn grabbing to all algorithm types
    - Moved hash descsize verification into API code

    Algorithms:
    - Fixed recursive pcrypt dead-lock
    - Added new 32 and 64-bit generic versions of poly1305
    - Added cryptogams implementation of x86/poly1305

    Drivers:
    - Added support for i.MX8M Mini in caam
    - Added support for i.MX8M Nano in caam
    - Added support for i.MX8M Plus in caam
    - Added support for A33 variant of SS in sun4i-ss
    - Added TEE support for Raven Ridge in ccp
    - Added in-kernel API to submit TEE commands in ccp
    - Added AMD-TEE driver
    - Added support for BCM2711 in iproc-rng200
    - Added support for AES256-GCM based ciphers for chtls
    - Added aead support on SEC2 in hisilicon"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (244 commits)
    crypto: arm/chacha - fix build failured when kernel mode NEON is disabled
    crypto: caam - add support for i.MX8M Plus
    crypto: x86/poly1305 - emit does base conversion itself
    crypto: hisilicon - fix spelling mistake "disgest" -> "digest"
    crypto: chacha20poly1305 - add back missing test vectors and test chunking
    crypto: x86/poly1305 - fix .gitignore typo
    tee: fix memory allocation failure checks on drv_data and amdtee
    crypto: ccree - erase unneeded inline funcs
    crypto: ccree - make cc_pm_put_suspend() void
    crypto: ccree - split overloaded usage of irq field
    crypto: ccree - fix PM race condition
    crypto: ccree - fix FDE descriptor sequence
    crypto: ccree - cc_do_send_request() is void func
    crypto: ccree - fix pm wrongful error reporting
    crypto: ccree - turn errors to debug msgs
    crypto: ccree - fix AEAD decrypt auth fail
    crypto: ccree - fix typo in comment
    crypto: ccree - fix typos in error msgs
    crypto: atmel-{aes,sha,tdes} - Retire crypto_platform_data
    crypto: x86/sha - Eliminate casts on asm implementations
    ...

    Linus Torvalds
     

24 Jan, 2020

1 commit

  • Pull XArray fixes from Matthew Wilcox:
    "Primarily bugfixes, mostly around handling index wrap-around
    correctly.

    A couple of doc fixes and adding missing APIs.

    I had an oops live on stage at linux.conf.au this year, and it turned
    out to be a bug in xas_find() which I can't prove isn't triggerable in
    the current codebase. Then in looking for the bug, I spotted two more
    bugs.

    The bots have had a few days to chew on this with no problems
    reported, and it passes the test-suite (which now has more tests to
    make sure these problems don't come back)"

    * tag 'xarray-5.5' of git://git.infradead.org/users/willy/linux-dax:
    XArray: Add xa_for_each_range
    XArray: Fix xas_find returning too many entries
    XArray: Fix xa_find_after with multi-index entries
    XArray: Fix infinite loop with entry at ULONG_MAX
    XArray: Add wrappers for nested spinlocks
    XArray: Improve documentation of search marks
    XArray: Fix xas_pause at ULONG_MAX

    Linus Torvalds
     

18 Jan, 2020

1 commit


03 Jan, 2020

1 commit

  • Documentation/process/botching-up-ioctls.rst was orignally written as
    a blog post for DRM driver writers, so it it misses some points while
    going into a lot of detail on others.

    Try to provide a replacement that addresses typical issues across a wider
    range of subsystems, and follows the style of the core-api documentation
    better.

    Many improvements to the document are suggested by Ben Hutchings
    , Jonathan Corbet and
    Geert Uytterhoeven .

    Reviewed-by: Ben Hutchings
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

11 Dec, 2019

1 commit

  • Remove references to unused functions, standardize language, update to
    reflect new functionality, migrate to rst format, and fix all kernel-doc
    warnings.

    Fixes: 815613da6a67 ("kernel/padata.c: removed unused code")
    Signed-off-by: Daniel Jordan
    Cc: Eric Biggers
    Cc: Herbert Xu
    Cc: Jonathan Corbet
    Cc: Steffen Klassert
    Cc: linux-crypto@vger.kernel.org
    Cc: linux-doc@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Daniel Jordan
    Signed-off-by: Herbert Xu

    Daniel Jordan
     

07 Dec, 2019

1 commit

  • Pull more powerpc updates from Michael Ellerman:
    "A few commits splitting the KASAN instrumented bitops header in three,
    to match the split of the asm-generic bitops headers.

    This is needed on powerpc because we use the generic bitops for the
    non-atomic case only, whereas the existing KASAN instrumented bitops
    assume all the underlying operations are provided by the arch as
    arch_foo() versions.

    Thanks to: Daniel Axtens & Christophe Leroy"

    * tag 'powerpc-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    docs/core-api: Remove possibly confusing sub-headings from Bit Operations
    powerpc: support KASAN instrumentation of bitops
    kasan: support instrumented bitops combined with generic bitops

    Linus Torvalds
     

05 Dec, 2019

1 commit

  • Follow the kernel conventions, rename addr_in_gen_pool to
    gen_pool_has_addr.

    [sjhuang@iluvatar.ai: fix Documentation/ too]
    Link: http://lkml.kernel.org/r/20181229015914.5573-1-sjhuang@iluvatar.ai
    Link: http://lkml.kernel.org/r/20181228083950.20398-1-sjhuang@iluvatar.ai
    Signed-off-by: Huang Shijie
    Reviewed-by: Andrew Morton
    Cc: Russell King
    Cc: Arnd Bergmann
    Cc: Greg Kroah-Hartman
    Cc: Christoph Hellwig
    Cc: Marek Szyprowski
    Cc: Robin Murphy
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Shijie
     

04 Dec, 2019

1 commit

  • The recent commit 81d2c6f81996 ("kasan: support instrumented bitops
    combined with generic bitops"), split the KASAN instrumented bitops
    into separate headers for atomic, non-atomic and locking operations.

    This was done to allow arches to include just the instrumented bitops
    they need, while also using some of the generic bitops in
    asm-generic/bitops (which are automatically instrumented). The generic
    bitops are already split into atomic, non-atomic and locking headers.

    This split required an update to kernel-api.rst because it included
    include/asm-generic/bitops-instrumented.h, which no longer exists. So
    now kernel-api.rst includes all three instrumented headers to get the
    definitions for all the bitops.

    When adding the three headers it seemed sensible to add sub-headings
    for each, ie. "Atomic", "Non-atomic" and "Locking".

    The confusion is that test_bit() is (and always has been) in
    non-atomic.h, but is documented elsewhere (atomic_bitops.txt) as being
    atomic. So having it appear under the "Non-atomic" heading is possibly
    confusing.

    Probably test_bit() should move from bitops/non-atomic.h to atomic.h,
    but that has flow on effects. For now just remove the newly added
    sub-headings in the documentation, so we at least aren't adding to the
    confusion about whether test_bit() is atomic or not.

    Signed-off-by: Michael Ellerman

    Michael Ellerman
     

03 Dec, 2019

2 commits

  • Pull Kbuild updates from Masahiro Yamada:

    - remove unneeded asm headers from hexagon, ia64

    - add 'dir-pkg' target, which works like 'tar-pkg' but skips archiving

    - add 'helpnewconfig' target, which shows help for new CONFIG options

    - support 'make nsdeps' for external modules

    - make rebuilds faster by deleting $(wildcard $^) checks

    - remove compile tests for kernel-space headers

    - refactor modpost to simplify modversion handling

    - make single target builds faster

    - optimize and clean up scripts/kallsyms.c

    - refactor various Makefiles and scripts

    * tag 'kbuild-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (59 commits)
    MAINTAINERS: update Kbuild/Kconfig maintainer's email address
    scripts/kallsyms: remove redundant initializers
    scripts/kallsyms: put check_symbol_range() calls close together
    scripts/kallsyms: make check_symbol_range() void function
    scripts/kallsyms: move ignored symbol types to is_ignored_symbol()
    scripts/kallsyms: move more patterns to the ignored_prefixes array
    scripts/kallsyms: skip ignored symbols very early
    scripts/kallsyms: add const qualifiers where possible
    scripts/kallsyms: make find_token() return (unsigned char *)
    scripts/kallsyms: replace prefix_underscores_count() with strspn()
    scripts/kallsyms: add sym_name() to mitigate cast ugliness
    scripts/kallsyms: remove unneeded length check for prefix matching
    scripts/kallsyms: remove redundant is_arm_mapping_symbol()
    scripts/kallsyms: set relative_base more effectively
    scripts/kallsyms: shrink table before sorting it
    scripts/kallsyms: fix definitely-lost memory leak
    scripts/kallsyms: remove unneeded #ifndef ARRAY_SIZE
    kbuild: make single target builds even faster
    modpost: respect the previous export when 'exported twice' is warned
    modpost: do not set ->preloaded for symbols from Module.symvers
    ...

    Linus Torvalds
     
  • Pull Documentation updates from Jonathan Corbet:
    "Here are the main documentation changes for 5.5:

    - Various kerneldoc script enhancements.

    - More RST conversions; those are slowing down as we run out of
    things to convert, but we're a ways from done still.

    - Dan's "maintainer profile entry" work landed at last. Now we just
    need to get maintainers to fill in the profiles...

    - A reworking of the parallel build setup to work better with a
    variety of systems (and to not take over huge systems entirely in
    particular).

    - The MAINTAINERS file is now converted to RST during the build.
    Hopefully nobody ever tries to print this thing, or they will need
    to load a lot of paper.

    - A script and documentation making it easy for maintainers to add
    Link: tags at commit time.

    Also included is the removal of a bunch of spurious CR characters"

    * tag 'docs-5.5a' of git://git.lwn.net/linux: (91 commits)
    docs: remove a bunch of stray CRs
    docs: fix up the maintainer profile document
    libnvdimm, MAINTAINERS: Maintainer Entry Profile
    Maintainer Handbook: Maintainer Entry Profile
    MAINTAINERS: Reclaim the P: tag for Maintainer Entry Profile
    docs, parallelism: Rearrange how jobserver reservations are made
    docs, parallelism: Do not leak blocking mode to other readers
    docs, parallelism: Fix failure path and add comment
    Documentation: Remove bootmem_debug from kernel-parameters.txt
    Documentation: security: core.rst: fix warnings
    Documentation/process/howto/kokr: Update for 4.x -> 5.x versioning
    Documentation/translation: Use Korean for Korean translation title
    docs/memory-barriers.txt: Remove remaining references to mmiowb()
    docs/memory-barriers.txt/kokr: Update I/O section to be clearer about CPU vs thread
    docs/memory-barriers.txt/kokr: Fix style, spacing and grammar in I/O section
    Documentation/kokr: Kill all references to mmiowb()
    docs/memory-barriers.txt/kokr: Rewrite "KERNEL I/O BARRIER EFFECTS" section
    docs: Add initial documentation for devfreq
    Documentation: Document how to get links with git am
    docs: Add request_irq() documentation
    ...

    Linus Torvalds
     

27 Nov, 2019

1 commit

  • Pull device properties framework updates from Rafael Wysocki:
    "Add support for printing fwnode names using a new conversion specifier
    "%pfw" (Sakari Ailus), clean up the software node and
    efi/apple-properties code in preparation for improved software node
    reference properties handling (Dmitry Torokhov) and fix the struct
    fwnode_operations description (Heikki Krogerus)"

    * tag 'devprop-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (22 commits)
    software node: simplify property_entry_read_string_array()
    software node: unify PROPERTY_ENTRY_XXX macros
    software node: remove property_entry_read_uNN_array functions
    software node: get rid of property_set_pointer()
    software node: clean up property_copy_string_array()
    software node: mark internal macros with double underscores
    efi/apple-properties: use PROPERTY_ENTRY_U8_ARRAY_LEN
    software node: introduce PROPERTY_ENTRY_XXX_ARRAY_LEN()
    software node: remove DEV_PROP_MAX
    device property: Fix the description of struct fwnode_operations
    lib/test_printf: Add tests for %pfw printk modifier
    lib/vsprintf: Add %pfw conversion specifier for printing fwnode names
    lib/vsprintf: OF nodes are first and foremost, struct device_nodes
    lib/vsprintf: Make use of fwnode API to obtain node names and separators
    lib/vsprintf: Add a note on re-using %pf or %pF
    lib/vsprintf: Remove support for %pF and %pf in favour of %pS and %ps
    device property: Add a function to obtain a node's prefix
    device property: Add fwnode_get_name for returning the name of a node
    device property: Add functions for accessing node's parents
    device property: Move fwnode_get_parent() up
    ...

    Linus Torvalds
     

26 Nov, 2019

1 commit

  • Pull printk updates from Petr Mladek:

    - Allow to print symbolic error names via new %pe modifier.

    - Use pr_warn() instead of the remaining pr_warning() calls. Fix
    formatting of the related lines.

    - Add VSPRINTF entry to MAINTAINERS.

    * tag 'printk-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: (32 commits)
    checkpatch: don't warn about new vsprintf pointer extension '%pe'
    MAINTAINERS: Add VSPRINTF
    tools lib api: Renaming pr_warning to pr_warn
    ASoC: samsung: Use pr_warn instead of pr_warning
    lib: cpu_rmap: Use pr_warn instead of pr_warning
    trace: Use pr_warn instead of pr_warning
    dma-debug: Use pr_warn instead of pr_warning
    vgacon: Use pr_warn instead of pr_warning
    fs: afs: Use pr_warn instead of pr_warning
    sh/intc: Use pr_warn instead of pr_warning
    scsi: Use pr_warn instead of pr_warning
    platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning
    platform/x86: asus-laptop: Use pr_warn instead of pr_warning
    platform/x86: eeepc-laptop: Use pr_warn instead of pr_warning
    oprofile: Use pr_warn instead of pr_warning
    of: Use pr_warn instead of pr_warning
    macintosh: Use pr_warn instead of pr_warning
    idsn: Use pr_warn instead of pr_warning
    ide: Use pr_warn instead of pr_warning
    crypto: n2: Use pr_warn instead of pr_warning
    ...

    Linus Torvalds
     

19 Nov, 2019

1 commit

  • While checking the results of the :c:func: removal, I noticed that there
    was no documentation for request_irq(), and request_threaded_irq() was not
    mentioned at all. Add a kerneldoc comment for request_irq() and add
    request_threaded_irq() to the list of functions.

    Reviewed-by: Thomas Gleixner
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     

11 Nov, 2019

1 commit

  • scripts/nsdeps is written to take care of only in-tree modules.
    Perhaps, this is not a bug, but just a design. At least,
    Documentation/core-api/symbol-namespaces.rst focuses on in-tree modules.

    Having said that, some people already tried nsdeps for external modules.
    So, it would be nice to support it.

    Reported-by: Steve French
    Reported-by: Jessica Yu
    Signed-off-by: Masahiro Yamada
    Tested-by: Jessica Yu
    Acked-by: Jessica Yu
    Reviewed-by: Matthias Maennich
    Tested-by: Matthias Maennich

    Masahiro Yamada
     

09 Nov, 2019

1 commit


08 Nov, 2019

1 commit


07 Nov, 2019

1 commit

  • Currently bitops-instrumented.h assumes that the architecture provides
    atomic, non-atomic and locking bitops (e.g. both set_bit and __set_bit).
    This is true on x86 and s390, but is not always true: there is a
    generic bitops/non-atomic.h header that provides generic non-atomic
    operations, and also a generic bitops/lock.h for locking operations.

    powerpc uses the generic non-atomic version, so it does not have it's
    own e.g. __set_bit that could be renamed arch___set_bit.

    Split up bitops-instrumented.h to mirror the atomic/non-atomic/lock
    split. This allows arches to only include the headers where they
    have arch-specific versions to rename. Update x86 and s390.

    (The generic operations are automatically instrumented because they're
    written in C, not asm.)

    Suggested-by: Christophe Leroy
    Reviewed-by: Christophe Leroy
    Signed-off-by: Daniel Axtens
    Acked-by: Marco Elver
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20190820024941.12640-1-dja@axtens.net

    Daniel Axtens
     

29 Oct, 2019

4 commits


19 Oct, 2019

1 commit


17 Oct, 2019

1 commit

  • It has been suggested several times to extend vsnprintf() to be able
    to convert the numeric value of ENOSPC to print "ENOSPC". This
    implements that as a %p extension: With %pe, one can do

    if (IS_ERR(foo)) {
    pr_err("Sorry, can't do that: %pe\n", foo);
    return PTR_ERR(foo);
    }

    instead of what is seen in quite a few places in the kernel:

    if (IS_ERR(foo)) {
    pr_err("Sorry, can't do that: %ld\n", PTR_ERR(foo));
    return PTR_ERR(foo);
    }

    If the value passed to %pe is an ERR_PTR, but the library function
    errname() added here doesn't know about the value, the value is simply
    printed in decimal. If the value passed to %pe is not an ERR_PTR, we
    treat it as an ordinary %p and thus print the hashed value (passing
    non-ERR_PTR values to %pe indicates a bug in the caller, but we can't
    do much about that).

    With my embedded hat on, and because it's not very invasive to do,
    I've made it possible to remove this. The errname() function and
    associated lookup tables take up about 3K. For most, that's probably
    quite acceptable and a price worth paying for more readable
    dmesg (once this starts getting used), while for those that disable
    printk() it's of very little use - I don't see a
    procfs/sysfs/seq_printf() file reasonably making use of this - and
    they clearly want to squeeze vmlinux as much as possible. Hence the
    default y if PRINTK.

    The symbols to include have been found by massaging the output of

    find arch include -iname 'errno*.h' | xargs grep -E 'define\s*E'

    In the cases where some common aliasing exists
    (e.g. EAGAIN=EWOULDBLOCK on all platforms, EDEADLOCK=EDEADLK on most),
    I've moved the more popular one (in terms of 'git grep -w Efoo | wc)
    to the bottom so that one takes precedence.

    Link: http://lkml.kernel.org/r/20191015190706.15989-1-linux@rasmusvillemoes.dk
    To: "Jonathan Corbet"
    To: linux-kernel@vger.kernel.org
    Cc: "Andy Shevchenko"
    Cc: "Andrew Morton"
    Cc: "Joe Perches"
    Cc: linux-doc@vger.kernel.org
    Signed-off-by: Rasmus Villemoes
    Acked-by: Uwe Kleine-König
    Reviewed-by: Petr Mladek
    [andy.shevchenko@gmail.com: use abs()]
    Acked-by: Andy Shevchenko
    Signed-off-by: Petr Mladek

    Rasmus Villemoes
     

12 Oct, 2019

1 commit

  • Pull module fixes from Jessica Yu:
    "Code cleanups and kbuild/namespace related fixups from Masahiro.

    Most importantly, it fixes a namespace-related modpost issue for
    external module builds

    - Fix broken external module builds due to a modpost bug in
    read_dump(), where the namespace was not being strdup'd and
    sym->namespace would be set to bogus data.

    - Various namespace-related kbuild fixes and cleanups thanks to
    Masahiro Yamada"

    * tag 'modules-for-v5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
    doc: move namespaces.rst from kbuild/ to core-api/
    nsdeps: make generated patches independent of locale
    nsdeps: fix hashbang of scripts/nsdeps
    kbuild: fix build error of 'make nsdeps' in clean tree
    module: rename __kstrtab_ns_* to __kstrtabns_* to avoid symbol conflict
    modpost: fix broken sym->namespace for external module builds
    module: swap the order of symbol.namespace
    scripts: add_namespace: Fix coccicheck failed

    Linus Torvalds
     

11 Oct, 2019

3 commits

  • Add support for %pfw conversion specifier (with "f" and "P" modifiers) to
    support printing full path of the node, including its name ("f") and only
    the node's name ("P") in the printk family of functions. The two flags
    have equivalent functionality to existing %pOF with the same two modifiers
    ("f" and "P") on OF based systems. The ability to do the same on ACPI
    based systems is added by this patch.

    On ACPI based systems the resulting strings look like

    \_SB.PCI0.CIO2.port@1.endpoint@0

    where the nodes are separated by a dot (".") and the first three are
    ACPI device nodes and the latter two ACPI data nodes.

    Signed-off-by: Sakari Ailus
    Reviewed-by: Andy Shevchenko
    Reviewed-by: Petr Mladek
    Signed-off-by: Rafael J. Wysocki

    Sakari Ailus
     
  • %pS and %ps are now the preferred conversion specifiers to print function
    names. The functionality is equivalent; remove the old, deprecated %pF
    and %pf support.

    Depends-on: commit 2d44d165e939 ("scsi: lpfc: Convert existing %pf users to %ps")
    Depends-on: commit b295c3e39c13 ("tools lib traceevent: Convert remaining %p[fF] users to %p[sS]")
    Signed-off-by: Sakari Ailus
    Reviewed-by: Andy Shevchenko
    Reviewed-by: Petr Mladek
    Signed-off-by: Rafael J. Wysocki

    Sakari Ailus
     
  • As of 5.3, the automarkup extension will do the right thing with function()
    notation, so we don't need to clutter the text with :c:func: invocations.
    So remove them.

    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     

08 Oct, 2019

2 commits

  • We discussed a better location for this file, and agreed that
    core-api/ is a good fit. Rename it to symbol-namespaces.rst
    for disambiguation, and also add it to index.rst and MAINTAINERS.

    Signed-off-by: Masahiro Yamada
    Acked-by: Matthias Maennich
    Signed-off-by: Jessica Yu

    Masahiro Yamada
     
  • In most configurations, kmalloc() happens to return naturally aligned
    (i.e. aligned to the block size itself) blocks for power of two sizes.

    That means some kmalloc() users might unknowingly rely on that
    alignment, until stuff breaks when the kernel is built with e.g.
    CONFIG_SLUB_DEBUG or CONFIG_SLOB, and blocks stop being aligned. Then
    developers have to devise workaround such as own kmem caches with
    specified alignment [1], which is not always practical, as recently
    evidenced in [2].

    The topic has been discussed at LSF/MM 2019 [3]. Adding a
    'kmalloc_aligned()' variant would not help with code unknowingly relying
    on the implicit alignment. For slab implementations it would either
    require creating more kmalloc caches, or allocate a larger size and only
    give back part of it. That would be wasteful, especially with a generic
    alignment parameter (in contrast with a fixed alignment to size).

    Ideally we should provide to mm users what they need without difficult
    workarounds or own reimplementations, so let's make the kmalloc()
    alignment to size explicitly guaranteed for power-of-two sizes under all
    configurations. What this means for the three available allocators?

    * SLAB object layout happens to be mostly unchanged by the patch. The
    implicitly provided alignment could be compromised with
    CONFIG_DEBUG_SLAB due to redzoning, however SLAB disables redzoning for
    caches with alignment larger than unsigned long long. Practically on at
    least x86 this includes kmalloc caches as they use cache line alignment,
    which is larger than that. Still, this patch ensures alignment on all
    arches and cache sizes.

    * SLUB layout is also unchanged unless redzoning is enabled through
    CONFIG_SLUB_DEBUG and boot parameter for the particular kmalloc cache.
    With this patch, explicit alignment is guaranteed with redzoning as
    well. This will result in more memory being wasted, but that should be
    acceptable in a debugging scenario.

    * SLOB has no implicit alignment so this patch adds it explicitly for
    kmalloc(). The potential downside is increased fragmentation. While
    pathological allocation scenarios are certainly possible, in my testing,
    after booting a x86_64 kernel+userspace with virtme, around 16MB memory
    was consumed by slab pages both before and after the patch, with
    difference in the noise.

    [1] https://lore.kernel.org/linux-btrfs/c3157c8e8e0e7588312b40c853f65c02fe6c957a.1566399731.git.christophe.leroy@c-s.fr/
    [2] https://lore.kernel.org/linux-fsdevel/20190225040904.5557-1-ming.lei@redhat.com/
    [3] https://lwn.net/Articles/787740/

    [akpm@linux-foundation.org: documentation fixlet, per Matthew]
    Link: http://lkml.kernel.org/r/20190826111627.7505-3-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka
    Reviewed-by: Matthew Wilcox (Oracle)
    Acked-by: Michal Hocko
    Acked-by: Kirill A. Shutemov
    Acked-by: Christoph Hellwig
    Cc: David Sterba
    Cc: Christoph Lameter
    Cc: Pekka Enberg
    Cc: David Rientjes
    Cc: Ming Lei
    Cc: Dave Chinner
    Cc: "Darrick J . Wong"
    Cc: Christoph Hellwig
    Cc: James Bottomley
    Cc: Vlastimil Babka
    Cc: Joonsoo Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vlastimil Babka
     

07 Oct, 2019

3 commits

  • Commit 795ee30648c7 ("lib/genalloc: introduce chunk owners") made a number
    of changes to the genalloc API and implementation but did not update the
    documentation to match, leading to these docs build warnings:

    ./lib/genalloc.c:1: warning: 'gen_pool_add_virt' not found
    ./lib/genalloc.c:1: warning: 'gen_pool_alloc' not found
    ./lib/genalloc.c:1: warning: 'gen_pool_free' not found
    ./lib/genalloc.c:1: warning: 'gen_pool_alloc_algo' not found

    Fix these by updating the docs to match new function locations and names,
    and by completing the update of one kerneldoc comment.

    Fixes: 795ee30648c7 ("lib/genalloc: introduce chunk owners")
    Acked-by: Dan Williams
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     
  • Commit 050a9adc6438 ("mm: consolidate the get_user_pages* implementations")
    moved get_user_pages_fast() from mm/util.c to mm/gup.c, but didn't update
    the documentation, leading to this build warning:

    ./mm/util.c:1: warning: 'get_user_pages_fast' not found

    Update the docs to match the new reality.

    Fixes: 050a9adc6438 ("mm: consolidate the get_user_pages* implementations")
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     
  • As of 5.3, the automarkup extension will do the right thing with function()
    notation, so we don't need to clutter the text with :c:func: invocations.
    So remove them.

    Looking at the generated output reveals that we lack kerneldoc coverage for
    much of this API, but that's a separate problem.

    Acked-by: Paul E. McKenney
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet