20 Jan, 2021

1 commit

  • This is the 5.10.7 stable release

    * tag 'v5.10.7': (144 commits)
    Linux 5.10.7
    scsi: target: Fix XCOPY NAA identifier lookup
    rtlwifi: rise completion at the last step of firmware callback
    ...

    Signed-off-by: Jason Liu

    Jason Liu
     

13 Jan, 2021

1 commit

  • commit 05cd84691eafcd7959a1e120d5e72c0dd98c5d91 upstream.

    It is observed 'use-after-free' on the dmabuf's file->f_inode with the
    race between closing the dmabuf file and reading the dmabuf's debug
    info.

    Consider the below scenario where P1 is closing the dma_buf file
    and P2 is reading the dma_buf's debug info in the system:

    P1 P2
    dma_buf_debug_show()
    dma_buf_put()
    __fput()
    file->f_op->release()
    dput()
    ....
    dentry_unlink_inode()
    iput(dentry->d_inode)
    (where the inode is freed)
    mutex_lock(&db_list.lock)
    read 'dma_buf->file->f_inode'
    (the same inode is freed by P1)
    mutex_unlock(&db_list.lock)
    dentry->d_op->d_release()-->
    dma_buf_release()
    .....
    mutex_lock(&db_list.lock)
    removes the dmabuf from the list
    mutex_unlock(&db_list.lock)

    In the above scenario, when dma_buf_put() is called on a dma_buf, it
    first frees the dma_buf's file->f_inode(=dentry->d_inode) and then
    removes this dma_buf from the system db_list. In between P2 traversing
    the db_list tries to access this dma_buf's file->f_inode that was freed
    by P1 which is a use-after-free case.

    Since, __fput() calls f_op->release first and then later calls the
    d_op->d_release, move the dma_buf's db_list removal from d_release() to
    f_op->release(). This ensures that dma_buf's file->f_inode is not
    accessed after it is released.

    Cc: # 5.4.x-
    Fixes: 4ab59c3c638c ("dma-buf: Move dma_buf_release() from fops to dentry_ops")
    Acked-by: Christian König
    Signed-off-by: Charan Teja Reddy
    Signed-off-by: Sumit Semwal
    Signed-off-by: Thomas Zimmermann
    Link: https://patchwork.freedesktop.org/patch/msgid/1609857399-31549-1-git-send-email-charante@codeaurora.org
    Signed-off-by: Greg Kroah-Hartman

    Charan Teja Reddy
     

04 Jan, 2021

1 commit

  • This is the 5.10.4 stable release

    * tag 'v5.10.4': (717 commits)
    Linux 5.10.4
    x86/CPU/AMD: Save AMD NodeId as cpu_die_id
    drm/edid: fix objtool warning in drm_cvt_modes()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    drivers/gpu/drm/imx/dcss/dcss-plane.c
    drivers/media/i2c/ov5640.c

    Jason Liu
     

30 Dec, 2020

1 commit

  • commit bf8975837dac156c33a4d15d46602700998cb6dd upstream.

    We hardcode the maximum number of shared fences to 4, instead of
    respecting num_fences. Use a minimum of 4, but more if num_fences
    is higher.

    This seems to have been an oversight when first implementing the
    api.

    Fixes: 04a5faa8cbe5 ("reservation: update api and add some helpers")
    Cc: # v3.17+
    Reported-by: Niranjana Vishwanathapura
    Signed-off-by: Maarten Lankhorst
    Reviewed-by: Thomas Hellström
    Link: https://patchwork.freedesktop.org/patch/msgid/20201124115707.406917-1-maarten.lankhorst@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Maarten Lankhorst
     

14 Dec, 2020

2 commits


16 Oct, 2020

2 commits

  • Pull dma-mapping updates from Christoph Hellwig:

    - rework the non-coherent DMA allocator

    - move private definitions out of

    - lower CMA_ALIGNMENT (Paul Cercueil)

    - remove the omap1 dma address translation in favor of the common code

    - make dma-direct aware of multiple dma offset ranges (Jim Quinlan)

    - support per-node DMA CMA areas (Barry Song)

    - increase the default seg boundary limit (Nicolin Chen)

    - misc fixes (Robin Murphy, Thomas Tai, Xu Wang)

    - various cleanups

    * tag 'dma-mapping-5.10' of git://git.infradead.org/users/hch/dma-mapping: (63 commits)
    ARM/ixp4xx: add a missing include of dma-map-ops.h
    dma-direct: simplify the DMA_ATTR_NO_KERNEL_MAPPING handling
    dma-direct: factor out a dma_direct_alloc_from_pool helper
    dma-direct check for highmem pages in dma_direct_alloc_pages
    dma-mapping: merge into
    dma-mapping: move large parts of to kernel/dma
    dma-mapping: move dma-debug.h to kernel/dma/
    dma-mapping: remove
    dma-mapping: merge into
    dma-contiguous: remove dma_contiguous_set_default
    dma-contiguous: remove dev_set_cma_area
    dma-contiguous: remove dma_declare_contiguous
    dma-mapping: split
    cma: decrease CMA_ALIGNMENT lower limit to 2
    firewire-ohci: use dma_alloc_pages
    dma-iommu: implement ->alloc_noncoherent
    dma-mapping: add new {alloc,free}_noncoherent dma_map_ops methods
    dma-mapping: add a new dma_alloc_pages API
    dma-mapping: remove dma_cache_sync
    53c700: convert to dma_alloc_noncoherent
    ...

    Linus Torvalds
     
  • Pull drm updates from Dave Airlie:
    "Not a major amount of change, the i915 trees got split into display
    and gt trees to better facilitate higher level review, and there's a
    major refactoring of i915 GEM locking to use more core kernel concepts
    (like ww-mutexes). msm gets per-process pagetables, older AMD SI cards
    get DC support, nouveau got a bump in displayport support with common
    code extraction from i915.

    Outside of drm this contains a couple of patches for hexint
    moduleparams which you've acked, and a virtio common code tree that
    you should also get via it's regular path.

    New driver:
    - Cadence MHDP8546 DisplayPort bridge driver

    core:
    - cross-driver scatterlist cleanups
    - devm_drm conversions
    - remove drm_dev_init
    - devm_drm_dev_alloc conversion

    ttm:
    - lots of refactoring and cleanups

    bridges:
    - chained bridge support in more drivers

    panel:
    - misc new panels

    scheduler:
    - cleanup priority levels

    displayport:
    - refactor i915 code into helpers for nouveau

    i915:
    - split into display and GT trees
    - WW locking refactoring in GEM
    - execbuf2 extension mechanism
    - syncobj timeline support
    - GEN 12 HOBL display powersaving
    - Rocket Lake display additions
    - Disable FBC on Tigerlake
    - Tigerlake Type-C + DP improvements
    - Hotplug interrupt refactoring

    amdgpu:
    - Sienna Cichlid updates
    - Navy Flounder updates
    - DCE6 (SI) support for DC
    - Plane rotation enabled
    - TMZ state info ioctl
    - PCIe DPC recovery support
    - DC interrupt handling refactor
    - OLED panel fixes

    amdkfd:
    - add SMI events for thermal throttling
    - SMI interface events ioctl update
    - process eviction counters

    radeon:
    - move to dma_ for allocations
    - expose sclk via sysfs

    msm:
    - DSI support for sm8150/sm8250
    - per-process GPU pagetable support
    - Displayport support

    mediatek:
    - move HDMI phy driver to PHY
    - convert mtk-dpi to bridge API
    - disable mt2701 tmds

    tegra:
    - bridge support

    exynos:
    - misc cleanups

    vc4:
    - dual display cleanups

    ast:
    - cleanups

    gma500:
    - conversion to GPIOd API

    hisilicon:
    - misc reworks

    ingenic:
    - clock handling and format improvements

    mcde:
    - DSI support

    mgag200:
    - desktop g200 support

    mxsfb:
    - i.MX7 + i.MX8M
    - alpha plane support

    panfrost:
    - devfreq support
    - amlogic SoC support

    ps8640:
    - EDID from eDP retrieval

    tidss:
    - AM65xx YUV workaround

    virtio:
    - virtio-gpu exported resources

    rcar-du:
    - R8A7742, R8A774E1 and R8A77961 support
    - YUV planar format fixes
    - non-visible plane handling
    - VSP device reference count fix
    - Kconfig fix to avoid displaying disabled options in .config"

    * tag 'drm-next-2020-10-15' of git://anongit.freedesktop.org/drm/drm: (1494 commits)
    drm/ingenic: Fix bad revert
    drm/amdgpu: Fix invalid number of character '{' in amdgpu_acpi_init
    drm/amdgpu: Remove warning for virtual_display
    drm/amdgpu: kfd_initialized can be static
    drm/amd/pm: setup APU dpm clock table in SMU HW initialization
    drm/amdgpu: prevent spurious warning
    drm/amdgpu/swsmu: fix ARC build errors
    drm/amd/display: Fix OPTC_DATA_FORMAT programming
    drm/amd/display: Don't allow pstate if no support in blank
    drm/panfrost: increase readl_relaxed_poll_timeout values
    MAINTAINERS: Update entry for st7703 driver after the rename
    Revert "gpu/drm: ingenic: Add option to mmap GEM buffers cached"
    drm/amd/display: HDMI remote sink need mode validation for Linux
    drm/amd/display: Change to correct unit on audio rate
    drm/amd/display: Avoid set zero in the requested clk
    drm/amdgpu: align frag_end to covered address space
    drm/amdgpu: fix NULL pointer dereference for Renoir
    drm/vmwgfx: fix regression in thp code due to ttm init refactor.
    drm/amdgpu/swsmu: add interrupt work handler for smu11 parts
    drm/amdgpu/swsmu: add interrupt work function
    ...

    Linus Torvalds
     

06 Oct, 2020

1 commit


23 Sep, 2020

1 commit

  • drm-misc-next for 5.10:

    UAPI Changes:

    Cross-subsystem Changes:
    - virtio: Merged a PR for patches that will affect drm/virtio

    Core Changes:
    - dev: More devm_drm convertions and removal of drm_dev_init
    - atomic: Split out drm_atomic_helper_calc_timestamping_constants of
    drm_atomic_helper_update_legacy_modeset_state
    - ttm: More rework

    Driver Changes:
    - i915: selftests improvements
    - panfrost: support for Amlogic SoC
    - vc4: one fix
    - tree-wide: conversions to devm_drm_dev_alloc,
    - ast: simplifications of the atomic modesetting code
    - panfrost: multiple fixes
    - vc4: multiple fixes
    Signed-off-by: Dave Airlie

    From: Maxime Ripard
    Link: https://patchwork.freedesktop.org/patch/msgid/20200921152956.2gxnsdgxmwhvjyut@gilmour.lan

    Dave Airlie
     

21 Sep, 2020

1 commit

  • NULL pointer dereference is observed while exporting the dmabuf but
    failed to allocate the 'struct file' which results into the dropping of
    the allocated dentry corresponding to this file in the dmabuf fs, which
    is ending up in dma_buf_release() and accessing the uninitialzed
    dentry->d_fsdata.

    Call stack on 5.4 is below:
    dma_buf_release+0x2c/0x254 drivers/dma-buf/dma-buf.c:88
    __dentry_kill+0x294/0x31c fs/dcache.c:584
    dentry_kill fs/dcache.c:673 [inline]
    dput+0x250/0x380 fs/dcache.c:859
    path_put+0x24/0x40 fs/namei.c:485
    alloc_file_pseudo+0x1a4/0x200 fs/file_table.c:235
    dma_buf_getfile drivers/dma-buf/dma-buf.c:473 [inline]
    dma_buf_export+0x25c/0x3ec drivers/dma-buf/dma-buf.c:585

    Fix this by checking for the valid pointer in the dentry->d_fsdata.

    Fixes: 4ab59c3c638c ("dma-buf: Move dma_buf_release() from fops to dentry_ops")
    Cc: [5.7+]
    Signed-off-by: Charan Teja Reddy
    Reviewed-by: Christian König
    Link: https://patchwork.freedesktop.org/patch/391319/
    Signed-off-by: Christian König

    Charan Teja Reddy
     

17 Sep, 2020

2 commits

  • GPU drivers need this in their shrinkers, to be able to throw out
    mmap'ed buffers. Note that we also need dma_resv_lock in shrinkers,
    but that loop is resolved by trylocking in shrinkers.

    So full hierarchy is now (ignore some of the other branches we already
    have primed):

    mmap_read_lock -> dma_resv -> shrinkers -> i_mmap_lock_write

    I hope that's not inconsistent with anything mm or fs does, adding
    relevant people.

    Reviewed-by: Thomas Hellström
    Reviewed-by: Christian König
    Signed-off-by: Daniel Vetter
    Cc: Sumit Semwal
    Cc: "Christian König"
    Cc: linux-media@vger.kernel.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: Dave Chinner
    Cc: Qian Cai
    Cc: linux-xfs@vger.kernel.org
    Cc: linux-fsdevel@vger.kernel.org
    Cc: Thomas Hellström (Intel)
    Cc: Andrew Morton
    Cc: Jason Gunthorpe
    Cc: linux-mm@kvack.org
    Cc: linux-rdma@vger.kernel.org
    Cc: Maarten Lankhorst
    Link: https://patchwork.freedesktop.org/patch/msgid/20200728135839.1035515-1-daniel.vetter@ffwll.ch

    Daniel Vetter
     
  • Please pull a set of fixes for various DRM drivers that finally resolve
    incorrect usage of the scatterlists (struct sg_table nents and orig_nents
    entries), what causes issues when IOMMU is used.

    Signed-off-by: Dave Airlie
    From: Marek Szyprowski
    Link: https://patchwork.freedesktop.org/patch/msgid/20200910080505.24456-1-m.szyprowski@samsung.com

    Dave Airlie
     

15 Sep, 2020

1 commit


10 Sep, 2020

1 commit

  • The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function
    returns the number of the created entries in the DMA address space.
    However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and
    dma_unmap_sg must be called with the original number of the entries
    passed to the dma_map_sg().

    struct sg_table is a common structure used for describing a non-contiguous
    memory buffer, used commonly in the DRM and graphics subsystems. It
    consists of a scatterlist with memory pages and DMA addresses (sgl entry),
    as well as the number of scatterlist entries: CPU pages (orig_nents entry)
    and DMA mapped pages (nents entry).

    It turned out that it was a common mistake to misuse nents and orig_nents
    entries, calling DMA-mapping functions with a wrong number of entries or
    ignoring the number of mapped entries returned by the dma_map_sg()
    function.

    To avoid such issues, lets use a common dma-mapping wrappers operating
    directly on the struct sg_table objects and use scatterlist page
    iterators where possible. This, almost always, hides references to the
    nents and orig_nents entries, making the code robust, easier to follow
    and copy/paste safe.

    Signed-off-by: Marek Szyprowski
    Acked-by: Gerd Hoffmann

    Marek Szyprowski
     

07 Sep, 2020

1 commit


03 Sep, 2020

2 commits


02 Sep, 2020

1 commit

  • Add @cookie to dma_fence_end_signalling() to prevent kernel-doc
    warning in drivers/dma-buf/dma-fence.c:

    ../drivers/dma-buf/dma-fence.c:291: warning: Function parameter or member 'cookie' not described in 'dma_fence_end_signalling'

    Signed-off-by: Randy Dunlap
    Cc: Sumit Semwal
    Cc: Gustavo Padovan
    Cc: Christian König
    Cc: linux-media@vger.kernel.org
    Cc: dri-devel@lists.freedesktop.org
    Acked-by: Christian König
    Link: https://patchwork.freedesktop.org/patch/388527/
    Signed-off-by: Christian König

    Randy Dunlap
     

11 Aug, 2020

1 commit

  • Pull locking updates from Thomas Gleixner:
    "A set of locking fixes and updates:

    - Untangle the header spaghetti which causes build failures in
    various situations caused by the lockdep additions to seqcount to
    validate that the write side critical sections are non-preemptible.

    - The seqcount associated lock debug addons which were blocked by the
    above fallout.

    seqcount writers contrary to seqlock writers must be externally
    serialized, which usually happens via locking - except for strict
    per CPU seqcounts. As the lock is not part of the seqcount, lockdep
    cannot validate that the lock is held.

    This new debug mechanism adds the concept of associated locks.
    sequence count has now lock type variants and corresponding
    initializers which take a pointer to the associated lock used for
    writer serialization. If lockdep is enabled the pointer is stored
    and write_seqcount_begin() has a lockdep assertion to validate that
    the lock is held.

    Aside of the type and the initializer no other code changes are
    required at the seqcount usage sites. The rest of the seqcount API
    is unchanged and determines the type at compile time with the help
    of _Generic which is possible now that the minimal GCC version has
    been moved up.

    Adding this lockdep coverage unearthed a handful of seqcount bugs
    which have been addressed already independent of this.

    While generally useful this comes with a Trojan Horse twist: On RT
    kernels the write side critical section can become preemtible if
    the writers are serialized by an associated lock, which leads to
    the well known reader preempts writer livelock. RT prevents this by
    storing the associated lock pointer independent of lockdep in the
    seqcount and changing the reader side to block on the lock when a
    reader detects that a writer is in the write side critical section.

    - Conversion of seqcount usage sites to associated types and
    initializers"

    * tag 'locking-urgent-2020-08-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
    locking/seqlock, headers: Untangle the spaghetti monster
    locking, arch/ia64: Reduce header dependencies by moving XTP bits into the new header
    x86/headers: Remove APIC headers from
    seqcount: More consistent seqprop names
    seqcount: Compress SEQCNT_LOCKNAME_ZERO()
    seqlock: Fold seqcount_LOCKNAME_init() definition
    seqlock: Fold seqcount_LOCKNAME_t definition
    seqlock: s/__SEQ_LOCKDEP/__SEQ_LOCK/g
    hrtimer: Use sequence counter with associated raw spinlock
    kvm/eventfd: Use sequence counter with associated spinlock
    userfaultfd: Use sequence counter with associated spinlock
    NFSv4: Use sequence counter with associated spinlock
    iocost: Use sequence counter with associated spinlock
    raid5: Use sequence counter with associated spinlock
    vfs: Use sequence counter with associated spinlock
    timekeeping: Use sequence counter with associated raw spinlock
    xfrm: policy: Use sequence counters with associated lock
    netfilter: nft_set_rbtree: Use sequence counter with associated rwlock
    netfilter: conntrack: Use sequence counter with associated spinlock
    sched: tasks: Use sequence counter with associated spinlock
    ...

    Linus Torvalds
     

29 Jul, 2020

2 commits

  • A sequence counter write side critical section must be protected by some
    form of locking to serialize writers. If the serialization primitive is
    not disabling preemption implicitly, preemption has to be explicitly
    disabled before entering the sequence counter write side critical
    section.

    The dma-buf reservation subsystem uses plain sequence counters to manage
    updates to reservations. Writer serialization is accomplished through a
    wound/wait mutex.

    Acquiring a wound/wait mutex does not disable preemption, so this needs
    to be done manually before and after the write side critical section.

    Use the newly-added seqcount_ww_mutex_t instead:

    - It associates the ww_mutex with the sequence count, which enables
    lockdep to validate that the write side critical section is properly
    serialized.

    - It removes the need to explicitly add preempt_disable/enable()
    around the write side critical section because the write_begin/end()
    functions for this new data type automatically do this.

    If lockdep is disabled this ww_mutex lock association is compiled out
    and has neither storage size nor runtime overhead.

    Signed-off-by: Ahmed S. Darwish
    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Daniel Vetter
    Link: https://lkml.kernel.org/r/20200720155530.1173732-13-a.darwish@linutronix.de

    Ahmed S. Darwish
     
  • Commit 3c3b177a9369 ("reservation: add support for read-only access
    using rcu") introduced a sequence counter to manage updates to
    reservations. Back then, the reservation object initializer
    reservation_object_init() was always inlined.

    Having the sequence counter initialization inlined meant that each of
    the call sites would have a different lockdep class key, which would've
    broken lockdep's deadlock detection. The aforementioned commit thus
    introduced, and exported, a custom seqcount lockdep class key and name.

    The commit 8735f16803f00 ("dma-buf: cleanup reservation_object_init...")
    transformed the reservation object initializer to a normal non-inlined C
    function. seqcount_init(), which automatically defines the seqcount
    lockdep class key and must be called non-inlined, can now be safely used.

    Remove the seqcount custom lockdep class key, name, and export. Use
    seqcount_init() inside the dma reservation object initializer.

    Signed-off-by: Ahmed S. Darwish
    Signed-off-by: Peter Zijlstra (Intel)
    Reviewed-by: Sebastian Andrzej Siewior
    Acked-by: Daniel Vetter
    Link: https://lkml.kernel.org/r/20200720155530.1173732-12-a.darwish@linutronix.de

    Ahmed S. Darwish
     

24 Jul, 2020

1 commit


23 Jul, 2020

2 commits

  • The sparse tool complains as follows:

    drivers/dma-buf/dma-fence.c:249:25: warning:
    symbol 'dma_fence_lockdep_map' was not declared. Should it be static?

    This variable is not used outside of dma-fence.c, so this commit
    marks it static.

    Fixes: 5fbff813a4a3 ("dma-fence: basic lockdep annotations")
    Reported-by: Hulk Robot
    Signed-off-by: Wei Yongjun

    Reviewed-by: Christian König
    Signed-off-by: Dave Airlie

    Link: https://patchwork.freedesktop.org/patch/msgid/dc5e3b19-2087-44ab-a28c-ddb38ff8861a@email.android.com

    Wei Yongjun
     
  • drm-misc-next for v5.9:

    UAPI Changes:

    Cross-subsystem Changes:
    - Convert panel-dsi-cm and ingenic bindings to YAML.
    - Add lockdep annotations for dma-fence. \o/
    - Describe why indefinite fences are a bad idea
    - Update binding for rocktech jh057n00900.

    Core Changes:
    - Add vblank workers.
    - Use spin_(un)lock_irq instead of the irqsave/restore variants in crtc code.
    - Add managed vram helpers.
    - Convert more logging to drm functions.
    - Replace more http links with https in core and drivers.
    - Cleanup to ttm iomem functions and implementation.
    - Remove TTM CMA memtype as it doesn't work correctly.
    - Remove TTM_MEMTYPE_FLAG_MAPPABLE for many drivers that have no
    unmappable memory resources.

    Driver Changes:
    - Add CRC support to nouveau, using the new vblank workers.
    - Dithering and atomic state fix for nouveau.
    - Fixes for Frida FRD350H54004 panel.
    - Add support for OSD mode (sprite planes), IPU (scaling) and multiple
    panels/bridges to ingenic.
    - Use managed vram helpers in ast.
    - Assorted small fixes to ingenic, i810, mxsfb.
    - Remove optional unused ttm dummy functions.

    Signed-off-by: Dave Airlie

    From: Maarten Lankhorst
    Link: https://patchwork.freedesktop.org/patch/msgid/d6bf269e-ccb2-8a7b-fdae-226e9e3f8274@linux.intel.com

    Dave Airlie
     

21 Jul, 2020

2 commits

  • Two in one go:
    - it is allowed to call dma_fence_wait() while holding a
    dma_resv_lock(). This is fundamental to how eviction works with ttm,
    so required.

    - it is allowed to call dma_fence_wait() from memory reclaim contexts,
    specifically from shrinker callbacks (which i915 does), and from mmu
    notifier callbacks (which amdgpu does, and which i915 sometimes also
    does, and probably always should, but that's kinda a debate). Also
    for stuff like HMM we really need to be able to do this, or things
    get real dicey.

    Consequence is that any critical path necessary to get to a
    dma_fence_signal for a fence must never a) call dma_resv_lock nor b)
    allocate memory with GFP_KERNEL. Also by implication of
    dma_resv_lock(), no userspace faulting allowed. That's some supremely
    obnoxious limitations, which is why we need to sprinkle the right
    annotations to all relevant paths.

    The one big locking context we're leaving out here is mmu notifiers,
    added in

    commit 23b68395c7c78a764e8963fc15a7cfd318bf187f
    Author: Daniel Vetter
    Date: Mon Aug 26 22:14:21 2019 +0200

    mm/mmu_notifiers: add a lockdep map for invalidate_range_start/end

    that one covers a lot of other callsites, and it's also allowed to
    wait on dma-fences from mmu notifiers. But there's no ready-made
    functions exposed to prime this, so I've left it out for now.

    v2: Also track against mmu notifier context.

    v3: kerneldoc to spec the cross-driver contract. Note that currently
    i915 throws in a hard-coded 10s timeout on foreign fences (not sure
    why that was done, but it's there), which is why that rule is worded
    with SHOULD instead of MUST.

    Also some of the mmu_notifier/shrinker rules might surprise SoC
    drivers, I haven't fully audited them all. Which is infeasible anyway,
    we'll need to run them with lockdep and dma-fence annotations and see
    what goes boom.

    v4: A spelling fix from Mika

    v5: #ifdef for CONFIG_MMU_NOTIFIER. Reported by 0day. Unfortunately
    this means lockdep enforcement is slightly inconsistent, it won't spot
    GFP_NOIO and GFP_NOFS allocations in the wrong spot if
    CONFIG_MMU_NOTIFIER is disabled in the kernel config. Oh well.

    v5: Note that only drivers/gpu has a reasonable (or at least
    historical) excuse to use dma_fence_wait() from shrinker and mmu
    notifier callbacks. Everyone else should either have a better memory
    manager model, or better hardware. This reflects discussions with
    Jason Gunthorpe.

    Cc: Jason Gunthorpe
    Cc: Felix Kuehling
    Cc: kernel test robot
    Acked-by: Christian König
    Acked-by: Dave Airlie
    Reviewed-by: Maarten Lankhorst
    Reviewed-by: Thomas Hellström (v4)
    Cc: Mika Kuoppala
    Cc: Thomas Hellstrom
    Cc: linux-media@vger.kernel.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: linux-rdma@vger.kernel.org
    Cc: amd-gfx@lists.freedesktop.org
    Cc: intel-gfx@lists.freedesktop.org
    Cc: Chris Wilson
    Cc: Maarten Lankhorst
    Cc: Christian König
    Signed-off-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20200707201229.472834-3-daniel.vetter@ffwll.ch

    Daniel Vetter
     
  • Design is similar to the lockdep annotations for workers, but with
    some twists:

    - We use a read-lock for the execution/worker/completion side, so that
    this explicit annotation can be more liberally sprinkled around.
    With read locks lockdep isn't going to complain if the read-side
    isn't nested the same way under all circumstances, so ABBA deadlocks
    are ok. Which they are, since this is an annotation only.

    - We're using non-recursive lockdep read lock mode, since in recursive
    read lock mode lockdep does not catch read side hazards. And we
    _very_ much want read side hazards to be caught. For full details of
    this limitation see

    commit e91498589746065e3ae95d9a00b068e525eec34f
    Author: Peter Zijlstra
    Date: Wed Aug 23 13:13:11 2017 +0200

    locking/lockdep/selftests: Add mixed read-write ABBA tests

    - To allow nesting of the read-side explicit annotations we explicitly
    keep track of the nesting. lock_is_held() allows us to do that.

    - The wait-side annotation is a write lock, and entirely done within
    dma_fence_wait() for everyone by default.

    - To be able to freely annotate helper functions I want to make it ok
    to call dma_fence_begin/end_signalling from soft/hardirq context.
    First attempt was using the hardirq locking context for the write
    side in lockdep, but this forces all normal spinlocks nested within
    dma_fence_begin/end_signalling to be spinlocks. That bollocks.

    The approach now is to simple check in_atomic(), and for these cases
    entirely rely on the might_sleep() check in dma_fence_wait(). That
    will catch any wrong nesting against spinlocks from soft/hardirq
    contexts.

    The idea here is that every code path that's critical for eventually
    signalling a dma_fence should be annotated with
    dma_fence_begin/end_signalling. The annotation ideally starts right
    after a dma_fence is published (added to a dma_resv, exposed as a
    sync_file fd, attached to a drm_syncobj fd, or anything else that
    makes the dma_fence visible to other kernel threads), up to and
    including the dma_fence_wait(). Examples are irq handlers, the
    scheduler rt threads, the tail of execbuf (after the corresponding
    fences are visible), any workers that end up signalling dma_fences and
    really anything else. Not annotated should be code paths that only
    complete fences opportunistically as the gpu progresses, like e.g.
    shrinker/eviction code.

    The main class of deadlocks this is supposed to catch are:

    Thread A:

    mutex_lock(A);
    mutex_unlock(A);

    dma_fence_signal();

    Thread B:

    mutex_lock(A);
    dma_fence_wait();
    mutex_unlock(A);

    Thread B is blocked on A signalling the fence, but A never gets around
    to that because it cannot acquire the lock A.

    Note that dma_fence_wait() is allowed to be nested within
    dma_fence_begin/end_signalling sections. To allow this to happen the
    read lock needs to be upgraded to a write lock, which means that any
    other lock is acquired between the dma_fence_begin_signalling() call and
    the call to dma_fence_wait(), and still held, this will result in an
    immediate lockdep complaint. The only other option would be to not
    annotate such calls, defeating the point. Therefore these annotations
    cannot be sprinkled over the code entirely mindless to avoid false
    positives.

    Originally I hope that the cross-release lockdep extensions would
    alleviate the need for explicit annotations:

    https://lwn.net/Articles/709849/

    But there's a few reasons why that's not an option:

    - It's not happening in upstream, since it got reverted due to too
    many false positives:

    commit e966eaeeb623f09975ef362c2866fae6f86844f9
    Author: Ingo Molnar
    Date: Tue Dec 12 12:31:16 2017 +0100

    locking/lockdep: Remove the cross-release locking checks

    This code (CONFIG_LOCKDEP_CROSSRELEASE=y and CONFIG_LOCKDEP_COMPLETIONS=y),
    while it found a number of old bugs initially, was also causing too many
    false positives that caused people to disable lockdep - which is arguably
    a worse overall outcome.

    - cross-release uses the complete() call to annotate the end of
    critical sections, for dma_fence that would be dma_fence_signal().
    But we do not want all dma_fence_signal() calls to be treated as
    critical, since many are opportunistic cleanup of gpu requests. If
    these get stuck there's still the main completion interrupt and
    workers who can unblock everyone. Automatically annotating all
    dma_fence_signal() calls would hence cause false positives.

    - cross-release had some educated guesses for when a critical section
    starts, like fresh syscall or fresh work callback. This would again
    cause false positives without explicit annotations, since for
    dma_fence the critical sections only starts when we publish a fence.

    - Furthermore there can be cases where a thread never does a
    dma_fence_signal, but is still critical for reaching completion of
    fences. One example would be a scheduler kthread which picks up jobs
    and pushes them into hardware, where the interrupt handler or
    another completion thread calls dma_fence_signal(). But if the
    scheduler thread hangs, then all the fences hang, hence we need to
    manually annotate it. cross-release aimed to solve this by chaining
    cross-release dependencies, but the dependency from scheduler thread
    to the completion interrupt handler goes through hw where
    cross-release code can't observe it.

    In short, without manual annotations and careful review of the start
    and end of critical sections, cross-relese dependency tracking doesn't
    work. We need explicit annotations.

    v2: handle soft/hardirq ctx better against write side and dont forget
    EXPORT_SYMBOL, drivers can't use this otherwise.

    v3: Kerneldoc.

    v4: Some spelling fixes from Mika

    v5: Amend commit message to explain in detail why cross-release isn't
    the solution.

    v6: Pull out misplaced .rst hunk.

    Acked-by: Christian König
    Acked-by: Dave Airlie
    Cc: Felix Kuehling
    Reviewed-by: Thomas Hellström
    Reviewed-by: Maarten Lankhorst
    Cc: Mika Kuoppala
    Cc: Thomas Hellstrom
    Cc: linux-media@vger.kernel.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: linux-rdma@vger.kernel.org
    Cc: amd-gfx@lists.freedesktop.org
    Cc: intel-gfx@lists.freedesktop.org
    Cc: Chris Wilson
    Cc: Maarten Lankhorst
    Cc: Christian König
    Signed-off-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20200707201229.472834-2-daniel.vetter@ffwll.ch

    Daniel Vetter
     

20 Jul, 2020

1 commit

  • drm-misc-next for v5.9:

    UAPI Changes:

    Cross-subsystem Changes:
    - Add ckoenig as dma-buf maintainer.
    - Revert invalid fix for dma-fence-chain, and fix selftest.
    - Add fixmes to amifb about APUS support.
    - Use array3_size in fbcon_prepare_logo, and struct_size() in alloc_apertures.
    - Fix leaks in neofb, fb/savage and omapfb.
    - Other small fixes to fb code.
    - Convert some dt bindings to schema for some panels, and fix simple-framebuffer dt example.

    Core Changes:
    - Add DRM_FORMAT_MOD_GENERIC_16_16_TILE as alias to DRM_FORMAT_MOD_SAMSUNG_16_16_TILE,
    as it can be used more generic.
    - Add support for multiple DispID extension blocks in edid.
    - Use https instead of http for some of the urls.
    - Use drm_* macros for logging in mipi-dsi and fb-helper.
    - Further cleanup ttm_mem_reg handling.
    - Remove duplicated words in comments.

    Driver Changes:
    - Use __drm_atomic_helper_crtc_reset in all atomic drivers.
    - Add Amlogic Video FBC support to meson and fourcc to core.
    - Refactor hisilicon's hibmc_drv_vdac.
    - Create a TXP CRTC for vc4.
    - Rework cursor support in ast.
    - Fix runtime PM in STM.
    - Allow bigger cursors in vkms.
    - Cleanup sg handling in radeon and amdgpu, and stop creating dummy
    gtt nodes with ttm fixed.
    - Rework crtc handling in mgag200.
    - Miscellaneous small fixes to meson, vgem, bridge/dw-hdmi,
    panel/auo,b116xw03, panel/LG LB070WV8, lima, bridge/sil_sii8620,
    virtio, tilcdc.

    Signed-off-by: Dave Airlie

    From: Maarten Lankhorst
    Link: https://patchwork.freedesktop.org/patch/msgid/8b360d65-f228-9286-d247-3004156a5254@linux.intel.com

    Dave Airlie
     

10 Jul, 2020

1 commit

  • There exists a sleep-while-atomic bug while accessing the dmabuf->name
    under mutex in the dmabuffs_dname(). This is caused from the SELinux
    permissions checks on a process where it tries to validate the inherited
    files from fork() by traversing them through iterate_fd() (which
    traverse files under spin_lock) and call
    match_file(security/selinux/hooks.c) where the permission checks happen.
    This audit information is logged using dump_common_audit_data() where it
    calls d_path() to get the file path name. If the file check happen on
    the dmabuf's fd, then it ends up in ->dmabuffs_dname() and use mutex to
    access dmabuf->name. The flow will be like below:
    flush_unauthorized_files()
    iterate_fd()
    spin_lock() --> Start of the atomic section.
    match_file()
    file_has_perm()
    avc_has_perm()
    avc_audit()
    slow_avc_audit()
    common_lsm_audit()
    dump_common_audit_data()
    audit_log_d_path()
    d_path()
    dmabuffs_dname()
    mutex_lock()--> Sleep while atomic.

    Call trace captured (on 4.19 kernels) is below:
    ___might_sleep+0x204/0x208
    __might_sleep+0x50/0x88
    __mutex_lock_common+0x5c/0x1068
    __mutex_lock_common+0x5c/0x1068
    mutex_lock_nested+0x40/0x50
    dmabuffs_dname+0xa0/0x170
    d_path+0x84/0x290
    audit_log_d_path+0x74/0x130
    common_lsm_audit+0x334/0x6e8
    slow_avc_audit+0xb8/0xf8
    avc_has_perm+0x154/0x218
    file_has_perm+0x70/0x180
    match_file+0x60/0x78
    iterate_fd+0x128/0x168
    selinux_bprm_committing_creds+0x178/0x248
    security_bprm_committing_creds+0x30/0x48
    install_exec_creds+0x1c/0x68
    load_elf_binary+0x3a4/0x14e0
    search_binary_handler+0xb0/0x1e0

    So, use spinlock to access dmabuf->name to avoid sleep-while-atomic.

    Cc: [5.3+]
    Signed-off-by: Charan Teja Kalla
    Reviewed-by: Michael J. Ruhl
    Acked-by: Christian König
    [sumits: added comment to spinlock_t definition to avoid warning]
    Signed-off-by: Sumit Semwal
    Link: https://patchwork.freedesktop.org/patch/msgid/a83e7f0d-4e54-9848-4b58-e1acdbe06735@codeaurora.org

    Charan Teja Kalla
     

03 Jul, 2020

1 commit

  • drm/i915 features for v5.9

    Highlights:
    - Rocket Lake (RKL) platform enabling (Matt Roper, Lucas, José, Aditya)

    Gem/GT:
    - Numerous selftest fixes and improvements (Chris)
    - TGL, RKL, EHL workaround updates (Matts Atwood and Roper, Clint, Swathi Dhanavanthri, Chris)
    - Retry faulthandlers on ENOSPC to avoid oomkiller (Chris)
    - Numerous refactorings and cleanups (Chris)
    - Several GT fixes around init/suspend/resume/shutdown (Chris)
    - Whitelist CTX_TIMESTAMP register on non-RCS (Chris)
    - Track if an engine requires forcewake w/a (Chris)
    - Locking improvements (Chris)
    - Timeslicing improvements (Chris)
    - Add a safety submission flush in the heartbeat (Chris)
    - Flush gen3 relocs harder (Chris)
    - Discard a misplaced GGTT vma (Chris)
    - Reduce relocation paths to async GPU relocations only (Chris)
    - It's all build up with no pay off (Chris' own words...)

    Display:
    - A plethora of DP MST fixes (Imre)
    - Implement proper dbuf global state (Ville)
    - Consider dbuf bandwidth when calculating CDCLK (Stan)
    - FBC fixes and refactoring (Ville)
    - PSR fixes and improvements (José, Gwan-gyeong)
    - Cursor size fixes (Ville)
    - Overlay color and gamma fixes (Ville)
    - Fix and improve FSB and HRAWCLK read out (Ville)
    - Pre allocate and late cleanup of DSB cmd buffer (Animesh)
    - Stop using mode->private_flags (Ville)
    - Add plane color encoding support for YCBCR_BT2020 (Kishore Kadiyala)
    - Update TGL Type-C DP and DKL HBR and HBR+ vswing tables (José)
    - Fix DSI connector init error path (Vivek)
    - A plethora of DP vswing/preemph fixes and refactoring (Ville)
    - Fix TGL DKL vswing sequence selection (Vandita)
    - Fix ICL hotplug interrupt disabling after storm detection (Imre)
    - Retry HDCP link integrity check on failure (Oliver Barta)
    - Fix TBT DPLL fractional divider (Imre)
    - Fix ICL+ HBR3 source rate (Matt Atwood)
    - Fix gen2 spurious underruns (Ville)
    - Fix potential NULL dereference, some spelling fixes (Colin Ian King)
    - Fix NULL dereference on encoder state probe (Chris)

    Other:
    - Backmerge to get mmap locking API (Jani)
    - Distinguish Comet Lake from Coffee Lake (Chris)
    - Various compiler warning fixes (Arnd Bergmann, Nathan Chancellor)
    - WARN* conversions to drm_WARN* (Pankaj)
    - Switch to device specific parameters with debugfs access (Jani)
    - Fix agp/intel error path leak (Qiushi Wu)
    - Forcewake power optimization (Chris)
    - Irq handler optimization (Chris)

    Signed-off-by: Dave Airlie
    From: Jani Nikula
    Link: https://patchwork.freedesktop.org/patch/msgid/87wo3lkbxt.fsf@intel.com

    Dave Airlie
     

02 Jul, 2020

2 commits

  • There was probably a misunderstand on how the dma-fence-chain is
    supposed to work or what dma_fence_chain_find_seqno() is supposed to
    return.

    dma_fence_chain_find_seqno() is here to give us the fence to wait upon
    for a particular point in the timeline. The timeline progresses only
    when all the points prior to a given number have completed.

    Signed-off-by: Lionel Landwerlin
    Fixes: dc2f7e67a28a5c ("dma-buf: Exercise dma-fence-chain under selftests")
    Link: https://patchwork.freedesktop.org/patch/372960/
    Signed-off-by: Christian König

    Lionel Landwerlin
     
  • This reverts commit 5de376bb434f80a13138f0ebedc8351ab73d8b0d.

    This change breaks synchronization of a timeline.
    dma_fence_chain_find_seqno() might be a bit of a confusing name but
    this function is not trying to find a particular seqno, is supposed to
    give a fence to wait on for a particular point in the timeline.

    In a timeline, a particular value is reached when all the points up to
    and including that value have signaled.

    Signed-off-by: Lionel Landwerlin
    Reviewed-by: Christian König
    Link: https://patchwork.freedesktop.org/patch/372958/
    Signed-off-by: Christian König

    Lionel Landwerlin
     

30 Jun, 2020

1 commit

  • drm-misc-next for v5.9:

    Cross-subsystem Changes:
    - Improve dma-buf docs.

    Core Changes:
    - Add NV15, Q410, Q401 yuv formats.
    - Add uncompressed AFBC modifier.
    - Add DP helepr for reading Ignore MSA from DPCD.
    - Add missing panel type for some panels
    - Optimize drm/mm hole handling.
    - Constify connector to infoframe functions.
    - Add debugfs for VRR monitor range.

    Driver Changes:
    - Assorted small bugfixes in panfrost, malidp, panel/otm8009a.
    - Convert tfp410 dt bindings to yaml, and rework time calculations.
    - Add support for a few more simple panels.
    - Cleanups and optimizations for ast.
    - Allow adv7511 and simple-bridge to be used without connector creation.
    - Cleanups to dw-hdmi function prototypes.
    - Remove enabled bool from tiny/repaper and mipi-dbi, atomic handles it.
    - Remove unused header file from dw-mipi-dsi
    - Begin removing ttm_bo->offset.

    Signed-off-by: Dave Airlie

    From: Maarten Lankhorst
    Link: https://patchwork.freedesktop.org/patch/msgid/b1e53620-7937-895c-bfcf-ed208be59c7c@linux.intel.com

    Dave Airlie
     

29 Jun, 2020

1 commit


25 Jun, 2020

2 commits

  • Catch up with upstream, in particular to get c1e8d7c6a7a6 ("mmap locking
    API: convert mmap_sem comments").

    Signed-off-by: Jani Nikula

    Jani Nikula
     
  • Charan Teja reported a 'use-after-free' in dmabuffs_dname [1], which
    happens if the dma_buf_release() is called while the userspace is
    accessing the dma_buf pseudo fs's dmabuffs_dname() in another process,
    and dma_buf_release() releases the dmabuf object when the last reference
    to the struct file goes away.

    I discussed with Arnd Bergmann, and he suggested that rather than tying
    the dma_buf_release() to the file_operations' release(), we can tie it to
    the dentry_operations' d_release(), which will be called when the last ref
    to the dentry is removed.

    The path exercised by __fput() calls f_op->release() first, and then calls
    dput, which eventually calls d_op->d_release().

    In the 'normal' case, when no userspace access is happening via dma_buf
    pseudo fs, there should be exactly one fd, file, dentry and inode, so
    closing the fd will kill of everything right away.

    In the presented case, the dentry's d_release() will be called only when
    the dentry's last ref is released.

    Therefore, lets move dma_buf_release() from fops->release() to
    d_ops->d_release()

    Many thanks to Arnd for his FS insights :)

    [1]: https://lore.kernel.org/patchwork/patch/1238278/

    Fixes: bb2bb9030425 ("dma-buf: add DMA_BUF_SET_NAME ioctls")
    Reported-by: syzbot+3643a18836bce555bff6@syzkaller.appspotmail.com
    Cc: [5.3+]
    Cc: Arnd Bergmann
    Reported-by: Charan Teja Reddy
    Reviewed-by: Arnd Bergmann
    Signed-off-by: Sumit Semwal
    Tested-by: Charan Teja Reddy
    Link: https://patchwork.freedesktop.org/patch/msgid/20200611114418.19852-1-sumit.semwal@linaro.org

    Sumit Semwal
     

24 Jun, 2020

2 commits

  • Just some tiny edits:
    - fix link to struct dma_fence
    - give slightly more meaningful title - the polling here is about
    implicit fences, explicit fences (in sync_file or drm_syncobj) also
    have their own polling

    v2: I misplaced the .rst include change corresponding to this patch.

    Reviewed-by: Thomas Hellstrom
    Signed-off-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20200612070535.1778368-1-daniel.vetter@ffwll.ch

    Daniel Vetter
     
  • drm-misc-next for v5.9:

    UAPI Changes:
    - Add DRM_MODE_TYPE_USERDEF for video modes specified in cmdline.

    Cross-subsystem Changes:
    - Assorted devicetree binding updates.
    - Add might_sleep() to dma_fence_wait().
    - Fix fbdev's get_user_pages_fast() handling, and use pin_user_pages.
    - Small cleanup with IS_BUILTIN in video/fbdev drivers.
    - Fix video/hdmi coding style for infoframe size.

    Core Changes:
    - Silence vblank output during init.
    - Fix DP-MST corruption during send msg timeout.
    - Clear leak in drm_gem_objecs_lookup().
    - Make newlines work with force connector attribute.
    - Fix module refcounting error in drm_encoder_slave, and use new i2c api.
    - Header fix for drm_managed.c
    - More struct_mutex removal for !legacy drivers:
    - Remove gem_free_object()
    - Removal of drm_gem_object_put_unlocked().
    - Show current->comm alongside pid in debug printfs.
    - Add drm_client_modeset_check() + drm_client_framebuffer_flush().
    - Replace drm_fb_swab16 with drm_fb_swap that also supports 32-bits.
    - Remove mode->vrefresh, and compactify drm_display_mode.
    - Use drm_* macros for logging and warnings.
    - Add WARN when drm_gem_get_pages is used on a private obj.
    - Handle importing and imported dmabuf better in shmem helpers.
    - Small fix for drm/mm hole size comparison, and remove invalid entry optimization.
    - Add a drm/mm selftest.
    - Set DSI connector type for DSI panels.
    - Assorted small fixes and documentation updates.
    - Fix DDI I2C device registration for MST ports, and flushing on destroy.
    - Fix master_set return type, used by vmwgfx.
    - Make the drm_set/drop_master ioctl symmetrical.

    Driver Changes:
    Allow iommu in the sun4i driver and use it for sun8i.
    - Simplify backlight lookup for omap, amba-clcd and tilcdc.
    - Hold reg_lock for rockchip.
    - Add support for bridge gpio and lane reordering + polarity to ti-sn65dsi86, and fix clock choice.
    - Small assorted fixes to tilcdc, vc4, i915, omap, fbdev/sm712fb, fbdev/pxafb, console/newport_con, msm, virtio, udl, malidp, hdlcd, bridge/ti-sn65dsi86, panfrost.
    - Remove hw cursor support for mgag200, and use simple kms helper + shmem helpers.
    - Add support for KOE Allow iommu in the sun4i driver and use it for sun8i.
    - Simplify backlight lookup for omap, amba-clcd and tilcdc.
    - Hold reg_lock for rockchip.
    - Add support for bridge gpio and lane reordering + polarity to ti-sn65dsi86, and fix clock choice.
    - Small assorted fixes to tilcdc, vc4 (multiple), i915.
    - Remove hw cursor support for mgag200, and use simple kms helper + shmem helpers.
    - Add support for KOE TX26D202VM0BWA panel.
    - Use GEM CMA functions in arc, arm, atmel-hlcdc, fsi-dcu, hisilicon, imx, ingenic, komeda, malidp, mcde, meson, msxfb, rcar-du, shmobile, stm, sti, tilcdc, tve200, zte.
    - Remove gem_print_info.
    - Improve gem_create_object_helper so udl can use shmem helpers.
    - Convert vc4 dt bindings to schemas, and add clock properties.
    - Device initialization cleanups for mgag200.
    - Add a workaround to fix DP-MST short pulses handling on broken hardware in i915.
    - Allow build test compiling arm drivers.
    - Use managed pci functions in mgag200 and ast.
    - Use dev_groups in malidp.
    - Add per pixel alpha support for PX30 VOP in rockchip.
    - Silence deferred probe logs in panfrost.

    Signed-off-by: Dave Airlie

    From: Maarten Lankhorst
    Link: https://patchwork.freedesktop.org/patch/msgid/001cd9a6-405d-4e29-43d8-354f53ae4e8b@linux.intel.com

    Dave Airlie
     

14 Jun, 2020

1 commit

  • Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
    '---help---'"), the number of '---help---' has been gradually
    decreasing, but there are still more than 2400 instances.

    This commit finishes the conversion. While I touched the lines,
    I also fixed the indentation.

    There are a variety of indentation styles found.

    a) 4 spaces + '---help---'
    b) 7 spaces + '---help---'
    c) 8 spaces + '---help---'
    d) 1 space + 1 tab + '---help---'
    e) 1 tab + '---help---' (correct indentation)
    f) 1 tab + 1 space + '---help---'
    g) 1 tab + 2 spaces + '---help---'

    In order to convert all of them to 1 tab + 'help', I ran the
    following commend:

    $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

10 Jun, 2020

1 commit

  • This use is converted manually ahead of the next patch in the series, as
    it requires including a new header which the automated conversion would
    miss.

    Signed-off-by: Michel Lespinasse
    Signed-off-by: Andrew Morton
    Reviewed-by: Daniel Jordan
    Reviewed-by: Laurent Dufour
    Reviewed-by: Vlastimil Babka
    Cc: Davidlohr Bueso
    Cc: David Rientjes
    Cc: Hugh Dickins
    Cc: Jason Gunthorpe
    Cc: Jerome Glisse
    Cc: John Hubbard
    Cc: Liam Howlett
    Cc: Matthew Wilcox
    Cc: Peter Zijlstra
    Cc: Ying Han
    Link: http://lkml.kernel.org/r/20200520052908.204642-4-walken@google.com
    Signed-off-by: Linus Torvalds

    Michel Lespinasse