Commit graph

1171293 commits

Author SHA1 Message Date
Min Zhou
2f16482202 LoongArch: crypto: Add crc32 and crc32c hw acceleration
With a blatant copy of some MIPS bits we introduce the crc32 and crc32c
hw accelerated module to LoongArch.

LoongArch has provided these instructions to calculate crc32 and crc32c:
        * crc.w.b.w    crcc.w.b.w
        * crc.w.h.w    crcc.w.h.w
        * crc.w.w.w    crcc.w.w.w
        * crc.w.d.w    crcc.w.d.w

So we can make use of these instructions to improve the performance of
calculation for crc32(c) checksums.

As can be seen from the following test results, crc32(c) instructions
can improve the performance by 58%.

                  Software implemention    Hardware acceleration
  Buffer size     time cost (seconds)      time cost (seconds)    Accel.
   100 KB                0.000845                 0.000534        59.1%
     1 MB                0.007758                 0.004836        59.4%
    10 MB                0.076593                 0.047682        59.4%
   100 MB                0.756734                 0.479126        58.5%
  1000 MB                7.563841                 4.778266        58.5%

Signed-off-by: Min Zhou <zhoumin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:43 +08:00
Bibo Mao
69e3a6aa6b LoongArch: Add checksum optimization for 64-bit system
LoongArch platform is 64-bit system, which supports 8-bytes memory
accessing, but generic checksum functions use 4-byte memory access.
So add 8-bytes memory access optimization for checksum functions on
LoongArch. And the code comes from arm64 system.

When network hw checksum is disabled, iperf performance improves about
10% with this patch.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:43 +08:00
WANG Rui
8941e93ca5 LoongArch: Optimize memory ops (memset/memcpy/memmove)
To optimize memset()/memcpy()/memmove() and so on, we use a jump table
to dispatch cases for short data lengths; and for long data lengths, we
split the destination into head part (first 8 bytes), tail part (last 8
bytes) and middle part. The head part and tail part may be at unaligned
addresses, while the middle part is always aligned (the middle part is
allowed to overlap the head/tail part). In this way, the first and last
8 bytes may be unaligned accesses, but we can make sure the data in the
middle is processed at an aligned destination address.

We have tested micro-bench[1] on a Loongson-3C5000 16-core machine (2.2GHz):

1. memset

| length | src offset | dst offset | speed before | speed after | %       |
|--------|------------|------------|--------------|-------------|---------|
| 8      | 0          | 0          | 696.191      | 1518.785    | 118.16% |
| 8      | 0          | 1          | 696.325      | 1518.937    | 118.14% |
| 50     | 0          | 0          | 969.976      | 8053.902    | 730.32% |
| 50     | 0          | 1          | 970.034      | 8058.475    | 730.74% |
| 300    | 0          | 0          | 5876.612     | 16544.703   | 181.53% |
| 300    | 0          | 1          | 5030.849     | 16549.011   | 228.95% |
| 1200   | 0          | 0          | 11797.077    | 16752.137   | 42.00%  |
| 1200   | 0          | 1          | 5687.141     | 16645.233   | 192.68% |
| 4000   | 0          | 0          | 15723.27     | 16761.557   | 6.60%   |
| 4000   | 0          | 1          | 5906.114     | 16732.316   | 183.30% |
| 8000   | 0          | 0          | 16751.403    | 16770.002   | 0.11%   |
| 8000   | 0          | 1          | 5995.449     | 16754.07    | 179.45% |

2. memcpy

| length | src offset | dst offset | speed before | speed after | %       |
|--------|------------|------------|--------------|-------------|---------|
| 8      | 0          | 0          | 696.2        | 1670.605    | 139.96% |
| 8      | 0          | 1          | 696.325      | 1671.138    | 139.99% |
| 50     | 0          | 0          | 969.974      | 8724.999    | 799.51% |
| 50     | 0          | 1          | 970.032      | 8730.138    | 799.98% |
| 300    | 0          | 0          | 5564.662     | 16272.652   | 192.43% |
| 300    | 0          | 1          | 4670.436     | 14972.842   | 220.59% |
| 1200   | 0          | 0          | 10740.23     | 16751.728   | 55.97%  |
| 1200   | 0          | 1          | 5027.741     | 14874.564   | 195.85% |
| 4000   | 0          | 0          | 15122.367    | 16737.642   | 10.68%  |
| 4000   | 0          | 1          | 5536.918     | 14890.397   | 168.93% |
| 8000   | 0          | 0          | 16505.453    | 16553.543   | 0.29%   |
| 8000   | 0          | 1          | 5821.619     | 14841.804   | 154.94% |

3. memmove

| length | src offset | dst offset | speed before | speed after | %       |
|--------|------------|------------|--------------|-------------|---------|
| 8      | 0          | 0          | 982.693      | 1670.568    | 70.00%  |
| 8      | 0          | 1          | 983.023      | 1671.174    | 70.00%  |
| 50     | 0          | 0          | 1230.87      | 8727.625    | 609.06% |
| 50     | 0          | 1          | 1232.515     | 8730.138    | 608.32% |
| 300    | 0          | 0          | 6490.375     | 16296.993   | 151.09% |
| 300    | 0          | 1          | 4282.687     | 14972.842   | 249.61% |
| 1200   | 0          | 0          | 11742.755    | 16752.546   | 42.66%  |
| 1200   | 0          | 1          | 5039.338     | 14872.951   | 195.14% |
| 4000   | 0          | 0          | 15467.786    | 16737.09    | 8.21%   |
| 4000   | 0          | 1          | 5009.905     | 14890.542   | 197.22% |
| 8000   | 0          | 0          | 16489.664    | 16553.273   | 0.39%   |
| 8000   | 0          | 1          | 5823.786     | 14858.646   | 155.14% |

* speed: MB/s
* length: byte

[1] https://github.com/heiher/mem-bench

Signed-off-by: WANG Rui <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:43 +08:00
Huacai Chen
2b3bd32ea3 LoongArch: Provide kernel fpu functions
Provide kernel_fpu_begin()/kernel_fpu_end() to allow the kernel itself
to use fpu. They can be used by some other kernel components, e.g., the
AMDGPU graphic driver for DCN.

Reported-by: WANG Xuerui <kernel@xen0n.name>
Tested-by: WANG Xuerui <kernel@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:27 +08:00
WANG Xuerui
c23e7f01cf LoongArch: Relay BCE exceptions to userland as SIGSEGV with si_code=SEGV_BNDERR
SEGV_BNDERR was introduced initially for supporting the Intel MPX, but
fell into disuse after the MPX support was removed. The LoongArch
bounds-checking instructions behave very differently than MPX, but
overall the interface is still kind of suitable for conveying the
information to userland when bounds-checking assertions trigger, so we
wouldn't have to invent more UAPI. Specifically, when the BCE triggers,
a SEGV_BNDERR is sent to userland, with si_addr set to the out-of-bounds
address or value (in asrt{gt,le}'s case), and one of si_lower or
si_upper set to the configured bound depending on the faulting
instruction. The other bound is set to either 0 or ULONG_MAX to resemble
a range with both lower and upper bounds.

Note that it is possible to have si_addr == si_lower in case of a
failing asrtgt or {ld,st}gt, because those instructions test for strict
greater-than relationship. This should not pose a problem for userland,
though, because the faulting PC is available for the application to
associate back to the exact instruction for figuring out the
expectation.

Example exception context generated by a faulting `asrtgt.d t0, t1`
(assert t0 > t1 or BCE) with t0=100 and t1=200:

> pc 00005555558206a4 ra 00007ffff2d854fc tp 00007ffff2f2f180 sp 00007ffffbf9fb80
> a0 0000000000000002 a1 00007ffffbf9fce8 a2 00007ffffbf9fd00 a3 00007ffff2ed4558
> a4 0000000000000000 a5 00007ffff2f044c8 a6 00007ffffbf9fce0 a7 fffffffffffff000
> t0 0000000000000064 t1 00000000000000c8 t2 00007ffffbfa2d5e t3 00007ffff2f12aa0
> t4 00007ffff2ed6158 t5 00007ffff2ed6158 t6 000000000000002e t7 0000000003d8f538
> t8 0000000000000005 u0 0000000000000000 s9 0000000000000000 s0 00007ffffbf9fce8
> s1 0000000000000002 s2 0000000000000000 s3 00007ffff2f2c038 s4 0000555555820610
> s5 00007ffff2ed5000 s6 0000555555827e38 s7 00007ffffbf9fd00 s8 0000555555827e38
>    ra: 00007ffff2d854fc
>   ERA: 00005555558206a4
>  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
>  PRMD: 00000007 (PPLV3 +PIE -PWE)
>  EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
>  ECFG: 0007181c (LIE=2-4,11-12 VS=7)
> ESTAT: 000a0000 [BCE] (IS= ECode=10 EsubCode=0)
>  PRID: 0014c010 (Loongson-64bit, Loongson-3A5000)

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:27 +08:00
WANG Xuerui
325a38b511 LoongArch: Tweak the BADV and CPUCFG.PRID lines in show_regs()
Use ISA manual names for BADV and CPUCFG.PRID lines in show_regs(), for
stylistic consistency with the other lines already touched.

While at it, also include current CPU's full name in show_regs() output.
It may be more helpful for developers looking at the resulting dumps,
because multiple distinct CPU models may share the same PRID. Not having
this info available may hide problems only found on some but not all of
the models sharing one specific PRID.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:27 +08:00
WANG Xuerui
98b90ede59 LoongArch: Humanize the ESTAT line when showing registers
Example output looks like:

[   xx.xxxxxx] ESTAT: 00001000 [INT] (IS=12 ECode=0 EsubCode=0)

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:27 +08:00
WANG Xuerui
5e3e784d35 LoongArch: Humanize the ECFG line when showing registers
Example output looks like:

[   xx.xxxxxx]  ECFG: 00071c1c (LIE=2-4,10-12 VS=7)

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:27 +08:00
WANG Xuerui
9718d96c03 LoongArch: Humanize the EUEN line when showing registers
Example output looks like:

[   xx.xxxxxx]  EUEN: 00000000 (-FPE -SXE -ASXE -BTE)

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:27 +08:00
WANG Xuerui
ce7f0b18b0 LoongArch: Humanize the PRMD line when showing registers
Example output looks like:

[   xx.xxxxxx]  PRMD: 00000004 (PPLV0 +PIE -PWE)

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:10 +08:00
WANG Xuerui
efada2afac LoongArch: Humanize the CRMD line when showing registers
Example output looks like:

[   xx.xxxxxx]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)

Some initial machinery for this pretty-printing format has been included
in this patch as well.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:10 +08:00
WANG Xuerui
05fa8d4977 LoongArch: Fix format of CSR lines during show_regs()
Use uppercase CSR names throughout for consistency with the manual
wording, and right-align the keys. The "CSR" part is inferrable from
context, hence dropped for more horizontal space.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:10 +08:00
WANG Xuerui
863b3795ef LoongArch: Print symbol info for $ra and CSR.ERA only for kernel-mode contexts
Otherwise the addresses wouldn't make sense at all.

While at it, align the "map keys" to maintain right-alignment with the
"estat:" line too; also swap the ERA and ra lines so all CSRs are shown
together.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:10 +08:00
WANG Xuerui
f6a79b6036 LoongArch: Print GPRs with ABI names when showing registers
Show PC (CSR.ERA) in place of $zero, and also show the syscall restart
flag (conveniently stuffed in regs[0]) if non-zero.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:10 +08:00
WANG Xuerui
aa552254cf LoongArch: Define regular names for BCE/WATCH/HVC/GSPR exceptions
Define them according to the ISA manual, in order to enable matching the
sub-exceptions for humanization purposes later.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:10 +08:00
WANG Xuerui
9e36fa4299 LoongArch: Clean up the architectural interrupt definitions
While interrupts are assigned ECodes `64 + interrupt number`, all
existing use sites of interrupt numbers want the 64 subtracted.
Re-arrange the definitions so that the actual interrupt number is used
everywhere, and make EXCCODE_INT_END inclusive as it is more intuitive
that way.

While at it, according to the asm/loongarch.h definitions, the total
number of architectural interrupts should be 14, but various other
places indicate otherwise (13 or 15). Those places have been adjusted
to 14 as well for consistency.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2023-05-01 17:19:10 +08:00
Huacai Chen
3b5a5672b3 Merge 'irq/loongarch-fixes-6.4' into loongarch-next
LoongArch architecture changes for 6.4 depend on the irq changes
to work on "dual-bridge" systems, so merge them to create a base.
2023-04-26 11:56:37 +08:00
Linus Torvalds
457391b038 Linux 6.3 2023-04-23 12:02:52 -07:00
Linus Torvalds
0da6e5fd6c gcc: disable '-Warray-bounds' for gcc-13 too
We started disabling '-Warray-bounds' for gcc-12 originally on s390,
because it resulted in some warnings that weren't realistically fixable
(commit 8b202ee218: "s390: disable -Warray-bounds").

That s390-specific issue was then found to be less common elsewhere, but
generic (see f0be87c42c: "gcc-12: disable '-Warray-bounds' universally
for now"), and then later expanded the version check was expanded to
gcc-11 (5a41237ad1: "gcc: disable -Warray-bounds for gcc-11 too").

And it turns out that I was much too optimistic in thinking that it's
all going to go away, and here we are with gcc-13 showing all the same
issues.  So instead of expanding this one version at a time, let's just
disable it for gcc-11+, and put an end limit to it only when we actually
find a solution.

Yes, I'm sure some of this is because the kernel just does odd things
(like our "container_of()" use, but also knowingly playing games with
things like linker tables and array layouts).

And yes, some of the warnings are likely signs of real bugs, but when
there are hundreds of false positives, that doesn't really help.

Oh well.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-04-23 09:56:20 -07:00
Linus Torvalds
8296ac9256 Kbuild fixes for v6.3 (4th)
- Fix the prefix in the kernel source tarball
 
  - Fix a typo in the copyright file in Debian package
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAmRFJkAVHG1hc2FoaXJv
 eUBrZXJuZWwub3JnAAoJED2LAQed4NsGD2MP/jj9Ct+0Bw7hnahOtACVfF7+Vgnp
 E5RljzGA27ltSJP3WVq2zTofRVFpELWaOjsCITptMxbBOQ/eYy40gnG8TrVLsRw3
 Vf0bDJphNNrzR2OLhpSzBsOEDMY76TL7uDFx6I6QMftrmBMeSVYnCHg1uvQSwsNq
 5c473yNYimPQHtcy+UT40BPyE+bBuBw1f2OSGE2KeSXYw/56emICS5DkfkygWAqB
 6qZeifGlde1gu2FOmiuAAORsp7utMxDSR/2bfTRUbW3SFfBB9k7q3OhRIpe8QwRB
 BsQ4wGwwclA5YYbaNEMhXyUj1xs6dQuyPCDicGNSG2F+l1R/6baFOfzSHUtb/YNX
 N7fGFuq50y7P/FdHO74YdKnhfkJ2ZtakyqiGvrfAYSfGKEQUn0lUqy96mo6kv2Ec
 cZn+CJIZB1B04ZCjkyw2g0mnmHRw7XGOBi70IadNfFXbB7XTFF7J/M7NslgyXHkV
 97khKv9wdliW7dChcaDXa2TeWFPK6NDZDelUrkobzFPv4x/MbjfnTJmS2wIf2a7F
 b03/hr1/fLg2jrZw5z+uF566uaDBTi7l12x/fNLvCM8XnejTJk8Z7uVgZl3RNT6y
 bYZFRLqHTZfnGVha42Tc9DqiZvX3Hiv0U1Mv8WmIB0Niris++z4SBV8h3NjOOFzf
 R+yzggvF28pjxX3c
 =CqGk
 -----END PGP SIGNATURE-----

Merge tag 'kbuild-fixes-v6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Fix the prefix in the kernel source tarball

 - Fix a typo in the copyright file in Debian package

* tag 'kbuild-fixes-v6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kbuild: use proper prefix for tarballs to fix rpm-pkg build error
  kbuild: deb-pkg: Fix a spell typo in mkdebian script
2023-04-23 08:22:25 -07:00
Linus Torvalds
5ad250f1fe - Remove an over-zealous sanity check of the array of MSI-X vectors to
be allocated for a device
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmRFBfsACgkQEsHwGGHe
 VUrwug//Q3850CPw+Sm+DuAL6LNFr8GXDigD/nkhJqPzm2cj7yIr8L4QmFVQAhXt
 2ikyaZtBTVoTmCr2UsdaX5z11wYWxzMBaZGKQS7tUXnKwiIntzadpC7/0F/69y6I
 DMHsCkPrxxOCScriEcH6Tt70SPXBp1zsO7fKFRnGOQiuesoRcBVJz8t9thpUrzfH
 G18BmeIYGd4NoAJg+WOp4EXGLix0uy/ghb03bUCs1UGFAUIy+C7AZFWK4LcXhhS8
 fOiJl1hcvV98RUwO3PWNtxB2c9/E62t9Xc/rAKMjgCCM7dbHxCY0Ftiw0dmcX8ne
 T+7IBTHlsk7iywXCB5xrj52YJoIUI+dgmtvUwMZVwRPK27KjQCZsb9x6sSgmULCz
 ObGWU1ZUPNE9n1NhMD4U2F9avznONeiJhfC7HhP+5TkIr3pIUz7ZdUCsFYUuQ1N6
 nVjndY92ja0WVSxth4uOs2PSsf4o0IbP9owcABdOHvPPFt+CR7szSOYoQ2dXBHZl
 R06h/ZOoKz4bMG/n8JOcjK1IKokx/pU1vt3YAJo6RSR/9VdcZIEt/XuQftLT5A0F
 EzNzBRvsywytvU7X13/ZIEPz7/6Anp78CisrgYcUIbQFhNmQ2ae+9ns48GLBzrx8
 Mf+amryuHA+g+5duDFXi5f0jGH4rTD8PMTYv92nhPtrXyvJtiOw=
 =Vg8O
 -----END PGP SIGNATURE-----

Merge tag 'irq_urgent_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fix from Borislav Petkov:

 - Remove an over-zealous sanity check of the array of MSI-X vectors to
   be allocated for a device

* tag 'irq_urgent_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  PCI/MSI: Remove over-zealous hardware size check in pci_msix_validate_entries()
2023-04-23 08:15:33 -07:00
Linus Torvalds
97249f05b2 - Fix for older binutils which do not support C-syntax constant suffixes
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmRFAOwACgkQEsHwGGHe
 VUolgQ/8CNUX+kQPZf+IucQx/YWiY2fNtGjJ+mQ1jlYWZYFVicm9S4LLxyAK/lZf
 usr6pDEHLHDI2LYbLUQAVCM+GDmkxD9mQYC/vJ6REXD4lW8eTAq3Bgmkxbn80fMR
 wRxO5HHRHU9ZypMstjmaoLiuAJ7OFH7DtHmQqhlcxV/5IIFu72DLssg9XCNhfODR
 Usr4B2ADTc1v87RBLx61X5yk8sam7KSj/ehkJvp5Z8TgvJQczLGha3R7MNC+/oXd
 O7oT2+9Py49nmzJhMrzjmdPgxVipVLxvfG/Lo0GbdVm6rSrvip1tPef+CgTPvca9
 jGuyU451yKaWpS5xwvXja0/SOoqGqbBWN9Xx9MqoZHsJIRIeDcohp1GeK7TOAodw
 0TSD1RfpZUlxLeASpFYNAZYnAEHpuHAxnSMfNQV/bJjXqGYAVXJIZ8NIx6nemkSG
 U8dBGMox8N+kjJe+A5MY8fQXqbE/SUA6+jA+wZ1OIZvQ4iwLSlrgnACquNVR7xSP
 0y+p3g+vhFdObsV1zJ16rlU3jgm7Ijcy5+whbpY/NKxIldXbFCUPKecfXP8ey4Zu
 Agb1dZVR3Af92Tn2JNFeKQP0p2iclLm38Tl/6z5F4+ewYj2N6acWVjr2mahoUOQL
 6N/cisWEZSlGGUhLSarxjEpf6XE7R0EhhjxSyIerRF55Bx28OEg=
 =C7ft
 -----END PGP SIGNATURE-----

Merge tag 'x86_urgent_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fix from Borislav Petkov

 - Fix for older binutils which do not support C-syntax constant
   suffixes

* tag 'x86_urgent_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/alternatives: Do not use integer constant suffixes in inline asm
2023-04-23 08:03:57 -07:00
Linus Torvalds
d6b78224c6 Input updates for v6.3-rc7
- a check in pegasus-notetaker driver to validate the type of pipe
   when probing a new device
 
 - a fix for Cypress touch controller to correctly parse maximum
   number of touches.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCZES2XAAKCRBAj56VGEWX
 nAp4AP9zjIdcs9G0d+1Peo8oS82ef2Fo0MJIAvelmRqc972a6AEA+t3yjwzjphmA
 2A7cSw3H3n82oQvdN9pjDPHCbBg7uQ0=
 =Yv1r
 -----END PGP SIGNATURE-----

Merge tag 'input-for-v6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

 - a check in pegasus-notetaker driver to validate the type of pipe when
   probing a new device

 - a fix for Cypress touch controller to correctly parse maximum number
   of touches.

* tag 'input-for-v6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: cyttsp5 - fix sensing configuration data structure
  Input: pegasus-notetaker - check pipe type when probing
2023-04-23 07:46:52 -07:00
Masahiro Yamada
9cedc5e89a kbuild: use proper prefix for tarballs to fix rpm-pkg build error
Since commit f8d94c4e40 ("kbuild: do not create intermediate *.tar
for source tarballs"), 'make rpm-pkg' fails because the prefix of the
source tarball is 'linux.tar/' instead of 'linux/'. $(basename $@)
strips only '.gz' from the filename linux.tar.gz.

You need to strip two suffixes from compressed tarballs and one suffix
from uncompressed tarballs (for example 'perf-6.3.0.tar' generated by
'make perf-tar-src-pkg').

One tricky fix might be --prefix=$(firstword $(subst .tar, ,$@))/
but I think it is better to hard-code the prefix.

Fixes: f8d94c4e40 ("kbuild: do not create intermediate *.tar for source tarballs")
Reported-by: Jiwei Sun <sunjw10@lenovo.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
2023-04-23 21:23:10 +09:00
Woody Suwalski
8b824220bd kbuild: deb-pkg: Fix a spell typo in mkdebian script
Signed-off-by: Woody Suwalski <terraluna977@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2023-04-23 21:23:10 +09:00
Linus Torvalds
622322f53c Fix for link errors
-----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCAA4FiEEbt46xwy6kEcDOXoUeZbBVTGwZHAFAmRET60aHHRzYm9nZW5k
 QGFscGhhLmZyYW5rZW4uZGUACgkQeZbBVTGwZHBE3Q//Qyy4dfHcP1gwZCzg1DbG
 Y5pqMk3a605dMdLTmpN3nmdpXXt/D1gP2vgU0vjJkbVfN3j6ugFE+i8gvDwBT2VT
 uSXoFgABAyofT/WOa74HfpEcY0gCcS5kRrPTVm7xYFM8asGM7xGyKClgoYzsUB+X
 zFI6OChMFe+cgPwDilJ1BTmXqjO1BU/AqjfhGg+vuj9ZlM/mfVBx0wkFqnXYC6O6
 RLCQgzPrziLFqmn+2ItPVZ5cbO6sypijtaALUHEFdL9Ssg5APhFonkGM9XQspZpk
 vZcTf/XFUrudWZnrmN7D9qdlNruWZ71UyHOARc2Wu9iEGyOc5/rWyfDcZHNu6zfh
 qgkNADUp0O5XvMgw4FrPiWQDArSXXj4hMxY7/SyIGkd/jWHV3t3H+SYz13d2sujA
 jAz4MxrNuuwRy4y3Y9terGEkXaS3MpFBm6kHKpiNSV9hKWZJdiTeGWP4mpqttnel
 +maLxuypEjYGICAH57jh/q+zceTzukB+XDutqXfNtFFYMcvNCPut8mZ+E5SQJ7Kj
 e3nx/GTP2uA49jEKslb74fO4wqDU4u64/Vah3csJUO+41DuJ1tZJ/hN0s4oafFlm
 8pSuHjP7z3mtbFGePP5aVoVCjMp5hRTj7jHNAB6TeQ4ZlPb8zelHwLRqTmnk4JPt
 FyllW3ZKi3M51jasDg+JRNY=
 =oY9Y
 -----END PGP SIGNATURE-----

Merge tag 'mips-fixes_6.3_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS fix from Thomas Bogendoerfer:
 "Fix for link errors"

* tag 'mips-fixes_6.3_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  MIPS: Define RUNTIME_DISCARD_EXIT in LD script
2023-04-22 19:11:47 -07:00
Linus Torvalds
2caeeb9d4a Two serious ARM fixes:
* Plug a buffer overflow due to the use of the user-provided register
   width for firmware regs. Outright reject accesses where the
   user register width does not match the kernel representation.
 
 * Protect non-atomic RMW operations on vCPU flags against preemption,
   as an update to the flags by an intervening preemption could be lost.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmRDIaMUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroN7Hwf+Pjf7eQ6YZJdmG/4ySbEHJwml1MoW
 KxZn6aODWlxhSj7AtQMpvw0+HoGOoOPE0dV4GOMOqh9P/i0gwFOHtmhFczssyxgY
 WwjoW3JEuYZYJ7v1uhUVR0aQvKsTplNsW2tnD6WvneV+YbGgSDc7QRH3FbP7wOow
 /tsCerEuNLr7aQP5PdYnnbGQ/YyVKCX/Z0iuENa1tNn9T4/fVlzzMXNzCnrUAFp4
 bOEDmgZNDfJRT626Yg8HiLsVB2Dwkbxo1u1d4JP2x+/7Gl38RPSSX7y6e3EQ1rdO
 Ttb/2JD5iLhtNShCY0JbPR/rsGd8cTFZn1odpnXd+PRu+OOvStSEFcdx3g==
 =XhSQ
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "Two serious ARM fixes:

   - Plug a buffer overflow due to the use of the user-provided register
     width for firmware regs. Outright reject accesses where the user
     register width does not match the kernel representation.

   - Protect non-atomic RMW operations on vCPU flags against preemption,
     as an update to the flags by an intervening preemption could be
     lost"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: arm64: Fix buffer overflow in kvm_arm_set_fw_reg()
  KVM: arm64: Make vcpu flag updates non-preemptible
2023-04-22 09:27:46 -07:00
Linus Torvalds
84ebdb8e0d three small smb3 client fixes
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmRDSFEACgkQiiy9cAdy
 T1FUiQwAr0/Di4S4U5XDZNDdW9/4qFqI95ciShsIFb6cXtMQeauTImOp5zDEaW2x
 mn31RZSIMDK+Ljximh4W2phH+5k47K51tVXetWCVOHIPBc1h4AUAz5XmhChtirJ9
 seqhPx2wIi+4TH3gvKkc8xxmZ6HMfZ+F7nuc72eZ1rnO91VoLRywpACItKO2Q8Vu
 XSGMgjiaP0KshyxIcBwKXxHjnaOBF6nBBENU/sHkNZNRngzi/+Xcr371eijbs8Ay
 hk7RPnH04uOYwkFs+9gFpSyYtkdn9iTaPScYWE9UDTeZl8xuQJnGlGXQ1CEZHfkh
 OBzb2/UCX77ggnuFyukP8e5ZsrdGEaotjYgmsb7s7BO9eqAcBRp31SKhIbvIZvTG
 IBLBtWFNSvdoKk1EUvu2iKHxcGcZ3EFjLTmx5pwcAwmBLp+UM/i+IcxvS+b2uPif
 mVIzsXPRI6yi9uJ7PPqtBlkhNrwNk4cfs1hkeXOqN7XGBaQjx89wydMGJDF9otse
 BsNDDXmF
 =KXCn
 -----END PGP SIGNATURE-----

Merge tag '6.3-rc7-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:
 "Three small smb3 client fixes:

   - two important fixes for unbuffered read regression with the
     iov_iter changes (e.g. read soon after mount in some multichannel
     scenarios)

   - DFS prefix path fix (also for stable)"

* tag '6.3-rc7-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Reapply lost fix from commit 30b2b2196d
  cifs: Fix unbuffered read
  cifs: avoid dup prefix path in dfs_get_automount_devname()
2023-04-22 09:18:35 -07:00
Paolo Bonzini
265b97cbc2 KVM/arm64 fixes for 6.3, part #4
- Plug a buffer overflow due to the use of the user-provided register
    width for firmware regs. Outright reject accesses where the
    user register width does not match the kernel representation.
 
  - Protect non-atomic RMW operations on vCPU flags against preemption,
    as an update to the flags by an intervening preemption could be lost.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSNXHjWXuzMZutrKNKivnWIJHzdFgUCZEALwAAKCRCivnWIJHzd
 Fq2nAQDPwWpuMOrQYZCM5RF5/8yai5OPKB0NcvK00UDM4f6E1AEAxDud/KT9i15c
 dmBfGn1zDzW4XAENrOkxjQWuBqi/tQg=
 =Lxvf
 -----END PGP SIGNATURE-----

Merge tag 'kvmarm-fixes-6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm64 fixes for 6.3, part #4

 - Plug a buffer overflow due to the use of the user-provided register
   width for firmware regs. Outright reject accesses where the
   user register width does not match the kernel representation.

 - Protect non-atomic RMW operations on vCPU flags against preemption,
   as an update to the flags by an intervening preemption could be lost.
2023-04-21 19:19:02 -04:00
Jiaxun Yang
6dcbd0a69c MIPS: Define RUNTIME_DISCARD_EXIT in LD script
MIPS's exit sections are discarded at runtime as well.

Fixes link error:
`.exit.text' referenced in section `__jump_table' of fs/fuse/inode.o:
defined in discarded section `.exit.text' of fs/fuse/inode.o

Fixes: 99cb0d917f ("arch: fix broken BuildID for arm64 and riscv")
Reported-by: "kernelci.org bot" <bot@kernelci.org>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2023-04-21 23:59:43 +02:00
Linus Torvalds
8e41e0a575 Revert "ACPICA: Events: Support fixed PCIe wake event"
This reverts commit 5c62d5aab8.

This broke wake-on-lan for multiple people, and for much too long.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217069
Link: https://lore.kernel.org/all/754225a2-95a9-2c36-1886-7da1a78308c2@loongson.cn/
Link: https://github.com/acpica/acpica/pull/866
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Jianmin Lv <lvjianmin@loongson.cn>
Cc: Huacai Chen <chenhuacai@loongson.cn>
Cc: Bob Moore <robert.moore@intel.com>
Cc: stable@kernel.org # 6.2
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-04-21 13:39:10 -07:00
Linus Torvalds
c337b23f32 for-6.3-rc7-tag
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAmRCmhgACgkQxWXV+ddt
 WDsHrA/+KaCgixD0Z/8f2tMu2Kd5KQ6vQGMlydZzr0OvTYh3skAjTbAfTGAUHiXF
 6qZOpYYEilE+xhdcTegB4fV1OPJQw8+rvRrPps9ugZEShQhHlUbIuuiSCtrILKmK
 424wkllNc7NDbz5CHbbBpNNGdc6Xgyr3zy4nKZf/Sezmj+aK/nRL/JmazzUaEnxM
 NC8hBq+Nrpz0ucyStiLp4jfdp5geo4hcfpXVEBuH2ZpzhBPV4usLBWwsEj6uBcTy
 mpvMNHTFw/8H/k9w6GS+E/hrU5Rs5tWHTlEIz+xD1kK8DoPoE1arcgdLCzS0yC81
 8MyjB2qgMp3XutVlQGwyWAalY04UfzKvQ4yUYwTKT24pToc0TmQq8YV2Sy7c7SeA
 SDy+Ev1wgteeaPskhS9vMbJvnKVSzOMovt0oNR6VoPivXZ0OjVRDkC3fT2l497JL
 jZB3H7JaUGxJ/du1kUQkhL2c6YnjkWsqbl1YoOUBilNXkY/Mbz8NCZZdLJia0Q41
 P14w4aeD8HAYBNkOvSrDwfBQB5fR31GQq3QH/dGfJ4i41eJlNAposcOWQkV115Ib
 eILV3kFxJNSCpUI7eaE2biacGxJLdiWPQDv5Oo5AETyqcoiFqjCDerZWCTgH54H2
 YzzJiY/1BH8RgYbrCUyoPmyGOhoovYSVG9gLK3nXk1jqWltJgD0=
 =mGL5
 -----END PGP SIGNATURE-----

Merge tag 'for-6.3-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:
 "Two patches fixing the problem with aync discard.

  The default settings had a low IOPS limit and processing a large batch
  to discard would take a long time. On laptops this can cause increased
  power consumption due to disk activity.

  As async discard has been on by default since 6.2 this likely affects
  a lot of users.

  Summary:

   - increase the default IOPS limit 10x which reportedly helped

   - setting the sysfs IOPS value to 0 now does not throttle anymore
     allowing the discards to be processed at full speed. Previously
     there was an arbitrary 6 hour target for processing the pending
     batch"

* tag 'for-6.3-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: reinterpret async discard iops_limit=0 as no delay
  btrfs: set default discard iops_limit to 1000
2023-04-21 10:47:21 -07:00
Linus Torvalds
334e5a8206 block-6.3-2023-04-21
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmRCpRkQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpnAhEADO9oOtBP5cyQpJ1lm1nQeJVGk3cqHb2tfX
 yp2rziMAz3w8a8S/Y8FSBu2eXFG7ebf7QR30rQIXGW/VpxlDlYGaHIB4ti4n1ye9
 t+jP4CDrL4Wz+XJlCeirM9jpyxJJBFyVoGdB9y3owRIKtMP/o8KD+KvTN0ji7FG9
 /pmWAQCzQAuKoayWgqZ6qPHvttXXQ3A7FZjKKmUpIe1bMV0LBCbywqABLN87yKd8
 MhuDoewNO0bO+Dnxs8x4Od11arTQwYlGmKK+OKPBa3Z/9+jLF6xwj6f99ixv4FJZ
 7vt9G6VpcPfWaMdakIiZvCzx4t6loAS1/7/3VDsUh8aCwn/nuH47VkfdFIqWzGiK
 AWJdTDEYOkpwfEN49aJsvejVxfuHTpeUe+Y0YSba2mM5e8aMbRjJwSw+85g4Fq+0
 rEcKns1VEl6cYyz8R6nTqy8ubABxkZqL7G+900wLu6HegdI6KwrqPi6JXnahN8CZ
 sjApsHQ7F2K5c5znzOg/8BWT9tJ8CdoSw/ZYoOp9VRiw447DopX0SA3BYoJkKQbO
 LpSpuam/5LWRpA7HKAfR1O3Yus+ecua8dvq1KkSKoBr/8o8/9ma6biOtv1QjtLpD
 FiGRyPVmcdNrqbU4MMBcG7x4MWssc4fS0SyWla69n3LWxDazp/vTsCoPeKrxTFxK
 HbjuTrlQnQ==
 =j3nf
 -----END PGP SIGNATURE-----

Merge tag 'block-6.3-2023-04-21' of git://git.kernel.dk/linux

Pull block fix from Jens Axboe:
 "Just a single revert of a patch from the 6.3 series"

* tag 'block-6.3-2023-04-21' of git://git.kernel.dk/linux:
  Revert "block: Merge bio before checking ->cached_rq"
2023-04-21 10:05:52 -07:00
Linus Torvalds
8fd06d441e Char/Misc driver fixes for 6.3-final
Here are some last-minute tiny driver fixes for 6.3-final.  They
 include fixes for some fpga and iio drivers:
   - fpga bridge driver fix
   - fpga dfl error reporting fix
   - fpga m10bmc driver fix
   - fpga xilinx driver fix
   - iio light driver fix
   - iio dac fwhandle leak fix
   - iio adc driver fix
 
 All of these have been in linux-next for a few weeks with no reported
 problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZEKElg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ylu9ACdGnBPgW7sZaIELlJXSL0n4zUAvM0AoNiOldn1
 5ZjCjkAgyITm0rxSM32X
 =Q/Mx
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-6.3-final' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are some last-minute tiny driver fixes for 6.3-final. They
  include fixes for some fpga and iio drivers:

   - fpga bridge driver fix

   - fpga dfl error reporting fix

   - fpga m10bmc driver fix

   - fpga xilinx driver fix

   - iio light driver fix

   - iio dac fwhandle leak fix

   - iio adc driver fix

  All of these have been in linux-next for a few weeks with no reported
  problems"

* tag 'char-misc-6.3-final' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  iio: light: tsl2772: fix reading proximity-diodes from device tree
  fpga: bridge: properly initialize bridge device before populating children
  iio: dac: ad5755: Add missing fwnode_handle_put()
  iio: adc: at91-sama5d2_adc: fix an error code in at91_adc_allocate_trigger()
  fpga: xilinx-pr-decoupler: Use readl wrapper instead of pure readl
  fpga: dfl-pci: Drop redundant pci_enable_pcie_error_reporting()
  fpga: m10bmc-sec: Fix rsu_send_data() to return FW_UPLOAD_ERR_HW_ERROR
2023-04-21 10:00:18 -07:00
Linus Torvalds
bdc83e00f0 gpio fixes for v6.3
- use raw_spinlocks in regmaps that are used in interrupt context in
   gpio-104-idi-48 and gpio-104-dio-48e
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmRCWnoACgkQEacuoBRx
 13J/7Q/+IMwRVgDzDJsHUk0+psR3lqj2fcc/K5q4vAF850dCmvfai1acJb/l0Lnw
 OhQX05zgI1vvKEsrEuyzFLwzTGyUMvP0Y6YypgVlewqWflbPKCdjb/NLDpF5D57c
 zdkStjXbk8lV+N5hIwh5ZE6dwecbNKj8avk7+roLdOB+ML+KYjGGOiWx9NkG7PE5
 BQMktlH6vQzzd37P61CO3anqVhLKXJKg6XXKoI2k4h2Dcy3FUgEgHyeYXb5R5EJj
 EeMKUOKAn+2fw3lmpOdI9A+l8wUFqRheBVnYVNKngiBaWDQgxas8EqHK945pIJDG
 UipVmZ58o3FR65xECRTQsBibZHHzihEOQU7SG5gduk7I/OuPkcbUHO36aTkYSb3X
 dXZj26xJbOshBb77IkELKGEDy3FCrI2do5u2bGEiD+V9SfBLWl4cncr/PpUcRDy2
 AuR2Ad6rfRFc8qCyCvE/Ow39o4mnJkUjOUzzU3BBzDLrd4xh6eTnOfBF3wo/lxpd
 BMn3LJd8GiNtfBf1dTx5M+efMclQk3m7cA5DaWrXSMo9vjTGTY9PIgKG8hgGOKTS
 FB6trgSUWfitXn5p1qjhtTE8Np0xkSevtKe9vlx/hM27DVmuWg3FjY+UAVm6so9M
 RxNgtjZj2YFDHJhmyxdttxV//a2UGP0GmtiLLPhL5yb6dPso8OM=
 =SCgE
 -----END PGP SIGNATURE-----

Merge tag 'gpio-fixes-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - use raw_spinlocks in regmaps that are used in interrupt context in
   gpio-104-idi-48 and gpio-104-dio-48e

* tag 'gpio-fixes-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: 104-idi-48: Enable use_raw_spinlock for idi48_regmap_config
  gpio: 104-dio-48e: Enable use_raw_spinlock for dio48e_regmap_config
2023-04-21 09:50:47 -07:00
Linus Torvalds
a14e151910 sound fixes for 6.3-final
Just a few fixes: all small and device-specific (ASoC FSL, SOF, and
 HD-audio quirks), should be safe to apply at the last minute.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmRBYSAOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE/XgA/+Jt2LbYSJhgJlibMR73UxLZJeTvcUnGcvY75F
 arKeYYCcNVqHMJ6kxE+7tAqclVxOqVxLx8EEv3SBmx/xs+aV7r0qLACKAf6SRLHc
 b+hDa328lmj+OPUuam4WrlUR7guVDt1Q1nbBfuJo28x/aOyDbMyAH+6mjZaNXPpw
 NYOD6zusw9RRXLdK0aIlv+M/7FCY1NRJGsLHfP6tJr8TW2rGZvbo30tyDdLyKueT
 zZBhkQZtKAQ3yvyEgziJpZZq1Fvz2VkxZnauQIj49IggCNGojBBQnSVV8ZSii0qa
 vEiE2amcrNeHK6BuV+ClfCCXtv0/lxM1EOoIqFEoYPlNksQtHFAU95JkqYT7M4rL
 XmtdizEdCXN2UGq7StFhgkHt/f8xaJJ56SzmkBTL3BtrqcgNCn5rwKH+tDfJZxOT
 93BTL0dyXaWBX159iGikxrFBIvpCmMD68R8c00jnmtZAZujYEQuquG8920o56Ymp
 1awDBQu7KXLhD6L4raabMZNBSz9X9qF/pLOJORPAXcKM0nXQ0oaS7f5PCtJ+X7sQ
 O9CJ6qQLMdOv95f5LH0OwAl6eZjdGc7OvxAICPciZpiAEsV8yxPsWuijzMNit3Cr
 Y6Wo2UXVMpgGUPS0oVlMkSqVwak2dU5ResAftJpoCNu2TpVOC+/VzTvlD2HDEjd1
 gZe6K0A=
 =vCeN
 -----END PGP SIGNATURE-----

Merge tag 'sound-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Just a few fixes: all small and device-specific (ASoC FSL, SOF, and
  HD-audio quirks), should be safe to apply at the last minute"

* tag 'sound-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook
  ASoC: fsl_asrc_dma: fix potential null-ptr-deref
  ASoC: fsl_sai: Fix pins setting for i.MX8QM platform
  ALSA: hda/realtek: Remove specific patch for Dell Precision 3260
  ASoC: max98373: change power down sequence for smart amp
  ASoC: SOF: pm: Tear down pipelines only if DSP was active
  ASoC: SOF: ipc4-topology: Clarify bind failure caused by missing fw_module
2023-04-21 09:34:49 -07:00
Ekaterina Orlova
5a43001c01 ASN.1: Fix check for strdup() success
It seems there is a misprint in the check of strdup() return code that
can lead to NULL pointer dereference.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 4520c6a49a ("X.509: Add simple ASN.1 grammar compiler")
Signed-off-by: Ekaterina Orlova <vorobushek.ok@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jarkko Sakkinen <jarkko@kernel.org>
Cc: keyrings@vger.kernel.org
Cc: linux-kbuild@vger.kernel.org
Link: https://lore.kernel.org/r/20230315172130.140-1-vorobushek.ok@gmail.com/
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-04-21 08:58:00 -07:00
Linus Torvalds
2af3e53a4d drm fixes for 6.3 final
nouveau:
 - fix dma-resv timeout
 
 rockchip:
 - fix suspend/resume
 
 sched:
 - fix timeout handling
 
 i915:
 - Fix fast wake AUX sync len
 
 amdgpu:
 - GPU reset fix
 - DCN 3.1.5 line buffer fix
 - Display fix for single channel memory configs
 - Fix a possible divide by 0
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmRB5goACgkQDHTzWXnE
 hr61CQ//WErknR7CmIA4JOSRwULsh4MnfVTa7qEf4adHg33TvKG4XgzxBc7Z03FU
 8nblFCYTFu98w1uFGn3f/z8Qy4xsJw5zaBZo9Yul26IEjbjGmr0s2ex/SZoeLzuh
 5j53jDl4uFEL4ckiQrSn/n4qC8yj5oMoszZ5m97ZMj3rb7Z21HKYPBrmJAZKXt+d
 +4ZfE9pNEek3JhVkdgwr52aEIgu2PLQJIiLVHWd8x+oHbNrDkG7NxhbzcG8ETAf0
 o9H5NO0nn89ec3olBXk8eIwgmReatwEWmnZYW26uJVB6MGsOsw3Uga74zsv07FBe
 uyMBGIpTAA8DveTuMpBdw9LAiXshsM5c8kG1cmM+0t3r3IJBfzJTwn4RrbMgmVcl
 1QBYg+MVagYYvhxgWJym4KbvGKfnq72nc/vUiQyBh1CqN4usZede2CO6sp1lN25G
 BMo9Tr4Rd6/5LOiF0watYgSFiVNCYP8OmGMEtAgPc/iWWZtgWhI+m5BcKnNVkuNK
 OWzER9mynVpKCNZ+wuMxcHdzMo2RqeuHWU4+1BoZtsBGnR+iCI2QfZYsP1v7q7K5
 O1FAQfgV2K86gO1UGqZEzenVIusx7H8ahtrCpbOEqOahPUC0hcEI6LxxmWBk8Hm4
 OAC9L4LE7jIG98HqibjuynGIoX4+EEpmIErHe7ZBRrQv8tIDSZE=
 =VIeS
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2023-04-21' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "This is the regular and hopefully last round of fixes for 6.3.

  Pretty small, a few amdgpu, one i915, one nouveau, one rockchip and
  one gpu scheduler fix:

  nouveau:
   - fix dma-resv timeout

  rockchip:
   - fix suspend/resume

  sched:
   - fix timeout handling

  i915:
   - Fix fast wake AUX sync len

  amdgpu:
   - GPU reset fix
   - DCN 3.1.5 line buffer fix
   - Display fix for single channel memory configs
   - Fix a possible divide by 0"

* tag 'drm-fixes-2023-04-21' of git://anongit.freedesktop.org/drm/drm:
  drm/amd/display: fix a divided-by-zero error
  drm/amd/display: limit timing for single dimm memory
  drm/amd/display: set dcn315 lb bpp to 48
  drm/amdgpu: Fix desktop freezed after gpu-reset
  drm/rockchip: vop2: Use regcache_sync() to fix suspend/resume
  drm/nouveau: fix incorrect conversion to dma_resv_wait_timeout()
  drm/rockchip: vop2: fix suspend/resume
  drm/i915: Fix fast wake AUX sync len
  drm/sched: Check scheduler ready before calling timeout handling
2023-04-20 19:15:58 -07:00
Dave Airlie
00a4bd000e Merge tag 'amd-drm-fixes-6.3-2023-04-19' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-6.3-2023-04-19:

amdgpu:
- GPU reset fix
- DCN 3.1.5 line buffer fix
- Display fix for single channel memory configs
- Fix a possible divide by 0

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230420031717.7790-1-alexander.deucher@amd.com
2023-04-21 11:13:25 +10:00
Dave Airlie
3b1f2be527 Merge tag 'drm-intel-fixes-2023-04-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
drm/i915 fixes for v6.3 final:
- Fix fast wake AUX sync len

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87354w1b76.fsf@intel.com
2023-04-21 10:37:23 +10:00
Dave Airlie
f126f41cec Short summary of fixes pull:
* nouveau: fix dma-resv timeout
  * rockchip: fix suspend/resume
  * sched: fix timeout handling
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmRA+BIACgkQaA3BHVML
 eiMiRAf+Lt9t9b4+xUfFdRb9X8iuv3Ufhj7JaMYmmBM6CFLxeB9GNvCiGbxS8/y9
 96/YnQIvoV7/YGSM+l8Vi2DmNFedtHww1dkepRYHY/M/kx5O/RHFQ/r/S7Du7IdT
 bLvSxxpMnvXkSss6hoAAJsbxT13RizWbaka/LqToYPIW9v2rUINp+o7+z9AuaXF7
 jBGsSAtlqUlyk8kyTRj8GAb7NM+BfXNTMqPNU9aGnBqzvxMcYrWphqiMI+nydA74
 zja+aSW7CpSPquqs0Xh8uN0IdhCel8cwvilk1fwSXQu4JMsyZ/9kcCUAVBhzmRIU
 9Yp2T5ps2LY+cMw3BIjhMAPBt2LPNQ==
 =lHAb
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2023-04-20-2' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

Short summary of fixes pull:

 * nouveau: fix dma-resv timeout
 * rockchip: fix suspend/resume
 * sched: fix timeout handling

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230420083114.GA17651@linux-uq9g
2023-04-21 09:59:01 +10:00
Linus Torvalds
b7bc77e2f2 pci-v6.3-fixes-3
-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAmRBmroUHGJoZWxnYWFz
 QGdvb2dsZS5jb20ACgkQWYigwDrT+vwtuA/+LsoJ0ohzhtph5SbVFR45tTYxr1uT
 3cUDhRmzEy5m7CPBogETTCn18r0VyPtjj2lgsDL7yubQJzCaQN5Sy8TkL43G/VhL
 kEPoP2KedWiaDHpzneLG0QAeRtA9nuZSzLokI1aHAjkFJ7KWlPyrNrBFDSMfxdiF
 N47o63q6UaREceM0jRF12FVB7OWLgr2Bx7spI093j3+KiVzC5EpdUveq4DyppNk2
 RjertZyWfVlzlV3DZ4yWSGDrya1IDRuCa7U6dNTq2vraEuT1sxCmdgblQJw6VClk
 irUF3xPnHZ4f/f2o443e70RV46gUqt8p639ONPm86bQtTPYxFbRGK0NZE5s/xDya
 fX0AmCx5/GcIcULxn76aSMTqOGRvzi5ainXdyEKNglxIVLJHqq2JronGVsbJlgjo
 QnUwVCThTz/xsRn2VNPV9kdwSgDZeIQ9xyQp8vSXSoQ1o1Yp13oEh02Adds0rFlM
 OULN4tEt9kuvR3rSTTPjeFzEd9JPS5DLawlLJemDAJYrerO3Hf3sKHK67mGL3vVu
 5PN9YztYeVc/0BMBl2H7aM9w4ISIH8admctGGvPn/3WpxCP4kztmXrD/1FzhWVxm
 NojwvRvMWcZJ7mPVXfzdbJ/RBoVxbur+FEKvuGlzgNDMlkwtTbiGFJG+reVoPHHz
 MoFc9Y47HNdiK44=
 =agMG
 -----END PGP SIGNATURE-----

Merge tag 'pci-v6.3-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci

Pull pci fix from Bjorn Helgaas:

 - Previously we ignored PCI devices if the DT "status" property or the
   ACPI _STA method said it was not present.

   Per spec, _STA cannot be used for that purpose, and using it that way
   caused regressions, so skip the _STA check (Rob Herring)

* tag 'pci-v6.3-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
  PCI: Restrict device disabled status check to DT
2023-04-20 15:36:23 -07:00
Boris Burkov
ef9cddfe57 btrfs: reinterpret async discard iops_limit=0 as no delay
Currently, a limit of 0 results in a hard coded metering over 6 hours.
Since the default is a set limit, I suspect no one truly depends on this
rather arbitrary setting. Repurpose it for an arguably more useful
"unlimited" mode, where the delay is 0.

Note that if block groups are too new, or go fully empty, there is still
a delay associated with those conditions. Those delays implement
heuristics for not trimming a region we are relatively likely to fully
overwrite soon.

CC: stable@vger.kernel.org # 6.2+
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Boris Burkov <boris@bur.io>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-21 00:28:23 +02:00
Boris Burkov
e9f59429b8 btrfs: set default discard iops_limit to 1000
Previously, the default was a relatively conservative 10. This results
in a 100ms delay, so with ~300 discards in a commit, it takes the full
30s till the next commit to finish the discards. On a workstation, this
results in the disk never going idle, wasting power/battery, etc.

Set the default to 1000, which results in using the smallest possible
delay, currently, which is 1ms. This has shown to not pathologically
keep the disk busy by the original reporter.

Link: https://lore.kernel.org/linux-btrfs/Y%2F+n1wS%2F4XAH7X1p@nz/
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2182228
CC: stable@vger.kernel.org # 6.2+
Reviewed-by: Neal Gompa <neal@gompa.dev
Signed-off-by: Boris Burkov <boris@bur.io>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-21 00:28:20 +02:00
Toke Høiland-Jørgensen
0f2a4af27b wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels()
This partially reverts commit e161d4b60a.

Turns out the channelmap variable is not actually read-only, it's modified
through the MCI_GPM_CLR_CHANNEL_BIT() macro further down in the function,
so making it read-only causes page faults when that code is hit.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217183
Link: https://lore.kernel.org/r/20230413214118.153781-1-toke@toke.dk
Fixes: e161d4b60a ("wifi: ath9k: Make arrays prof_prio and channelmap static const")
Cc: stable@vger.kernel.org
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-04-20 15:26:37 -07:00
Linus Torvalds
6a66fdd29e Rust fixes for v6.3
- Build: Rust + GCC build fix and 'grep' warning fix.
 
  - Code: Missing 'extern "C"' fix.
 
  - Scripts: 'is_rust_module.sh' and 'generate_rust_analyzer.py' fixes.
 
  - A couple trivial fixes.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPjU5OPd5QIZ9jqqOGXyLc2htIW0FAmRAKacACgkQGXyLc2ht
 IW33VRAAglNS0O0ErOmHRdlwLx2kZXhXGAPtgLe6w0BSe46zdfBs/Y2dEqQZWzSX
 pfYDjLfVlmrObgOA9HkXR22gYaWfTPc0qCIhIKmkkQgF4q/VjMLl5QaU6fBAzz6k
 J7OqJmg5NeKMQW9G6CGJdkk9XldeIlEBi9C0P+YsaU/8N6PO0BNhYTaenbKRbusC
 kcjFMjekQlYEHsaX4flTXNKGSbg+tBi4igiBwcbQE/uy7l75mECHIUeQbXZMyp4b
 lWGMl8CdlYFLJRB4oxxvOQ3JgTdq9thVXu3WTK+ETs7tBNu9VB8zKuP+iOcpPjrX
 3Djt5QBL2+O3jPIrUKQfMK1Ejxh/BIHTy5643hSgppQg4+Y33RW8xKp1YHqSof46
 SNVJ9taQ9nnLNviNbtxXEN2Zj00jGgOa2qqXfycJwJvWPFI+VVgHvkbfvhKYJzJ/
 swVDCuYmdh74DgdwvOb4dwZqEpLwC+V8T4ll2EUpR/CLYf4FGyRAmbaxSVKzP/JT
 M/R7tDq10xvVB4rJsqwHri3nB0rmSM6+7fYiQHlwEGt6wImDSy0N9y1BcCZ+ckHW
 TmEjx93e6SjXiQKr98suBVC0W+GnHk+MN39rDhZbNJB74EBwGFEmrMweRTeFv9ya
 OuXkQOa3xOFt9E/eb26sPN0/sEJexnMu4vXEzCGBl51HcDqxQGQ=
 =zdCa
 -----END PGP SIGNATURE-----

Merge tag 'rust-fixes-6.3' of https://github.com/Rust-for-Linux/linux

Pull Rust fixes from Miguel Ojeda:
 "Most of these are straightforward.

  The last one is more complex, but it only touches Rust + GCC builds
  which are for the moment best-effort.

   - Code: Missing 'extern "C"' fix.

   - Scripts: 'is_rust_module.sh' and 'generate_rust_analyzer.py' fixes.

   - A couple trivial fixes

   - Build: Rust + GCC build fix and 'grep' warning fix"

* tag 'rust-fixes-6.3' of https://github.com/Rust-for-Linux/linux:
  rust: allow to use INIT_STACK_ALL_ZERO
  rust: fix regexp in scripts/is_rust_module.sh
  rust: build: Fix grep warning
  scripts: generate_rust_analyzer: Handle sub-modules with no Makefile
  rust: kernel: Mark rust_fmt_argument as extern "C"
  rust: sort uml documentation arch support table
  rust: str: fix requierments->requirements typo
2023-04-20 12:46:18 -07:00
Rob Herring
0d21e71a91 PCI: Restrict device disabled status check to DT
Commit 6fffbc7ae1 ("PCI: Honor firmware's device disabled status")
checked the firmware device status for both DT and ACPI devices. That
caused a regression in some ACPI systems. The exact reason isn't clear.
It's possibly a firmware bug. For now, at least, refactor the check to
be for DT based systems only.

Note that the original implementation leaked a refcount which is now
correctly handled.

[bhelgaas: Per ACPI r6.5, sec 6.3.7, for devices on an enumerable bus, _STA
must return with bit[0] ("device is present") set]

Link: https://lore.kernel.org/all/m2fs9lgndw.fsf@gmail.com/
Fixes: 6fffbc7ae1 ("PCI: Honor firmware's device disabled status")
Link: https://lore.kernel.org/r/20230419193513.708818-1-robh@kernel.org
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217317
Reported-by: Donald Hunter <donald.hunter@gmail.com>
Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Donald Hunter <donald.hunter@gmail.com>
Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Binbin Zhou <zhoubinbin@loongson.cn>
Cc: Liu Peibao <liupeibao@loongson.cn>
Cc: Huacai Chen <chenhuacai@loongson.cn>
2023-04-20 13:30:14 -05:00
Linus Torvalds
23309d600d Networking fixes for 6.3-rc8, including fixes from netfilter and bpf
Current release - regressions:
 
   - sched: clear actions pointer in miss cookie init fail
 
   - mptcp: fix accept vs worker race
 
   - bpf: fix bpf_arch_text_poke() with new_addr == NULL on s390
 
   - eth: bnxt_en: fix a possible NULL pointer dereference in unload path
 
   - eth: veth: take into account peer device for NETDEV_XDP_ACT_NDO_XMIT xdp_features flag
 
 Current release - new code bugs:
 
   - eth: revert "net/mlx5: Enable management PF initialization"
 
 Previous releases - regressions:
 
   - netfilter: fix recent physdev match breakage
 
   - bpf: fix incorrect verifier pruning due to missing register precision taints
 
   - eth: virtio_net: fix overflow inside xdp_linearize_page()
 
   - eth: cxgb4: fix use after free bugs caused by circular dependency problem
 
   - eth: mlxsw: pci: fix possible crash during initialization
 
 Previous releases - always broken:
 
   - sched: sch_qfq: prevent slab-out-of-bounds in qfq_activate_agg
 
   - netfilter: validate catch-all set elements
 
   - bridge: don't notify FDB entries with "master dynamic"
 
   - eth: bonding: fix memory leak when changing bond type to ethernet
 
   - eth: i40e: fix accessing vsi->active_filters without holding lock
 
 Misc:
 
   - Mat is back as MPTCP co-maintainer
 
 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEg1AjqC77wbdLX2LbKSR5jcyPE6QFAmRBF5ISHHBhYmVuaUBy
 ZWRoYXQuY29tAAoJECkkeY3MjxOkj5sP/itK7DeAzufFIe1SUY+WYdbhAj7XTJso
 q5bpF09wmLW9RLPxZ/hLMnCUniCSBBoJ/3oeBD8SgRBQJKSLjh1WTLYgFxfEZEeY
 DvydMxiurH13pxgMBpCUSTlqDbiLkZ51Sy2sSGJcoJK8XRfA265/D7ZEBFJRIJS9
 wr2prLspZmlN/5dnt8WIXubf83o5mkJ7DneSMBGuJXE2akJ7VBROz10pK1HVMALq
 c6p/Kt92iffEiZZYCnqogrQOu3hLcSCLRTM7Wb3giIX9jaE84Hr9fV+zfG/JDeCJ
 kgjEiKOExnusd8Nq91cClDt92ceRWU5s1M1UxJ5r4Mxjnq0Ug+I3ayItS9bXcEqH
 0PmDql4bKFUue7QiJZkCsusKjlf5R1XxE0Zt+lANn+FWr8THKxvnrbpCjT0ZUvQv
 7kI+Q4g7AFSNoWgM9SwtiTMQmxI8BUo7kgaBLz2IvFDzau4T+yDLKZ+3gyewwp0e
 RN4pac8YyChuuMBmVrZGxVHPA3fKu7C7jCc/xGaMHcQSgFCsQtPpKZVa1SxLR/ZZ
 efMB/J2+GIGv2i5YecH4DItNUd0QhZnXgBjLEaDmEGk4rHIlc9JDy3frD5Qrs4pW
 Dq2zvveRVT30b52sOjkYzEvTU5R/s1nio3RGklUE4hDCV1DkehThAFaX68cIcgeR
 63uRXDpogRs+
 =xUNa
 -----END PGP SIGNATURE-----

Merge tag 'net-6.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Paolo Abeni:
 "Including fixes from netfilter and bpf.

  There are a few fixes for new code bugs, including the Mellanox one
  noted in the last networking pull. No known regressions outstanding.

  Current release - regressions:

   - sched: clear actions pointer in miss cookie init fail

   - mptcp: fix accept vs worker race

   - bpf: fix bpf_arch_text_poke() with new_addr == NULL on s390

   - eth: bnxt_en: fix a possible NULL pointer dereference in unload
     path

   - eth: veth: take into account peer device for
     NETDEV_XDP_ACT_NDO_XMIT xdp_features flag

  Current release - new code bugs:

   - eth: revert "net/mlx5: Enable management PF initialization"

  Previous releases - regressions:

   - netfilter: fix recent physdev match breakage

   - bpf: fix incorrect verifier pruning due to missing register
     precision taints

   - eth: virtio_net: fix overflow inside xdp_linearize_page()

   - eth: cxgb4: fix use after free bugs caused by circular dependency
     problem

   - eth: mlxsw: pci: fix possible crash during initialization

  Previous releases - always broken:

   - sched: sch_qfq: prevent slab-out-of-bounds in qfq_activate_agg

   - netfilter: validate catch-all set elements

   - bridge: don't notify FDB entries with "master dynamic"

   - eth: bonding: fix memory leak when changing bond type to ethernet

   - eth: i40e: fix accessing vsi->active_filters without holding lock

  Misc:

   - Mat is back as MPTCP co-maintainer"

* tag 'net-6.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (33 commits)
  net: bridge: switchdev: don't notify FDB entries with "master dynamic"
  Revert "net/mlx5: Enable management PF initialization"
  MAINTAINERS: Resume MPTCP co-maintainer role
  mailmap: add entries for Mat Martineau
  e1000e: Disable TSO on i219-LM card to increase speed
  bnxt_en: fix free-runnig PHC mode
  net: dsa: microchip: ksz8795: Correctly handle huge frame configuration
  bpf: Fix incorrect verifier pruning due to missing register precision taints
  hamradio: drop ISA_DMA_API dependency
  mlxsw: pci: Fix possible crash during initialization
  mptcp: fix accept vs worker race
  mptcp: stops worker on unaccepted sockets at listener close
  net: rpl: fix rpl header size calculation
  net: vmxnet3: Fix NULL pointer dereference in vmxnet3_rq_rx_complete()
  bonding: Fix memory leak when changing bond type to Ethernet
  veth: take into account peer device for NETDEV_XDP_ACT_NDO_XMIT xdp_features flag
  mlxfw: fix null-ptr-deref in mlxfw_mfa2_tlv_next()
  bnxt_en: Fix a possible NULL pointer dereference in unload path
  bnxt_en: Do not initialize PTP on older P3/P4 chips
  netfilter: nf_tables: tighten netlink attribute requirements for catch-all elements
  ...
2023-04-20 11:03:51 -07:00
Ming Lei
81ea1222f2 Revert "block: Merge bio before checking ->cached_rq"
This reverts commit 23f3e3272e.

blk-mq sched bio merge still needs request to grab queue usage counter,
so we can't simply call blk_mq_attempt_bio_merge() when queue usage
counter isn't held.

Fixes: 23f3e3272e ("block: Merge bio before checking ->cached_rq")
Cc: Xiao Ni <xni@redhat.com>
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230420112018.1108058-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-20 06:54:17 -06:00
Vladimir Oltean
927cdea5d2 net: bridge: switchdev: don't notify FDB entries with "master dynamic"
There is a structural problem in switchdev, where the flag bits in
struct switchdev_notifier_fdb_info (added_by_user, is_local etc) only
represent a simplified / denatured view of what's in struct
net_bridge_fdb_entry :: flags (BR_FDB_ADDED_BY_USER, BR_FDB_LOCAL etc).
Each time we want to pass more information about struct
net_bridge_fdb_entry :: flags to struct switchdev_notifier_fdb_info
(here, BR_FDB_STATIC), we find that FDB entries were already notified to
switchdev with no regard to this flag, and thus, switchdev drivers had
no indication whether the notified entries were static or not.

For example, this command:

ip link add br0 type bridge && ip link set swp0 master br0
bridge fdb add dev swp0 00:01:02:03:04:05 master dynamic

has never worked as intended with switchdev. It causes a struct
net_bridge_fdb_entry to be passed to br_switchdev_fdb_notify() which has
a single flag set: BR_FDB_ADDED_BY_USER.

This is further passed to the switchdev notifier chain, where interested
drivers have no choice but to assume this is a static (does not age) and
sticky (does not migrate) FDB entry. So currently, all drivers offload
it to hardware as such, as can be seen below ("offload" is set).

bridge fdb get 00:01:02:03:04:05 dev swp0 master
00:01:02:03:04:05 dev swp0 offload master br0

The software FDB entry expires $ageing_time centiseconds after the
kernel last sees a packet with this MAC SA, and the bridge notifies its
deletion as well, so it eventually disappears from hardware too.

This is a problem, because it is actually desirable to start offloading
"master dynamic" FDB entries correctly - they should expire $ageing_time
centiseconds after the *hardware* port last sees a packet with this
MAC SA - and this is how the current incorrect behavior was discovered.
With an offloaded data plane, it can be expected that software only sees
exception path packets, so an otherwise active dynamic FDB entry would
be aged out by software sooner than it should.

With the change in place, these FDB entries are no longer offloaded:

bridge fdb get 00:01:02:03:04:05 dev swp0 master
00:01:02:03:04:05 dev swp0 master br0

and this also constitutes a better way (assuming a backport to stable
kernels) for user space to determine whether the kernel has the
capability of doing something sane with these or not.

As opposed to "master dynamic" FDB entries, on the current behavior of
which no one currently depends on (which can be deduced from the lack of
kselftests), Ido Schimmel explains that entries with the "extern_learn"
flag (BR_FDB_ADDED_BY_EXT_LEARN) should still be notified to switchdev,
since the spectrum driver listens to them (and this is kind of okay,
because although they are treated identically to "static", they are
expected to not age, and to roam).

Fixes: 6b26b51b1d ("net: bridge: Add support for notifying devices about FDB add/del")
Link: https://lore.kernel.org/netdev/20230327115206.jk5q5l753aoelwus@skbuf/
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20230418155902.898627-1-vladimir.oltean@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-04-20 09:20:14 +02:00