Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

created by mistake #2 #279

Closed
wants to merge 3 commits into from
Closed

created by mistake #2 #279

wants to merge 3 commits into from

Conversation

cnd
Copy link

@cnd cnd commented Apr 29, 2016

No description provided.

paolo-github and others added 3 commits April 29, 2016 16:23
Update Kconfig.iosched and do the related Makefile changes to include
kernel configuration options for BFQ. Also increase the number of
policies supported by the blkio controller so that BFQ can add its
own.

Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini@google.com>
The general structure is borrowed from CFQ, as much of the code for
handling I/O contexts. Over time, several useful features have been
ported from CFQ as well (details in the changelog in README.BFQ). A
(bfq_)queue is associated to each task doing I/O on a device, and each
time a scheduling decision has to be made a queue is selected and served
until it expires.

    - Slices are given in the service domain: tasks are assigned
      budgets, measured in number of sectors. Once got the disk, a task
      must however consume its assigned budget within a configurable
      maximum time (by default, the maximum possible value of the
      budgets is automatically computed to comply with this timeout).
      This allows the desired latency vs "throughput boosting" tradeoff
      to be set.

    - Budgets are scheduled according to a variant of WF2Q+, implemented
      using an augmented rb-tree to take eligibility into account while
      preserving an O(log N) overall complexity.

    - A low-latency tunable is provided; if enabled, both interactive
      and soft real-time applications are guaranteed a very low latency.

    - Latency guarantees are preserved also in the presence of NCQ.

    - Also with flash-based devices, a high throughput is achieved
      while still preserving latency guarantees.

    - BFQ features Early Queue Merge (EQM), a sort of fusion of the
      cooperating-queue-merging and the preemption mechanisms present
      in CFQ. EQM is in fact a unified mechanism that tries to get a
      sequential read pattern, and hence a high throughput, with any
      set of processes performing interleaved I/O over a contiguous
      sequence of sectors.

    - BFQ supports full hierarchical scheduling, exporting a cgroups
      interface.  Since each node has a full scheduler, each group can
      be assigned its own weight.

    - If the cgroups interface is not used, only I/O priorities can be
      assigned to processes, with ioprio values mapped to weights
      with the relation weight = IOPRIO_BE_NR - ioprio.

    - ioprio classes are served in strict priority order, i.e., lower
      priority queues are not served as long as there are higher
      priority queues.  Among queues in the same class the bandwidth is
      distributed in proportion to the weight of each queue. A very
      thin extra bandwidth is however guaranteed to the Idle class, to
      prevent it from starving.

Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini@google.com>
A set of processes may happen  to  perform interleaved reads, i.e.,requests
whose union would give rise to a  sequential read  pattern.  There are two
typical  cases: in the first  case,   processes  read  fixed-size chunks of
data at a fixed distance from each other, while in the second case processes
may read variable-size chunks at  variable distances. The latter case occurs
for  example with  QEMU, which  splits the  I/O generated  by the  guest into
multiple chunks,  and lets these chunks  be served by a  pool of cooperating
processes,  iteratively  assigning  the  next  chunk of  I/O  to  the first
available  process. CFQ  uses actual  queue merging  for the  first type of
rocesses, whereas it  uses preemption to get a sequential  read pattern out
of the read requests  performed by the second type of  processes. In the end
it uses  two different  mechanisms to  achieve the  same goal: boosting the
throughput with interleaved I/O.

This patch introduces  Early Queue Merge (EQM), a unified mechanism to get a
sequential  read pattern  with both  types of  processes. The  main idea is
checking newly arrived requests against the next request of the active queue
both in case of actual request insert and in case of request merge. By doing
so, both the types of processes can be handled by just merging their queues.
EQM is  then simpler and  more compact than the  pair of mechanisms used in
CFQ.

Finally, EQM  also preserves the  typical low-latency properties of BFQ, by
properly restoring the weight-raising state of a queue when it gets back to
a non-merged state.

Signed-off-by: Mauro Andreolini <mauro.andreolini@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini@google.com>
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
@cnd cnd closed this Apr 29, 2016
@cnd cnd changed the title Bfq created by mistake #2 Apr 29, 2016
@cnd cnd deleted the BFQ branch May 16, 2016 07:18
laijs pushed a commit to laijs/linux that referenced this pull request Feb 13, 2017
Add support for mounting partitions
ldts pushed a commit to ldts/linux that referenced this pull request Apr 23, 2021
sean-jc added a commit to sean-jc/linux that referenced this pull request Dec 28, 2021
Reject KVM_RUN if emulation is required (because VMX is running without
unrestricted guest) and an exception is pending, as KVM doesn't support
emulating exceptions except when emulating real mode via vm86.  The vCPU
is hosed either way, but letting KVM_RUN proceed triggers a WARN due to
the impossible condition.  Alternatively, the WARN could be removed, but
then userspace and/or KVM bugs would result in the vCPU silently running
in a bad state, which isn't very friendly to users.

Originally, the bug was hit by syzkaller with a nested guest as that
doesn't require kvm_intel.unrestricted_guest=0.  That particular flavor
is likely fixed by commit cd0e615 ("KVM: nVMX: Synthesize
TRIPLE_FAULT for L2 if emulation is required"), but it's trivial to
trigger the WARN with a non-nested guest, and userspace can likely force
bad state via ioctls() for a nested guest as well.

Check for the impossible condition needs to be deferred until KVM_RUN
because KVM can't force specific ordering between ioctls.  E.g. clearing
exception.pending in KVM_SET_SREGS doesn't prevent userspace from setting
it in KVM_SET_VCPU_EVENTS, and disallowing KVM_SET_VCPU_EVENTS with
emulation_required would prevent userspace from queuing an exception and
then stuffing sregs.  Note, if KVM were to try and detect/prevent the
condition prior to KVM_RUN, handle_invalid_guest_state() and/or
handle_emulation_failure() would need to be modified to clear the pending
exception prior to exiting to userspace.

 ------------[ cut here ]------------
 WARNING: CPU: 6 PID: 137812 at arch/x86/kvm/vmx/vmx.c:1623 vmx_queue_exception+0x14f/0x160 [kvm_intel]
 CPU: 6 PID: 137812 Comm: vmx_invalid_nes Not tainted 5.15.2-7cc36c3e14ae-pop torvalds#279
 Hardware name: ASUS Q87M-E/Q87M-E, BIOS 1102 03/03/2014
 RIP: 0010:vmx_queue_exception+0x14f/0x160 [kvm_intel]
 Code: <0f> 0b e9 fd fe ff ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00
 RSP: 0018:ffffa45c83577d38 EFLAGS: 00010202
 RAX: 0000000000000003 RBX: 0000000080000006 RCX: 0000000000000006
 RDX: 0000000000000000 RSI: 0000000000010002 RDI: ffff9916af734000
 RBP: ffff9916af734000 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000006
 R13: 0000000000000000 R14: ffff9916af734038 R15: 0000000000000000
 FS:  00007f1e1a47c740(0000) GS:ffff99188fb80000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 00007f1e1a6a8008 CR3: 000000026f83b005 CR4: 00000000001726e0
 Call Trace:
  kvm_arch_vcpu_ioctl_run+0x13a2/0x1f20 [kvm]
  kvm_vcpu_ioctl+0x279/0x690 [kvm]
  __x64_sys_ioctl+0x83/0xb0
  do_syscall_64+0x3b/0xc0
  entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported-by: syzbot+82112403ace4cbd780d8@syzkaller.appspotmail.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
sean-jc added a commit to sean-jc/linux that referenced this pull request Dec 28, 2021
Reject KVM_RUN if emulation is required (because VMX is running without
unrestricted guest) and an exception is pending, as KVM doesn't support
emulating exceptions except when emulating real mode via vm86.  The vCPU
is hosed either way, but letting KVM_RUN proceed triggers a WARN due to
the impossible condition.  Alternatively, the WARN could be removed, but
then userspace and/or KVM bugs would result in the vCPU silently running
in a bad state, which isn't very friendly to users.

Originally, the bug was hit by syzkaller with a nested guest as that
doesn't require kvm_intel.unrestricted_guest=0.  That particular flavor
is likely fixed by commit cd0e615 ("KVM: nVMX: Synthesize
TRIPLE_FAULT for L2 if emulation is required"), but it's trivial to
trigger the WARN with a non-nested guest, and userspace can likely force
bad state via ioctls() for a nested guest as well.

Checking for the impossible condition needs to be deferred until KVM_RUN
because KVM can't force specific ordering between ioctls.  E.g. clearing
exception.pending in KVM_SET_SREGS doesn't prevent userspace from setting
it in KVM_SET_VCPU_EVENTS, and disallowing KVM_SET_VCPU_EVENTS with
emulation_required would prevent userspace from queuing an exception and
then stuffing sregs.  Note, if KVM were to try and detect/prevent the
condition prior to KVM_RUN, handle_invalid_guest_state() and/or
handle_emulation_failure() would need to be modified to clear the pending
exception prior to exiting to userspace.

 ------------[ cut here ]------------
 WARNING: CPU: 6 PID: 137812 at arch/x86/kvm/vmx/vmx.c:1623 vmx_queue_exception+0x14f/0x160 [kvm_intel]
 CPU: 6 PID: 137812 Comm: vmx_invalid_nes Not tainted 5.15.2-7cc36c3e14ae-pop torvalds#279
 Hardware name: ASUS Q87M-E/Q87M-E, BIOS 1102 03/03/2014
 RIP: 0010:vmx_queue_exception+0x14f/0x160 [kvm_intel]
 Code: <0f> 0b e9 fd fe ff ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00
 RSP: 0018:ffffa45c83577d38 EFLAGS: 00010202
 RAX: 0000000000000003 RBX: 0000000080000006 RCX: 0000000000000006
 RDX: 0000000000000000 RSI: 0000000000010002 RDI: ffff9916af734000
 RBP: ffff9916af734000 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000006
 R13: 0000000000000000 R14: ffff9916af734038 R15: 0000000000000000
 FS:  00007f1e1a47c740(0000) GS:ffff99188fb80000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 00007f1e1a6a8008 CR3: 000000026f83b005 CR4: 00000000001726e0
 Call Trace:
  kvm_arch_vcpu_ioctl_run+0x13a2/0x1f20 [kvm]
  kvm_vcpu_ioctl+0x279/0x690 [kvm]
  __x64_sys_ioctl+0x83/0xb0
  do_syscall_64+0x3b/0xc0
  entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported-by: syzbot+82112403ace4cbd780d8@syzkaller.appspotmail.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Dec 28, 2021
Reject KVM_RUN if emulation is required (because VMX is running without
unrestricted guest) and an exception is pending, as KVM doesn't support
emulating exceptions except when emulating real mode via vm86.  The vCPU
is hosed either way, but letting KVM_RUN proceed triggers a WARN due to
the impossible condition.  Alternatively, the WARN could be removed, but
then userspace and/or KVM bugs would result in the vCPU silently running
in a bad state, which isn't very friendly to users.

Originally, the bug was hit by syzkaller with a nested guest as that
doesn't require kvm_intel.unrestricted_guest=0.  That particular flavor
is likely fixed by commit cd0e615 ("KVM: nVMX: Synthesize
TRIPLE_FAULT for L2 if emulation is required"), but it's trivial to
trigger the WARN with a non-nested guest, and userspace can likely force
bad state via ioctls() for a nested guest as well.

Checking for the impossible condition needs to be deferred until KVM_RUN
because KVM can't force specific ordering between ioctls.  E.g. clearing
exception.pending in KVM_SET_SREGS doesn't prevent userspace from setting
it in KVM_SET_VCPU_EVENTS, and disallowing KVM_SET_VCPU_EVENTS with
emulation_required would prevent userspace from queuing an exception and
then stuffing sregs.  Note, if KVM were to try and detect/prevent the
condition prior to KVM_RUN, handle_invalid_guest_state() and/or
handle_emulation_failure() would need to be modified to clear the pending
exception prior to exiting to userspace.

 ------------[ cut here ]------------
 WARNING: CPU: 6 PID: 137812 at arch/x86/kvm/vmx/vmx.c:1623 vmx_queue_exception+0x14f/0x160 [kvm_intel]
 CPU: 6 PID: 137812 Comm: vmx_invalid_nes Not tainted 5.15.2-7cc36c3e14ae-pop torvalds#279
 Hardware name: ASUS Q87M-E/Q87M-E, BIOS 1102 03/03/2014
 RIP: 0010:vmx_queue_exception+0x14f/0x160 [kvm_intel]
 Code: <0f> 0b e9 fd fe ff ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00
 RSP: 0018:ffffa45c83577d38 EFLAGS: 00010202
 RAX: 0000000000000003 RBX: 0000000080000006 RCX: 0000000000000006
 RDX: 0000000000000000 RSI: 0000000000010002 RDI: ffff9916af734000
 RBP: ffff9916af734000 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000006
 R13: 0000000000000000 R14: ffff9916af734038 R15: 0000000000000000
 FS:  00007f1e1a47c740(0000) GS:ffff99188fb80000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 00007f1e1a6a8008 CR3: 000000026f83b005 CR4: 00000000001726e0
 Call Trace:
  kvm_arch_vcpu_ioctl_run+0x13a2/0x1f20 [kvm]
  kvm_vcpu_ioctl+0x279/0x690 [kvm]
  __x64_sys_ioctl+0x83/0xb0
  do_syscall_64+0x3b/0xc0
  entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported-by: syzbot+82112403ace4cbd780d8@syzkaller.appspotmail.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
sean-jc added a commit to sean-jc/linux that referenced this pull request Jan 18, 2022
Reject KVM_RUN if emulation is required (because VMX is running without
unrestricted guest) and an exception is pending, as KVM doesn't support
emulating exceptions except when emulating real mode via vm86.  The vCPU
is hosed either way, but letting KVM_RUN proceed triggers a WARN due to
the impossible condition.  Alternatively, the WARN could be removed, but
then userspace and/or KVM bugs would result in the vCPU silently running
in a bad state, which isn't very friendly to users.

Originally, the bug was hit by syzkaller with a nested guest as that
doesn't require kvm_intel.unrestricted_guest=0.  That particular flavor
is likely fixed by commit cd0e615 ("KVM: nVMX: Synthesize
TRIPLE_FAULT for L2 if emulation is required"), but it's trivial to
trigger the WARN with a non-nested guest, and userspace can likely force
bad state via ioctls() for a nested guest as well.

Checking for the impossible condition needs to be deferred until KVM_RUN
because KVM can't force specific ordering between ioctls.  E.g. clearing
exception.pending in KVM_SET_SREGS doesn't prevent userspace from setting
it in KVM_SET_VCPU_EVENTS, and disallowing KVM_SET_VCPU_EVENTS with
emulation_required would prevent userspace from queuing an exception and
then stuffing sregs.  Note, if KVM were to try and detect/prevent the
condition prior to KVM_RUN, handle_invalid_guest_state() and/or
handle_emulation_failure() would need to be modified to clear the pending
exception prior to exiting to userspace.

 ------------[ cut here ]------------
 WARNING: CPU: 6 PID: 137812 at arch/x86/kvm/vmx/vmx.c:1623 vmx_queue_exception+0x14f/0x160 [kvm_intel]
 CPU: 6 PID: 137812 Comm: vmx_invalid_nes Not tainted 5.15.2-7cc36c3e14ae-pop torvalds#279
 Hardware name: ASUS Q87M-E/Q87M-E, BIOS 1102 03/03/2014
 RIP: 0010:vmx_queue_exception+0x14f/0x160 [kvm_intel]
 Code: <0f> 0b e9 fd fe ff ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00
 RSP: 0018:ffffa45c83577d38 EFLAGS: 00010202
 RAX: 0000000000000003 RBX: 0000000080000006 RCX: 0000000000000006
 RDX: 0000000000000000 RSI: 0000000000010002 RDI: ffff9916af734000
 RBP: ffff9916af734000 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000006
 R13: 0000000000000000 R14: ffff9916af734038 R15: 0000000000000000
 FS:  00007f1e1a47c740(0000) GS:ffff99188fb80000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 00007f1e1a6a8008 CR3: 000000026f83b005 CR4: 00000000001726e0
 Call Trace:
  kvm_arch_vcpu_ioctl_run+0x13a2/0x1f20 [kvm]
  kvm_vcpu_ioctl+0x279/0x690 [kvm]
  __x64_sys_ioctl+0x83/0xb0
  do_syscall_64+0x3b/0xc0
  entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported-by: syzbot+82112403ace4cbd780d8@syzkaller.appspotmail.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211228232437.1875318-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
sean-jc added a commit to sean-jc/linux that referenced this pull request Jan 19, 2022
Reject KVM_RUN if emulation is required (because VMX is running without
unrestricted guest) and an exception is pending, as KVM doesn't support
emulating exceptions except when emulating real mode via vm86.  The vCPU
is hosed either way, but letting KVM_RUN proceed triggers a WARN due to
the impossible condition.  Alternatively, the WARN could be removed, but
then userspace and/or KVM bugs would result in the vCPU silently running
in a bad state, which isn't very friendly to users.

Originally, the bug was hit by syzkaller with a nested guest as that
doesn't require kvm_intel.unrestricted_guest=0.  That particular flavor
is likely fixed by commit cd0e615 ("KVM: nVMX: Synthesize
TRIPLE_FAULT for L2 if emulation is required"), but it's trivial to
trigger the WARN with a non-nested guest, and userspace can likely force
bad state via ioctls() for a nested guest as well.

Checking for the impossible condition needs to be deferred until KVM_RUN
because KVM can't force specific ordering between ioctls.  E.g. clearing
exception.pending in KVM_SET_SREGS doesn't prevent userspace from setting
it in KVM_SET_VCPU_EVENTS, and disallowing KVM_SET_VCPU_EVENTS with
emulation_required would prevent userspace from queuing an exception and
then stuffing sregs.  Note, if KVM were to try and detect/prevent the
condition prior to KVM_RUN, handle_invalid_guest_state() and/or
handle_emulation_failure() would need to be modified to clear the pending
exception prior to exiting to userspace.

 ------------[ cut here ]------------
 WARNING: CPU: 6 PID: 137812 at arch/x86/kvm/vmx/vmx.c:1623 vmx_queue_exception+0x14f/0x160 [kvm_intel]
 CPU: 6 PID: 137812 Comm: vmx_invalid_nes Not tainted 5.15.2-7cc36c3e14ae-pop torvalds#279
 Hardware name: ASUS Q87M-E/Q87M-E, BIOS 1102 03/03/2014
 RIP: 0010:vmx_queue_exception+0x14f/0x160 [kvm_intel]
 Code: <0f> 0b e9 fd fe ff ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00
 RSP: 0018:ffffa45c83577d38 EFLAGS: 00010202
 RAX: 0000000000000003 RBX: 0000000080000006 RCX: 0000000000000006
 RDX: 0000000000000000 RSI: 0000000000010002 RDI: ffff9916af734000
 RBP: ffff9916af734000 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000006
 R13: 0000000000000000 R14: ffff9916af734038 R15: 0000000000000000
 FS:  00007f1e1a47c740(0000) GS:ffff99188fb80000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 00007f1e1a6a8008 CR3: 000000026f83b005 CR4: 00000000001726e0
 Call Trace:
  kvm_arch_vcpu_ioctl_run+0x13a2/0x1f20 [kvm]
  kvm_vcpu_ioctl+0x279/0x690 [kvm]
  __x64_sys_ioctl+0x83/0xb0
  do_syscall_64+0x3b/0xc0
  entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported-by: syzbot+82112403ace4cbd780d8@syzkaller.appspotmail.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211228232437.1875318-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-fork that referenced this pull request Jan 20, 2022
Reject KVM_RUN if emulation is required (because VMX is running without
unrestricted guest) and an exception is pending, as KVM doesn't support
emulating exceptions except when emulating real mode via vm86.  The vCPU
is hosed either way, but letting KVM_RUN proceed triggers a WARN due to
the impossible condition.  Alternatively, the WARN could be removed, but
then userspace and/or KVM bugs would result in the vCPU silently running
in a bad state, which isn't very friendly to users.

Originally, the bug was hit by syzkaller with a nested guest as that
doesn't require kvm_intel.unrestricted_guest=0.  That particular flavor
is likely fixed by commit cd0e615 ("KVM: nVMX: Synthesize
TRIPLE_FAULT for L2 if emulation is required"), but it's trivial to
trigger the WARN with a non-nested guest, and userspace can likely force
bad state via ioctls() for a nested guest as well.

Checking for the impossible condition needs to be deferred until KVM_RUN
because KVM can't force specific ordering between ioctls.  E.g. clearing
exception.pending in KVM_SET_SREGS doesn't prevent userspace from setting
it in KVM_SET_VCPU_EVENTS, and disallowing KVM_SET_VCPU_EVENTS with
emulation_required would prevent userspace from queuing an exception and
then stuffing sregs.  Note, if KVM were to try and detect/prevent the
condition prior to KVM_RUN, handle_invalid_guest_state() and/or
handle_emulation_failure() would need to be modified to clear the pending
exception prior to exiting to userspace.

 ------------[ cut here ]------------
 WARNING: CPU: 6 PID: 137812 at arch/x86/kvm/vmx/vmx.c:1623 vmx_queue_exception+0x14f/0x160 [kvm_intel]
 CPU: 6 PID: 137812 Comm: vmx_invalid_nes Not tainted 5.15.2-7cc36c3e14ae-pop torvalds#279
 Hardware name: ASUS Q87M-E/Q87M-E, BIOS 1102 03/03/2014
 RIP: 0010:vmx_queue_exception+0x14f/0x160 [kvm_intel]
 Code: <0f> 0b e9 fd fe ff ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00
 RSP: 0018:ffffa45c83577d38 EFLAGS: 00010202
 RAX: 0000000000000003 RBX: 0000000080000006 RCX: 0000000000000006
 RDX: 0000000000000000 RSI: 0000000000010002 RDI: ffff9916af734000
 RBP: ffff9916af734000 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000006
 R13: 0000000000000000 R14: ffff9916af734038 R15: 0000000000000000
 FS:  00007f1e1a47c740(0000) GS:ffff99188fb80000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 00007f1e1a6a8008 CR3: 000000026f83b005 CR4: 00000000001726e0
 Call Trace:
  kvm_arch_vcpu_ioctl_run+0x13a2/0x1f20 [kvm]
  kvm_vcpu_ioctl+0x279/0x690 [kvm]
  __x64_sys_ioctl+0x83/0xb0
  do_syscall_64+0x3b/0xc0
  entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported-by: syzbot+82112403ace4cbd780d8@syzkaller.appspotmail.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211228232437.1875318-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 2, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 7, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 8, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 9, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
staging-kernelci-org pushed a commit to kernelci/linux that referenced this pull request Feb 11, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 14, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 15, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 16, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-fork that referenced this pull request Feb 24, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Jul 18, 2023
When we calculate the end position of ext4_free_extent, this position may
be exactly where ext4_lblk_t (i.e. uint) overflows. For example, if
ac_g_ex.fe_logical is 4294965248 and ac_orig_goal_len is 2048, then the
computed end is 0x100000000, which is 0. If ac->ac_o_ex.fe_logical is not
the first case of adjusting the best extent, that is, new_bex_end > 0, the
following BUG_ON will be triggered:

=========================================================
kernel BUG at fs/ext4/mballoc.c:5116!
invalid opcode: 0000 [#1] PREEMPT SMP PTI
CPU: 3 PID: 673 Comm: xfs_io Tainted: G E 6.5.0-rc1+ torvalds#279
RIP: 0010:ext4_mb_new_inode_pa+0xc5/0x430
Call Trace:
 <TASK>
 ext4_mb_use_best_found+0x203/0x2f0
 ext4_mb_try_best_found+0x163/0x240
 ext4_mb_regular_allocator+0x158/0x1550
 ext4_mb_new_blocks+0x86a/0xe10
 ext4_ext_map_blocks+0xb0c/0x13a0
 ext4_map_blocks+0x2cd/0x8f0
 ext4_iomap_begin+0x27b/0x400
 iomap_iter+0x222/0x3d0
 __iomap_dio_rw+0x243/0xcb0
 iomap_dio_rw+0x16/0x80
=========================================================

A simple reproducer demonstrating the problem:

	mkfs.ext4 -F /dev/sda -b 4096 100M
	mount /dev/sda /tmp/test
	fallocate -l1M /tmp/test/tmp
	fallocate -l10M /tmp/test/file
	fallocate -i -o 1M -l16777203M /tmp/test/file
	fsstress -d /tmp/test -l 0 -n 100000 -p 8 &
	sleep 10 && killall -9 fsstress
	rm -f /tmp/test/tmp
	xfs_io -c "open -ad /tmp/test/file" -c "pwrite -S 0xff 0 8192"

We declare new_bex_start and new_bex_end as correct types and use fex_end()
to avoid the problems caused by the ext4_lblk_t overflow above.

Fixes: 93cdf49 ("ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()")
Signed-off-by: Baokun Li <libaokun1@huawei.com>
riteshharjani pushed a commit to riteshharjani/linux that referenced this pull request Jul 19, 2023
When we calculate the end position of ext4_free_extent, this position may
be exactly where ext4_lblk_t (i.e. uint) overflows. For example, if
ac_g_ex.fe_logical is 4294965248 and ac_orig_goal_len is 2048, then the
computed end is 0x100000000, which is 0. If ac->ac_o_ex.fe_logical is not
the first case of adjusting the best extent, that is, new_bex_end > 0, the
following BUG_ON will be triggered:

=========================================================
kernel BUG at fs/ext4/mballoc.c:5116!
invalid opcode: 0000 [#1] PREEMPT SMP PTI
CPU: 3 PID: 673 Comm: xfs_io Tainted: G E 6.5.0-rc1+ torvalds#279
RIP: 0010:ext4_mb_new_inode_pa+0xc5/0x430
Call Trace:
 <TASK>
 ext4_mb_use_best_found+0x203/0x2f0
 ext4_mb_try_best_found+0x163/0x240
 ext4_mb_regular_allocator+0x158/0x1550
 ext4_mb_new_blocks+0x86a/0xe10
 ext4_ext_map_blocks+0xb0c/0x13a0
 ext4_map_blocks+0x2cd/0x8f0
 ext4_iomap_begin+0x27b/0x400
 iomap_iter+0x222/0x3d0
 __iomap_dio_rw+0x243/0xcb0
 iomap_dio_rw+0x16/0x80
=========================================================

A simple reproducer demonstrating the problem:

	mkfs.ext4 -F /dev/sda -b 4096 100M
	mount /dev/sda /tmp/test
	fallocate -l1M /tmp/test/tmp
	fallocate -l10M /tmp/test/file
	fallocate -i -o 1M -l16777203M /tmp/test/file
	fsstress -d /tmp/test -l 0 -n 100000 -p 8 &
	sleep 10 && killall -9 fsstress
	rm -f /tmp/test/tmp
	xfs_io -c "open -ad /tmp/test/file" -c "pwrite -S 0xff 0 8192"

We declare new_bex_start and new_bex_end as correct types and use fex_end()
to avoid the problems caused by the ext4_lblk_t overflow above.

Fixes: 93cdf49 ("ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()")
Signed-off-by: Baokun Li <libaokun1@huawei.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Jul 24, 2023
When we calculate the end position of ext4_free_extent, this position may
be exactly where ext4_lblk_t (i.e. uint) overflows. For example, if
ac_g_ex.fe_logical is 4294965248 and ac_orig_goal_len is 2048, then the
computed end is 0x100000000, which is 0. If ac->ac_o_ex.fe_logical is not
the first case of adjusting the best extent, that is, new_bex_end > 0, the
following BUG_ON will be triggered:

=========================================================
kernel BUG at fs/ext4/mballoc.c:5116!
invalid opcode: 0000 [#1] PREEMPT SMP PTI
CPU: 3 PID: 673 Comm: xfs_io Tainted: G E 6.5.0-rc1+ torvalds#279
RIP: 0010:ext4_mb_new_inode_pa+0xc5/0x430
Call Trace:
 <TASK>
 ext4_mb_use_best_found+0x203/0x2f0
 ext4_mb_try_best_found+0x163/0x240
 ext4_mb_regular_allocator+0x158/0x1550
 ext4_mb_new_blocks+0x86a/0xe10
 ext4_ext_map_blocks+0xb0c/0x13a0
 ext4_map_blocks+0x2cd/0x8f0
 ext4_iomap_begin+0x27b/0x400
 iomap_iter+0x222/0x3d0
 __iomap_dio_rw+0x243/0xcb0
 iomap_dio_rw+0x16/0x80
=========================================================

A simple reproducer demonstrating the problem:

	mkfs.ext4 -F /dev/sda -b 4096 100M
	mount /dev/sda /tmp/test
	fallocate -l1M /tmp/test/tmp
	fallocate -l10M /tmp/test/file
	fallocate -i -o 1M -l16777203M /tmp/test/file
	fsstress -d /tmp/test -l 0 -n 100000 -p 8 &
	sleep 10 && killall -9 fsstress
	rm -f /tmp/test/tmp
	xfs_io -c "open -ad /tmp/test/file" -c "pwrite -S 0xff 0 8192"

We simply refactor the logic for adjusting the best extent by adding
a temporary ext4_free_extent ex and use extent_logical_end() to avoid
overflow, which also simplifies the code.

Cc: stable@kernel.org # 6.4
Fixes: 93cdf49 ("ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()")
Signed-off-by: Baokun Li <libaokun1@huawei.com>
riteshharjani pushed a commit to riteshharjani/linux that referenced this pull request Jul 25, 2023
When we calculate the end position of ext4_free_extent, this position may
be exactly where ext4_lblk_t (i.e. uint) overflows. For example, if
ac_g_ex.fe_logical is 4294965248 and ac_orig_goal_len is 2048, then the
computed end is 0x100000000, which is 0. If ac->ac_o_ex.fe_logical is not
the first case of adjusting the best extent, that is, new_bex_end > 0, the
following BUG_ON will be triggered:

=========================================================
kernel BUG at fs/ext4/mballoc.c:5116!
invalid opcode: 0000 [#1] PREEMPT SMP PTI
CPU: 3 PID: 673 Comm: xfs_io Tainted: G E 6.5.0-rc1+ torvalds#279
RIP: 0010:ext4_mb_new_inode_pa+0xc5/0x430
Call Trace:
 <TASK>
 ext4_mb_use_best_found+0x203/0x2f0
 ext4_mb_try_best_found+0x163/0x240
 ext4_mb_regular_allocator+0x158/0x1550
 ext4_mb_new_blocks+0x86a/0xe10
 ext4_ext_map_blocks+0xb0c/0x13a0
 ext4_map_blocks+0x2cd/0x8f0
 ext4_iomap_begin+0x27b/0x400
 iomap_iter+0x222/0x3d0
 __iomap_dio_rw+0x243/0xcb0
 iomap_dio_rw+0x16/0x80
=========================================================

A simple reproducer demonstrating the problem:

	mkfs.ext4 -F /dev/sda -b 4096 100M
	mount /dev/sda /tmp/test
	fallocate -l1M /tmp/test/tmp
	fallocate -l10M /tmp/test/file
	fallocate -i -o 1M -l16777203M /tmp/test/file
	fsstress -d /tmp/test -l 0 -n 100000 -p 8 &
	sleep 10 && killall -9 fsstress
	rm -f /tmp/test/tmp
	xfs_io -c "open -ad /tmp/test/file" -c "pwrite -S 0xff 0 8192"

We simply refactor the logic for adjusting the best extent by adding
a temporary ext4_free_extent ex and use extent_logical_end() to avoid
overflow, which also simplifies the code.

Cc: stable@kernel.org # 6.4
Fixes: 93cdf49 ("ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()")
Signed-off-by: Baokun Li <libaokun1@huawei.com>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Sep 23, 2023
[ Upstream commit bc056e7 ]

When we calculate the end position of ext4_free_extent, this position may
be exactly where ext4_lblk_t (i.e. uint) overflows. For example, if
ac_g_ex.fe_logical is 4294965248 and ac_orig_goal_len is 2048, then the
computed end is 0x100000000, which is 0. If ac->ac_o_ex.fe_logical is not
the first case of adjusting the best extent, that is, new_bex_end > 0, the
following BUG_ON will be triggered:

=========================================================
kernel BUG at fs/ext4/mballoc.c:5116!
invalid opcode: 0000 [#1] PREEMPT SMP PTI
CPU: 3 PID: 673 Comm: xfs_io Tainted: G E 6.5.0-rc1+ torvalds#279
RIP: 0010:ext4_mb_new_inode_pa+0xc5/0x430
Call Trace:
 <TASK>
 ext4_mb_use_best_found+0x203/0x2f0
 ext4_mb_try_best_found+0x163/0x240
 ext4_mb_regular_allocator+0x158/0x1550
 ext4_mb_new_blocks+0x86a/0xe10
 ext4_ext_map_blocks+0xb0c/0x13a0
 ext4_map_blocks+0x2cd/0x8f0
 ext4_iomap_begin+0x27b/0x400
 iomap_iter+0x222/0x3d0
 __iomap_dio_rw+0x243/0xcb0
 iomap_dio_rw+0x16/0x80
=========================================================

A simple reproducer demonstrating the problem:

	mkfs.ext4 -F /dev/sda -b 4096 100M
	mount /dev/sda /tmp/test
	fallocate -l1M /tmp/test/tmp
	fallocate -l10M /tmp/test/file
	fallocate -i -o 1M -l16777203M /tmp/test/file
	fsstress -d /tmp/test -l 0 -n 100000 -p 8 &
	sleep 10 && killall -9 fsstress
	rm -f /tmp/test/tmp
	xfs_io -c "open -ad /tmp/test/file" -c "pwrite -S 0xff 0 8192"

We simply refactor the logic for adjusting the best extent by adding
a temporary ext4_free_extent ex and use extent_logical_end() to avoid
overflow, which also simplifies the code.

Cc: stable@kernel.org # 6.4
Fixes: 93cdf49 ("ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()")
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Link: https://lore.kernel.org/r/20230724121059.11834-3-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
mj22226 pushed a commit to mj22226/linux that referenced this pull request Nov 1, 2023
commit bc056e7 upstream.

When we calculate the end position of ext4_free_extent, this position may
be exactly where ext4_lblk_t (i.e. uint) overflows. For example, if
ac_g_ex.fe_logical is 4294965248 and ac_orig_goal_len is 2048, then the
computed end is 0x100000000, which is 0. If ac->ac_o_ex.fe_logical is not
the first case of adjusting the best extent, that is, new_bex_end > 0, the
following BUG_ON will be triggered:

=========================================================
kernel BUG at fs/ext4/mballoc.c:5116!
invalid opcode: 0000 [#1] PREEMPT SMP PTI
CPU: 3 PID: 673 Comm: xfs_io Tainted: G E 6.5.0-rc1+ torvalds#279
RIP: 0010:ext4_mb_new_inode_pa+0xc5/0x430
Call Trace:
 <TASK>
 ext4_mb_use_best_found+0x203/0x2f0
 ext4_mb_try_best_found+0x163/0x240
 ext4_mb_regular_allocator+0x158/0x1550
 ext4_mb_new_blocks+0x86a/0xe10
 ext4_ext_map_blocks+0xb0c/0x13a0
 ext4_map_blocks+0x2cd/0x8f0
 ext4_iomap_begin+0x27b/0x400
 iomap_iter+0x222/0x3d0
 __iomap_dio_rw+0x243/0xcb0
 iomap_dio_rw+0x16/0x80
=========================================================

A simple reproducer demonstrating the problem:

	mkfs.ext4 -F /dev/sda -b 4096 100M
	mount /dev/sda /tmp/test
	fallocate -l1M /tmp/test/tmp
	fallocate -l10M /tmp/test/file
	fallocate -i -o 1M -l16777203M /tmp/test/file
	fsstress -d /tmp/test -l 0 -n 100000 -p 8 &
	sleep 10 && killall -9 fsstress
	rm -f /tmp/test/tmp
	xfs_io -c "open -ad /tmp/test/file" -c "pwrite -S 0xff 0 8192"

We simply refactor the logic for adjusting the best extent by adding
a temporary ext4_free_extent ex and use extent_logical_end() to avoid
overflow, which also simplifies the code.

Cc: stable@kernel.org # 6.4
Fixes: 93cdf49 ("ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()")
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Link: https://lore.kernel.org/r/20230724121059.11834-3-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Nov 2, 2023
commit bc056e7 upstream.

When we calculate the end position of ext4_free_extent, this position may
be exactly where ext4_lblk_t (i.e. uint) overflows. For example, if
ac_g_ex.fe_logical is 4294965248 and ac_orig_goal_len is 2048, then the
computed end is 0x100000000, which is 0. If ac->ac_o_ex.fe_logical is not
the first case of adjusting the best extent, that is, new_bex_end > 0, the
following BUG_ON will be triggered:

=========================================================
kernel BUG at fs/ext4/mballoc.c:5116!
invalid opcode: 0000 [#1] PREEMPT SMP PTI
CPU: 3 PID: 673 Comm: xfs_io Tainted: G E 6.5.0-rc1+ torvalds#279
RIP: 0010:ext4_mb_new_inode_pa+0xc5/0x430
Call Trace:
 <TASK>
 ext4_mb_use_best_found+0x203/0x2f0
 ext4_mb_try_best_found+0x163/0x240
 ext4_mb_regular_allocator+0x158/0x1550
 ext4_mb_new_blocks+0x86a/0xe10
 ext4_ext_map_blocks+0xb0c/0x13a0
 ext4_map_blocks+0x2cd/0x8f0
 ext4_iomap_begin+0x27b/0x400
 iomap_iter+0x222/0x3d0
 __iomap_dio_rw+0x243/0xcb0
 iomap_dio_rw+0x16/0x80
=========================================================

A simple reproducer demonstrating the problem:

	mkfs.ext4 -F /dev/sda -b 4096 100M
	mount /dev/sda /tmp/test
	fallocate -l1M /tmp/test/tmp
	fallocate -l10M /tmp/test/file
	fallocate -i -o 1M -l16777203M /tmp/test/file
	fsstress -d /tmp/test -l 0 -n 100000 -p 8 &
	sleep 10 && killall -9 fsstress
	rm -f /tmp/test/tmp
	xfs_io -c "open -ad /tmp/test/file" -c "pwrite -S 0xff 0 8192"

We simply refactor the logic for adjusting the best extent by adding
a temporary ext4_free_extent ex and use extent_logical_end() to avoid
overflow, which also simplifies the code.

Cc: stable@kernel.org # 6.4
Fixes: 93cdf49 ("ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()")
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Link: https://lore.kernel.org/r/20230724121059.11834-3-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Nov 8, 2023
commit bc056e7 upstream.

When we calculate the end position of ext4_free_extent, this position may
be exactly where ext4_lblk_t (i.e. uint) overflows. For example, if
ac_g_ex.fe_logical is 4294965248 and ac_orig_goal_len is 2048, then the
computed end is 0x100000000, which is 0. If ac->ac_o_ex.fe_logical is not
the first case of adjusting the best extent, that is, new_bex_end > 0, the
following BUG_ON will be triggered:

=========================================================
kernel BUG at fs/ext4/mballoc.c:5116!
invalid opcode: 0000 [#1] PREEMPT SMP PTI
CPU: 3 PID: 673 Comm: xfs_io Tainted: G E 6.5.0-rc1+ torvalds#279
RIP: 0010:ext4_mb_new_inode_pa+0xc5/0x430
Call Trace:
 <TASK>
 ext4_mb_use_best_found+0x203/0x2f0
 ext4_mb_try_best_found+0x163/0x240
 ext4_mb_regular_allocator+0x158/0x1550
 ext4_mb_new_blocks+0x86a/0xe10
 ext4_ext_map_blocks+0xb0c/0x13a0
 ext4_map_blocks+0x2cd/0x8f0
 ext4_iomap_begin+0x27b/0x400
 iomap_iter+0x222/0x3d0
 __iomap_dio_rw+0x243/0xcb0
 iomap_dio_rw+0x16/0x80
=========================================================

A simple reproducer demonstrating the problem:

	mkfs.ext4 -F /dev/sda -b 4096 100M
	mount /dev/sda /tmp/test
	fallocate -l1M /tmp/test/tmp
	fallocate -l10M /tmp/test/file
	fallocate -i -o 1M -l16777203M /tmp/test/file
	fsstress -d /tmp/test -l 0 -n 100000 -p 8 &
	sleep 10 && killall -9 fsstress
	rm -f /tmp/test/tmp
	xfs_io -c "open -ad /tmp/test/file" -c "pwrite -S 0xff 0 8192"

We simply refactor the logic for adjusting the best extent by adding
a temporary ext4_free_extent ex and use extent_logical_end() to avoid
overflow, which also simplifies the code.

Cc: stable@kernel.org # 6.4
Fixes: 93cdf49 ("ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()")
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Link: https://lore.kernel.org/r/20230724121059.11834-3-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Nov 8, 2023
commit bc056e7 upstream.

When we calculate the end position of ext4_free_extent, this position may
be exactly where ext4_lblk_t (i.e. uint) overflows. For example, if
ac_g_ex.fe_logical is 4294965248 and ac_orig_goal_len is 2048, then the
computed end is 0x100000000, which is 0. If ac->ac_o_ex.fe_logical is not
the first case of adjusting the best extent, that is, new_bex_end > 0, the
following BUG_ON will be triggered:

=========================================================
kernel BUG at fs/ext4/mballoc.c:5116!
invalid opcode: 0000 [#1] PREEMPT SMP PTI
CPU: 3 PID: 673 Comm: xfs_io Tainted: G E 6.5.0-rc1+ torvalds#279
RIP: 0010:ext4_mb_new_inode_pa+0xc5/0x430
Call Trace:
 <TASK>
 ext4_mb_use_best_found+0x203/0x2f0
 ext4_mb_try_best_found+0x163/0x240
 ext4_mb_regular_allocator+0x158/0x1550
 ext4_mb_new_blocks+0x86a/0xe10
 ext4_ext_map_blocks+0xb0c/0x13a0
 ext4_map_blocks+0x2cd/0x8f0
 ext4_iomap_begin+0x27b/0x400
 iomap_iter+0x222/0x3d0
 __iomap_dio_rw+0x243/0xcb0
 iomap_dio_rw+0x16/0x80
=========================================================

A simple reproducer demonstrating the problem:

	mkfs.ext4 -F /dev/sda -b 4096 100M
	mount /dev/sda /tmp/test
	fallocate -l1M /tmp/test/tmp
	fallocate -l10M /tmp/test/file
	fallocate -i -o 1M -l16777203M /tmp/test/file
	fsstress -d /tmp/test -l 0 -n 100000 -p 8 &
	sleep 10 && killall -9 fsstress
	rm -f /tmp/test/tmp
	xfs_io -c "open -ad /tmp/test/file" -c "pwrite -S 0xff 0 8192"

We simply refactor the logic for adjusting the best extent by adding
a temporary ext4_free_extent ex and use extent_logical_end() to avoid
overflow, which also simplifies the code.

Cc: stable@kernel.org # 6.4
Fixes: 93cdf49 ("ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()")
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Link: https://lore.kernel.org/r/20230724121059.11834-3-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Nov 8, 2023
commit bc056e7 upstream.

When we calculate the end position of ext4_free_extent, this position may
be exactly where ext4_lblk_t (i.e. uint) overflows. For example, if
ac_g_ex.fe_logical is 4294965248 and ac_orig_goal_len is 2048, then the
computed end is 0x100000000, which is 0. If ac->ac_o_ex.fe_logical is not
the first case of adjusting the best extent, that is, new_bex_end > 0, the
following BUG_ON will be triggered:

=========================================================
kernel BUG at fs/ext4/mballoc.c:5116!
invalid opcode: 0000 [#1] PREEMPT SMP PTI
CPU: 3 PID: 673 Comm: xfs_io Tainted: G E 6.5.0-rc1+ torvalds#279
RIP: 0010:ext4_mb_new_inode_pa+0xc5/0x430
Call Trace:
 <TASK>
 ext4_mb_use_best_found+0x203/0x2f0
 ext4_mb_try_best_found+0x163/0x240
 ext4_mb_regular_allocator+0x158/0x1550
 ext4_mb_new_blocks+0x86a/0xe10
 ext4_ext_map_blocks+0xb0c/0x13a0
 ext4_map_blocks+0x2cd/0x8f0
 ext4_iomap_begin+0x27b/0x400
 iomap_iter+0x222/0x3d0
 __iomap_dio_rw+0x243/0xcb0
 iomap_dio_rw+0x16/0x80
=========================================================

A simple reproducer demonstrating the problem:

	mkfs.ext4 -F /dev/sda -b 4096 100M
	mount /dev/sda /tmp/test
	fallocate -l1M /tmp/test/tmp
	fallocate -l10M /tmp/test/file
	fallocate -i -o 1M -l16777203M /tmp/test/file
	fsstress -d /tmp/test -l 0 -n 100000 -p 8 &
	sleep 10 && killall -9 fsstress
	rm -f /tmp/test/tmp
	xfs_io -c "open -ad /tmp/test/file" -c "pwrite -S 0xff 0 8192"

We simply refactor the logic for adjusting the best extent by adding
a temporary ext4_free_extent ex and use extent_logical_end() to avoid
overflow, which also simplifies the code.

Cc: stable@kernel.org # 6.4
Fixes: 93cdf49 ("ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()")
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Link: https://lore.kernel.org/r/20230724121059.11834-3-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request May 24, 2024
packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will hit
WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path while ipvlan
device has qdisc queue.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 ? __warn+0x83/0x130
 ? sk_mc_loop+0x2d/0x70
 ? report_bug+0x18e/0x1a0
 ? handle_bug+0x3c/0x70
 ? exc_invalid_op+0x18/0x70
 ? asm_exc_invalid_op+0x1a/0x20
 ? sk_mc_loop+0x2d/0x70
 ip6_finish_output2+0x31e/0x590
 ? nf_hook_slow+0x43/0xf0
 ip6_finish_output+0x1f8/0x320
 ? __pfx_ip6_finish_output+0x10/0x10
 ipvlan_xmit_mode_l3+0x22a/0x2a0 [ipvlan]
 ipvlan_start_xmit+0x17/0x50 [ipvlan]
 dev_hard_start_xmit+0x8c/0x1d0
 sch_direct_xmit+0xa2/0x390
 __qdisc_run+0x66/0xd0
 net_tx_action+0x1ca/0x270
 handle_softirqs+0xd6/0x2b0
 __irq_exit_rcu+0x9b/0xc0
 sysvec_apic_timer_interrupt+0x75/0x90
 </IRQ>

Fixes: f60e599 ("ipv6: protect skb->sk accesses from recursive dereference inside the stack")
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request May 25, 2024
Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: f60e599 ("ipv6: protect skb->sk accesses from recursive dereference inside the stack")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request May 29, 2024
Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request May 29, 2024
Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Signed-off-by: NipaLocal <nipa@local>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request May 29, 2024
Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: NipaLocal <nipa@local>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request May 29, 2024
Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: NipaLocal <nipa@local>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request May 29, 2024
Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: NipaLocal <nipa@local>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request May 30, 2024
Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: NipaLocal <nipa@local>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request May 30, 2024
Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: NipaLocal <nipa@local>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request May 30, 2024
Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: NipaLocal <nipa@local>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request May 30, 2024
Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: NipaLocal <nipa@local>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request May 30, 2024
Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240529095633.613103-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
mj22226 pushed a commit to mj22226/linux that referenced this pull request Jun 6, 2024
[ Upstream commit b3dc6e8 ]

Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240529095633.613103-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
mj22226 pushed a commit to mj22226/linux that referenced this pull request Jun 6, 2024
[ Upstream commit b3dc6e8 ]

Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240529095633.613103-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
mj22226 pushed a commit to mj22226/linux that referenced this pull request Jun 9, 2024
[ Upstream commit b3dc6e8 ]

Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240529095633.613103-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
mj22226 pushed a commit to mj22226/linux that referenced this pull request Jun 9, 2024
[ Upstream commit b3dc6e8 ]

Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240529095633.613103-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
adeepn pushed a commit to jethome-iot/linux-kernel that referenced this pull request Jun 10, 2024
Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240529095633.613103-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
hdeller pushed a commit to hdeller/linux that referenced this pull request Jun 12, 2024
[ Upstream commit b3dc6e8 ]

Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240529095633.613103-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
staging-kernelci-org pushed a commit to kernelci/linux that referenced this pull request Jun 12, 2024
[ Upstream commit b3dc6e8 ]

Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240529095633.613103-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
staging-kernelci-org pushed a commit to kernelci/linux that referenced this pull request Jun 12, 2024
[ Upstream commit b3dc6e8 ]

Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240529095633.613103-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
staging-kernelci-org pushed a commit to kernelci/linux that referenced this pull request Jul 16, 2024
[ Upstream commit b3dc6e8 ]

Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240529095633.613103-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Sep 4, 2024
[ Upstream commit b3dc6e8 ]

Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240529095633.613103-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Sep 9, 2024
[ Upstream commit b3dc6e8 ]

Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240529095633.613103-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Sep 9, 2024
[ Upstream commit b3dc6e8 ]

Raw packet from PF_PACKET socket ontop of an IPv6-backed ipvlan device will
hit WARN_ON_ONCE() in sk_mc_loop() through sch_direct_xmit() path.

WARNING: CPU: 2 PID: 0 at net/core/sock.c:775 sk_mc_loop+0x2d/0x70
Modules linked in: sch_netem ipvlan rfkill cirrus drm_shmem_helper sg drm_kms_helper
CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Not tainted 6.9.0+ torvalds#279
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:sk_mc_loop+0x2d/0x70
Code: fa 0f 1f 44 00 00 65 0f b7 15 f7 96 a3 4f 31 c0 66 85 d2 75 26 48 85 ff 74 1c
RSP: 0018:ffffa9584015cd78 EFLAGS: 00010212
RAX: 0000000000000011 RBX: ffff91e585793e00 RCX: 0000000002c6a001
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff91e589c0f000
RBP: ffff91e5855bd100 R08: 0000000000000000 R09: 3d00545216f43d00
R10: ffff91e584fdcc50 R11: 00000060dd8616f4 R12: ffff91e58132d000
R13: ffff91e584fdcc68 R14: ffff91e5869ce800 R15: ffff91e589c0f000
FS:  0000000000000000(0000) GS:ffff91e898100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788f7c44c0 CR3: 0000000008e1a000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
 ? __warn (kernel/panic.c:693)
 ? sk_mc_loop (net/core/sock.c:760)
 ? report_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle_bug (arch/x86/kernel/traps.c:239)
 ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
 ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621)
 ? sk_mc_loop (net/core/sock.c:760)
 ip6_finish_output2 (net/ipv6/ip6_output.c:83 (discriminator 1))
 ? nf_hook_slow (net/netfilter/core.c:626)
 ip6_finish_output (net/ipv6/ip6_output.c:222)
 ? __pfx_ip6_finish_output (net/ipv6/ip6_output.c:215)
 ipvlan_xmit_mode_l3 (drivers/net/ipvlan/ipvlan_core.c:602) ipvlan
 ipvlan_start_xmit (drivers/net/ipvlan/ipvlan_main.c:226) ipvlan
 dev_hard_start_xmit (net/core/dev.c:3594)
 sch_direct_xmit (net/sched/sch_generic.c:343)
 __qdisc_run (net/sched/sch_generic.c:416)
 net_tx_action (net/core/dev.c:5286)
 handle_softirqs (kernel/softirq.c:555)
 __irq_exit_rcu (kernel/softirq.c:589)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043)

The warning triggers as this:
packet_sendmsg
   packet_snd //skb->sk is packet sk
      __dev_queue_xmit
         __dev_xmit_skb //q->enqueue is not NULL
             __qdisc_run
               sch_direct_xmit
                 dev_hard_start_xmit
                   ipvlan_start_xmit
                      ipvlan_xmit_mode_l3 //l3 mode
                        ipvlan_process_outbound //vepa flag
                          ipvlan_process_v6_outbound
                            ip6_local_out
                                __ip6_finish_output
                                  ip6_finish_output2 //multicast packet
                                    sk_mc_loop //sk->sk_family is AF_PACKET

Call ip{6}_local_out() with NULL sk in ipvlan as other tunnels to fix this.

Fixes: 2ad7bf3 ("ipvlan: Initial check-in of the IPVLAN driver.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240529095633.613103-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants