1. 11 Jun, 2021 2 commits
  2. 02 Jun, 2021 6 commits
    • Alexander Aring's avatar
      fs: dlm: rename socket and app buffer defines · d10a0b88
      Alexander Aring authored
      This patch renames DEFAULT_BUFFER_SIZE to DLM_MAX_SOCKET_BUFSIZE and
      LOWCOMMS_MAX_TX_BUFFER_LEN to DLM_MAX_APP_BUFSIZE as they are proper
      names to define what's behind those values. The DLM_MAX_SOCKET_BUFSIZE
      defines the maximum size of buffer which can be handled on socket layer,
      the DLM_MAX_APP_BUFSIZE defines the maximum size of buffer which can be
      handled by the DLM application layer.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      d10a0b88
    • Alexander Aring's avatar
      fs: dlm: introduce proto values · ac7d5d03
      Alexander Aring authored
      Currently the dlm protocol values are that TCP is 0 and everything else
      is SCTP. This makes it difficult to introduce possible other transport
      layers. The only one user space tool dlm_controld, which I am aware of,
      handles the protocol value 1 for SCTP. We change it now to handle SCTP
      as 1, this will break user space API but it will fix it so we can add
      possible other transport layers.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      ac7d5d03
    • Alexander Aring's avatar
      fs: dlm: move dlm allow conn · 9a4139a7
      Alexander Aring authored
      This patch checks if possible allowing new connections is allowed before
      queueing the listen socket to accept new connections.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      9a4139a7
    • Alexander Aring's avatar
      fs: dlm: use alloc_ordered_workqueue · 6c6a1cc6
      Alexander Aring authored
      The proper way to allocate ordered workqueues is to use
      alloc_ordered_workqueue() function. The current way implies an ordered
      workqueue which is also required by dlm.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      6c6a1cc6
    • Alexander Aring's avatar
      fs: dlm: fix memory leak when fenced · 700ab1c3
      Alexander Aring authored
      I got some kmemleak report when a node was fenced. The user space tool
      dlm_controld will therefore run some rmdir() in dlm configfs which was
      triggering some memleaks. This patch stores the sps and cms attributes
      which stores some handling for subdirectories of the configfs cluster
      entry and free them if they get released as the parent directory gets
      freed.
      
      unreferenced object 0xffff88810d9e3e00 (size 192):
        comm "dlm_controld", pid 342, jiffies 4294698126 (age 55438.801s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 73 70 61 63 65 73 00 00  ........spaces..
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<00000000db8b640b>] make_cluster+0x5d/0x360
          [<000000006a571db4>] configfs_mkdir+0x274/0x730
          [<00000000b094501c>] vfs_mkdir+0x27e/0x340
          [<0000000058b0adaf>] do_mkdirat+0xff/0x1b0
          [<00000000d1ffd156>] do_syscall_64+0x40/0x80
          [<00000000ab1408c8>] entry_SYSCALL_64_after_hwframe+0x44/0xae
      unreferenced object 0xffff88810d9e3a00 (size 192):
        comm "dlm_controld", pid 342, jiffies 4294698126 (age 55438.801s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 63 6f 6d 6d 73 00 00 00  ........comms...
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<00000000a7ef6ad2>] make_cluster+0x82/0x360
          [<000000006a571db4>] configfs_mkdir+0x274/0x730
          [<00000000b094501c>] vfs_mkdir+0x27e/0x340
          [<0000000058b0adaf>] do_mkdirat+0xff/0x1b0
          [<00000000d1ffd156>] do_syscall_64+0x40/0x80
          [<00000000ab1408c8>] entry_SYSCALL_64_after_hwframe+0x44/0xae
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      700ab1c3
    • Alexander Aring's avatar
      fs: dlm: fix lowcomms_start error case · fcef0e6c
      Alexander Aring authored
      This patch fixes the error path handling in lowcomms_start(). We need to
      cleanup some static allocated data structure and cleanup possible
      workqueue if these have started.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      fcef0e6c
  3. 26 May, 2021 2 commits
  4. 25 May, 2021 16 commits
    • Alexander Aring's avatar
      fs: dlm: don't allow half transmitted messages · 706474fb
      Alexander Aring authored
      This patch will clean a dirty page buffer if a reconnect occurs. If a page
      buffer was half transmitted we cannot start inside the middle of a dlm
      message if a node connects again. I observed invalid length receptions
      errors and was guessing that this behaviour occurs, after this patch I
      never saw an invalid message length again. This patch might drops more
      messages for dlm version 3.1 but 3.1 can't deal with half messages as
      well, for 3.2 it might trigger more re-transmissions but will not leave dlm
      in a broken state.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      706474fb
    • Alexander Aring's avatar
      fs: dlm: add midcomms debugfs functionality · 5b2f981f
      Alexander Aring authored
      This patch adds functionality to debug midcomms per connection state
      inside a comms directory which is similar like dlm configfs. Currently
      there exists the possibility to read out two attributes which is the
      send queue counter and the version of each midcomms node state.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      5b2f981f
    • Alexander Aring's avatar
      fs: dlm: add reliable connection if reconnect · 489d8e55
      Alexander Aring authored
      This patch introduce to make a tcp lowcomms connection reliable even if
      reconnects occurs. This is done by an application layer re-transmission
      handling and sequence numbers in dlm protocols. There are three new dlm
      commands:
      
      DLM_OPTS:
      
      This will encapsulate an existing dlm message (and rcom message if they
      don't have an own application side re-transmission handling). As optional
      handling additional tlv's (type length fields) can be appended. This can
      be for example a sequence number field. However because in DLM_OPTS the
      lockspace field is unused and a sequence number is a mandatory field it
      isn't made as a tlv and we put the sequence number inside the lockspace
      id. The possibility to add optional options are still there for future
      purposes.
      
      DLM_ACK:
      
      Just a dlm header to acknowledge the receive of a DLM_OPTS message to
      it's sender.
      
      DLM_FIN:
      
      This provides a 4 way handshake for connection termination inclusive
      support for half-closed connections. It's provided on application layer
      because SCTP doesn't support half-closed sockets, the shutdown() call
      can interrupted by e.g. TCP resets itself and a hard logic to implement
      it because the othercon paradigm in lowcomms. The 4-way termination
      handshake also solve problems to synchronize peer EOF arrival and that
      the cluster manager removes the peer in the node membership handling of
      DLM. In some cases messages can be still transmitted in this time and we
      need to wait for the node membership event.
      
      To provide a reliable connection the node will retransmit all
      unacknowledges message to it's peer on reconnect. The receiver will then
      filtering out the next received message and drop all messages which are
      duplicates.
      
      As RCOM_STATUS and RCOM_NAMES messages are the first messages which are
      exchanged and they have they own re-transmission handling, there exists
      logic that these messages must be first. If these messages arrives we
      store the dlm version field. This handling is on DLM 3.1 and after this
      patch 3.2 the same. A backwards compatibility handling has been added
      which seems to work on tests without tcpkill, however it's not recommended
      to use DLM 3.1 and 3.2 at the same time, because DLM 3.2 tries to fix long
      term bugs in the DLM protocol.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      489d8e55
    • Alexander Aring's avatar
      fs: dlm: add union in dlm header for lockspace id · 8e2e4086
      Alexander Aring authored
      This patch adds union inside the lockspace id to handle it also for
      another use case for a different dlm command.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      8e2e4086
    • Alexander Aring's avatar
      fs: dlm: move out some hash functionality · 37a247da
      Alexander Aring authored
      This patch moves out some lowcomms hash functionality into lowcomms
      header to provide them to other layers like midcomms as well.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      37a247da
    • Alexander Aring's avatar
      fs: dlm: add functionality to re-transmit a message · 2874d1a6
      Alexander Aring authored
      This patch introduces a retransmit functionality for a lowcomms message
      handle. It's just allocates a new buffer and transmit it again, no
      special handling about prioritize it because keeping bytestream in order.
      
      To avoid another connection look some refactor was done to make a new
      buffer allocation with a preexisting connection pointer.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      2874d1a6
    • Alexander Aring's avatar
      fs: dlm: make buffer handling per msg · 8f2dc78d
      Alexander Aring authored
      This patch makes the void pointer handle for lowcomms functionality per
      message and not per page allocation entry. A refcount handling for the
      handle was added to keep the message alive until the user doesn't need
      it anymore.
      
      There exists now a per message callback which will be called when
      allocating a new buffer. This callback will be guaranteed to be called
      according the order of the sending buffer, which can be used that the
      caller increments a sequence number for the dlm message handle.
      
      For transition process we cast the dlm_mhandle to dlm_msg and vice versa
      until the midcomms layer will implement a specific dlm_mhandle structure.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      8f2dc78d
    • Alexander Aring's avatar
      fs: dlm: add more midcomms hooks · a070a91c
      Alexander Aring authored
      This patch prepares hooks to redirect to the midcomms layer which will
      be used by the midcomms re-transmit handling.
      
      There exists the new concept of stateless buffers allocation and
      commits. This can be used to bypass the midcomms re-transmit handling. It
      is used by RCOM_STATUS and RCOM_NAMES messages, because they have their
      own ping-like re-transmit handling. As well these two messages will be
      used to determine the DLM version per node, because these two messages
      are per observation the first messages which are exchanged.
      
      Cluster manager events for node membership are added to add support for
      half-closed connections in cases that the peer connection get to
      an end of file but DLM still holds membership of the node. In
      this time DLM can still trigger new message which we should allow. After
      the cluster manager node removal event occurs it safe to close the
      connection.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      a070a91c
    • Alexander Aring's avatar
      fs: dlm: public header in out utility · 6fb5cf9d
      Alexander Aring authored
      This patch allows to use header_out() and header_in() outside of dlm
      util functionality.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      6fb5cf9d
    • Alexander Aring's avatar
      fs: dlm: fix connection tcp EOF handling · 8aa31cbf
      Alexander Aring authored
      This patch fixes the EOF handling for TCP that if and EOF is received we
      will close the socket next time the writequeue runs empty. This is a
      half-closed socket functionality which doesn't exists in SCTP. The
      midcomms layer will do a half closed socket functionality on DLM side to
      solve this problem for the SCTP case. However there is still the last ack
      flying around but other reset functionality will take care of it if it got
      lost.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      8aa31cbf
    • Alexander Aring's avatar
      fs: dlm: cancel work sync othercon · c6aa00e3
      Alexander Aring authored
      These rx tx flags arguments are for signaling close_connection() from
      which worker they are called. Obviously the receive worker cannot cancel
      itself and vice versa for swork. For the othercon the receive worker
      should only be used, however to avoid deadlocks we should pass the same
      flags as the original close_connection() was called.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      c6aa00e3
    • Alexander Aring's avatar
      fs: dlm: reconnect if socket error report occurs · ba868d9d
      Alexander Aring authored
      This patch will change the reconnect handling that if an error occurs
      if a socket error callback is occurred. This will also handle reconnects
      in a non blocking connecting case which is currently missing. If error
      ECONNREFUSED is reported we delay the reconnect by one second.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      ba868d9d
    • Alexander Aring's avatar
      fs: dlm: set is othercon flag · 7443bc96
      Alexander Aring authored
      There is a is othercon flag which is never used, this patch will set it
      and printout a warning if the othercon ever sends a dlm message which
      should never be the case.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      7443bc96
    • Alexander Aring's avatar
      fs: dlm: fix srcu read lock usage · b38bc9c2
      Alexander Aring authored
      This patch holds the srcu connection read lock in cases where we lookup
      the connections and accessing it. We don't hold the srcu lock in workers
      function where the scheduled worker is part of the connection itself.
      The connection should not be freed if any worker is scheduled or
      pending.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      b38bc9c2
    • Alexander Aring's avatar
      fs: dlm: add dlm macros for ratelimit log · 2df6b762
      Alexander Aring authored
      This patch add ratelimit macro to dlm subsystem and will set the
      connecting log message to ratelimit. In non blocking connecting cases it
      will print out this message a lot.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      2df6b762
    • Alexander Aring's avatar
      fs: dlm: always run complete for possible waiters · c937aabb
      Alexander Aring authored
      This patch changes the ping_members() result that we always run
      complete() for possible waiters. We handle the -EINTR error code as
      successful. This error code is returned if the recovery is stopped which
      is likely that a new recovery is triggered with a new members
      configuration and ping_members() runs again.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      c937aabb
  5. 09 May, 2021 10 commits
    • Linus Torvalds's avatar
      Linux 5.13-rc1 · 6efb943b
      Linus Torvalds authored
      6efb943b
    • Linus Torvalds's avatar
      fbmem: fix horribly incorrect placement of __maybe_unused · 6dae40ae
      Linus Torvalds authored
      Commit b9d79e4c ("fbmem: Mark proc_fb_seq_ops as __maybe_unused")
      places the '__maybe_unused' in an entirely incorrect location between
      the "struct" keyword and the structure name.
      
      It's a wonder that gcc accepts that silently, but clang quite reasonably
      warns about it:
      
          drivers/video/fbdev/core/fbmem.c:736:21: warning: attribute declaration must precede definition [-Wignored-attributes]
          static const struct __maybe_unused seq_operations proc_fb_seq_ops = {
                              ^
      
      Fix it.
      
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6dae40ae
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2021-05-10' of git://anongit.freedesktop.org/drm/drm · efc58a96
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Bit later than usual, I queued them all up on Friday then promptly
        forgot to write the pull request email. This is mainly amdgpu fixes,
        with some radeon/msm/fbdev and one i915 gvt fix thrown in.
      
        amdgpu:
         - MPO hang workaround
         - Fix for concurrent VM flushes on vega/navi
         - dcefclk is not adjustable on navi1x and newer
         - MST HPD debugfs fix
         - Suspend/resumes fixes
         - Register VGA clients late in case driver fails to load
         - Fix GEM leak in user framebuffer create
         - Add support for polaris12 with 32 bit memory interface
         - Fix duplicate cursor issue when using overlay
         - Fix corruption with tiled surfaces on VCN3
         - Add BO size and stride check to fix BO size verification
      
        radeon:
         - Fix off-by-one in power state parsing
         - Fix possible memory leak in power state parsing
      
        msm:
         - NULL ptr dereference fix
      
        fbdev:
         - procfs disabled warning fix
      
        i915:
         - gvt: Fix a possible division by zero in vgpu display rate
           calculation"
      
      * tag 'drm-next-2021-05-10' of git://anongit.freedesktop.org/drm/drm:
        drm/amdgpu: Use device specific BO size & stride check.
        drm/amdgpu: Init GFX10_ADDR_CONFIG for VCN v3 in DPG mode.
        drm/amd/pm: initialize variable
        drm/radeon: Avoid power table parsing memory leaks
        drm/radeon: Fix off-by-one power_state index heap overwrite
        drm/amd/display: Fix two cursor duplication when using overlay
        drm/amdgpu: add new MC firmware for Polaris12 32bit ASIC
        fbmem: Mark proc_fb_seq_ops as __maybe_unused
        drm/msm/dpu: Delete bonkers code
        drm/i915/gvt: Prevent divided by zero when calculating refresh rate
        amdgpu: fix GEM obj leak in amdgpu_display_user_framebuffer_create
        drm/amdgpu: Register VGA clients after init can no longer fail
        drm/amdgpu: Handling of amdgpu_device_resume return value for graceful teardown
        drm/amdgpu: fix r initial values
        drm/amd/display: fix wrong statement in mst hpd debugfs
        amdgpu/pm: set pp_dpm_dcefclk to readonly on NAVI10 and newer gpus
        amdgpu/pm: Prevent force of DCEFCLK on NAVI10 and SIENNA_CICHLID
        drm/amdgpu: fix concurrent VM flushes on Vega/Navi v2
        drm/amd/display: Reject non-zero src_y and src_x for video planes
      efc58a96
    • Linus Torvalds's avatar
      Merge tag 'block-5.13-2021-05-09' of git://git.kernel.dk/linux-block · 506c3079
      Linus Torvalds authored
      Pull block fix from Jens Axboe:
       "Turns out the bio max size change still has issues, so let's get it
        reverted for 5.13-rc1. We'll shake out the issues there and defer it
        to 5.14 instead"
      
      * tag 'block-5.13-2021-05-09' of git://git.kernel.dk/linux-block:
        Revert "bio: limit bio max size"
      506c3079
    • Linus Torvalds's avatar
      Merge tag '5.13-rc-smb3-part3' of git://git.samba.org/sfrench/cifs-2.6 · 0a55a1fb
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Three small SMB3 chmultichannel related changesets (also for stable)
        from the SMB3 test event this week.
      
        The other fixes are still in review/testing"
      
      * tag '5.13-rc-smb3-part3' of git://git.samba.org/sfrench/cifs-2.6:
        smb3: if max_channels set to more than one channel request multichannel
        smb3: do not attempt multichannel to server which does not support it
        smb3: when mounting with multichannel include it in requested capabilities
      0a55a1fb
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2021-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9819f682
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
       "A set of scheduler updates:
      
         - Prevent PSI state corruption when schedule() races with cgroup
           move.
      
           A recent commit combined two PSI callbacks to reduce the number of
           cgroup tree updates, but missed that schedule() can drop rq::lock
           for load balancing, which opens the race window for
           cgroup_move_task() which then observes half updated state.
      
           The fix is to solely use task::ps_flags instead of looking at the
           potentially mismatching scheduler state
      
         - Prevent an out-of-bounds access in uclamp caused bu a rounding
           division which can lead to an off-by-one error exceeding the
           buckets array size.
      
         - Prevent unfairness caused by missing load decay when a task is
           attached to a cfs runqueue.
      
           The old load of the task was attached to the runqueue and never
           removed. Fix it by enforcing the load update through the hierarchy
           for unthrottled run queue instances.
      
         - A documentation fix fot the 'sched_verbose' command line option"
      
      * tag 'sched-urgent-2021-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: Fix unfairness caused by missing load decay
        sched: Fix out-of-bound access in uclamp
        psi: Fix psi state corruption when schedule() races with cgroup move
        sched,doc: sched_debug_verbose cmdline should be sched_verbose
      9819f682
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2021-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 732a27a0
      Linus Torvalds authored
      Pull locking fixes from Thomas Gleixner:
       "A set of locking related fixes and updates:
      
         - Two fixes for the futex syscall related to the timeout handling.
      
           FUTEX_LOCK_PI does not support the FUTEX_CLOCK_REALTIME bit and
           because it's not set the time namespace adjustment for clock
           MONOTONIC is applied wrongly.
      
           FUTEX_WAIT cannot support the FUTEX_CLOCK_REALTIME bit because its
           always a relative timeout.
      
         - Cleanups in the futex syscall entry points which became obvious
           when the two timeout handling bugs were fixed.
      
         - Cleanup of queued_write_lock_slowpath() as suggested by Linus
      
         - Fixup of the smp_call_function_single_async() prototype"
      
      * tag 'locking-urgent-2021-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        futex: Make syscall entry points less convoluted
        futex: Get rid of the val2 conditional dance
        futex: Do not apply time namespace adjustment on FUTEX_LOCK_PI
        Revert 337f1304 ("futex: Allow FUTEX_CLOCK_REALTIME with FUTEX_WAIT op")
        locking/qrwlock: Cleanup queued_write_lock_slowpath()
        smp: Fix smp_call_function_single_async prototype
      732a27a0
    • Linus Torvalds's avatar
      Merge tag 'perf_urgent_for_v5.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 85bbba1c
      Linus Torvalds authored
      Pull x86 perf fix from Borislav Petkov:
       "Handle power-gating of AMD IOMMU perf counters properly when they are
        used"
      
      * tag 'perf_urgent_for_v5.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/events/amd/iommu: Fix invalid Perf result due to IOMMU PMC power-gating
      85bbba1c
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v5.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · dd3e4012
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
       "A bunch of things accumulated for x86 in the last two weeks:
      
         - Fix guest vtime accounting so that ticks happening while the guest
           is running can also be accounted to it. Along with a consolidation
           to the guest-specific context tracking helpers.
      
         - Provide for the host NMI handler running after a VMX VMEXIT to be
           able to run on the kernel stack correctly.
      
         - Initialize MSR_TSC_AUX when RDPID is supported and not RDTSCP (virt
           relevant - real hw supports both)
      
         - A code generation improvement to TASK_SIZE_MAX through the use of
           alternatives
      
         - The usual misc and related cleanups and improvements"
      
      * tag 'x86_urgent_for_v5.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        KVM: x86: Consolidate guest enter/exit logic to common helpers
        context_tracking: KVM: Move guest enter/exit wrappers to KVM's domain
        context_tracking: Consolidate guest enter/exit wrappers
        sched/vtime: Move guest enter/exit vtime accounting to vtime.h
        sched/vtime: Move vtime accounting external declarations above inlines
        KVM: x86: Defer vtime accounting 'til after IRQ handling
        context_tracking: Move guest exit vtime accounting to separate helpers
        context_tracking: Move guest exit context tracking to separate helpers
        KVM/VMX: Invoke NMI non-IST entry instead of IST entry
        x86/cpu: Remove write_tsc() and write_rdtscp_aux() wrappers
        x86/cpu: Initialize MSR_TSC_AUX if RDTSCP *or* RDPID is supported
        x86/resctrl: Fix init const confusion
        x86: Delete UD0, UD1 traces
        x86/smpboot: Remove duplicate includes
        x86/cpu: Use alternative to generate the TASK_SIZE_MAX constant
      dd3e4012
    • Jens Axboe's avatar
      Revert "bio: limit bio max size" · 35c820e7
      Jens Axboe authored
      This reverts commit cd2c7545.
      
      Alex reports that the commit causes corruption with LUKS on ext4. Revert
      it for now so that this can be investigated properly.
      
      Link: https://lore.kernel.org/linux-block/1620493841.bxdq8r5haw.none@localhost/Reported-by: default avatarAlex Xu (Hello71) <alex_y_xu@yahoo.ca>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      35c820e7
  6. 08 May, 2021 4 commits
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.13-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · b7415964
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - A fix to avoid over-allocating the kernel's mapping on !MMU systems,
         which could lead to up to 2MiB of lost memory
      
       - The SiFive address extension errata only manifest on rv64, they are
         now disabled on rv32 where they are unnecessary
      
       - A pair of late-landing cleanups
      
      * tag 'riscv-for-linus-5.13-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: remove unused handle_exception symbol
        riscv: Consistify protect_kernel_linear_mapping_text_rodata() use
        riscv: enable SiFive errata CIP-453 and CIP-1200 Kconfig only if CONFIG_64BIT=y
        riscv: Only extend kernel reservation if mapped read-only
      b7415964
    • Linus Torvalds's avatar
      drm/i915/display: fix compiler warning about array overrun · fec4d427
      Linus Torvalds authored
      intel_dp_check_mst_status() uses a 14-byte array to read the DPRX Event
      Status Indicator data, but then passes that buffer at offset 10 off as
      an argument to drm_dp_channel_eq_ok().
      
      End result: there are only 4 bytes remaining of the buffer, yet
      drm_dp_channel_eq_ok() wants a 6-byte buffer.  gcc-11 correctly warns
      about this case:
      
        drivers/gpu/drm/i915/display/intel_dp.c: In function ‘intel_dp_check_mst_status’:
        drivers/gpu/drm/i915/display/intel_dp.c:3491:22: warning: ‘drm_dp_channel_eq_ok’ reading 6 bytes from a region of size 4 [-Wstringop-overread]
         3491 |                     !drm_dp_channel_eq_ok(&esi[10], intel_dp->lane_count)) {
              |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        drivers/gpu/drm/i915/display/intel_dp.c:3491:22: note: referencing argument 1 of type ‘const u8 *’ {aka ‘const unsigned char *’}
        In file included from drivers/gpu/drm/i915/display/intel_dp.c:38:
        include/drm/drm_dp_helper.h:1466:6: note: in a call to function ‘drm_dp_channel_eq_ok’
         1466 | bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
              |      ^~~~~~~~~~~~~~~~~~~~
             6:14 elapsed
      
      This commit just extends the original array by 2 zero-initialized bytes,
      avoiding the warning.
      
      There may be some underlying bug in here that caused this confusion, but
      this is at least no worse than the existing situation that could use
      random data off the stack.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Dave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fec4d427
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 07db0563
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "This is a set of minor fixes in various drivers (qla2xxx, ufs,
        scsi_debug, lpfc) one doc fix and a fairly large update to the fnic
        driver to remove the open coded iteration functions in favour of the
        scsi provided ones"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: fnic: Use scsi_host_busy_iter() to traverse commands
        scsi: fnic: Kill 'exclude_id' argument to fnic_cleanup_io()
        scsi: scsi_debug: Fix cmd_per_lun, set to max_queue
        scsi: ufs: core: Narrow down fast path in system suspend path
        scsi: ufs: core: Cancel rpm_dev_flush_recheck_work during system suspend
        scsi: ufs: core: Do not put UFS power into LPM if link is broken
        scsi: qla2xxx: Prevent PRLI in target mode
        scsi: qla2xxx: Add marginal path handling support
        scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found
        scsi: ufs: core: Fix a typo in ufs-sysfs.c
        scsi: lpfc: Fix bad memory access during VPD DUMP mailbox command
        scsi: lpfc: Fix DMA virtual address ptr assignment in bsg
        scsi: lpfc: Fix illegal memory access on Abort IOCBs
        scsi: blk-mq: Fix build warning when making htmldocs
      07db0563
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 0f979d81
      Linus Torvalds authored
      Pull more Kbuild updates from Masahiro Yamada:
      
       - Convert sh and sparc to use generic shell scripts to generate the
         syscall headers
      
       - refactor .gitignore files
      
       - Update kernel/config_data.gz only when the content of the .config
         is really changed, which avoids the unneeded re-link of vmlinux
      
       - move "remove stale files" workarounds to scripts/remove-stale-files
      
       - suppress unused-but-set-variable warnings by default for Clang
         as well
      
       - fix locale setting LANG=C to LC_ALL=C
      
       - improve 'make distclean'
      
       - always keep intermediate objects from scripts/link-vmlinux.sh
      
       - move IF_ENABLED out of <linux/kconfig.h> to make it self-contained
      
       - misc cleanups
      
      * tag 'kbuild-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (25 commits)
        linux/kconfig.h: replace IF_ENABLED() with PTR_IF() in <linux/kernel.h>
        kbuild: Don't remove link-vmlinux temporary files on exit/signal
        kbuild: remove the unneeded comments for external module builds
        kbuild: make distclean remove tag files in sub-directories
        kbuild: make distclean work against $(objtree) instead of $(srctree)
        kbuild: refactor modname-multi by using suffix-search
        kbuild: refactor fdtoverlay rule
        kbuild: parameterize the .o part of suffix-search
        arch: use cross_compiling to check whether it is a cross build or not
        kbuild: remove ARCH=sh64 support from top Makefile
        .gitignore: prefix local generated files with a slash
        kbuild: replace LANG=C with LC_ALL=C
        Makefile: Move -Wno-unused-but-set-variable out of GCC only block
        kbuild: add a script to remove stale generated files
        kbuild: update config_data.gz only when the content of .config is changed
        .gitignore: ignore only top-level modules.builtin
        .gitignore: move tags and TAGS close to other tag files
        kernel/.gitgnore: remove stale timeconst.h and hz.bc
        usr/include: refactor .gitignore
        genksyms: fix stale comment
        ...
      0f979d81