Commit Graph

1337546 Commits (003802c3a732301ff9edd99fe410ee08efe5f157)

Author SHA1 Message Date
Saket Dumbre 003802c3a7 ACPICA: Logfile: Changes for version 20241212
ACPICA commit 7dae72155bf06b0edda9f3aea713da1d48c1c418

Link: https://github.com/acpica/acpica/commit/7dae7215
Signed-off-by: Saket Dumbre <saket.dumbre@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/22641776.EfDdHjke4D@rjwysocki.net
2025-03-27 13:17:18 +01:00
Saket Dumbre 4a0bb41df4 ACPICA: Fix warnings from PR #295 merge
Possible loss of data from u32 to u8 conversions.

ACPICA commit 1d7a0aa04793ff731da13f2070877ec7a9498571

Link: https://github.com/acpica/acpica/commit/1d7a0aa0
Signed-off-by: Saket Dumbre <saket.dumbre@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/2304653.iZASKD2KPV@rjwysocki.net
2025-03-27 13:17:18 +01:00
Adam Lackorzynski 6ff5c32881 ACPICA: Fix typo in comments for SRAT structures
ACPICA commit 218b5b3654b355e7481cbee8209f5212201b1196

Link: https://github.com/acpica/acpica/commit/218b5b36
Signed-off-by: Adam Lackorzynski <adam@l4re.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/8507690.T7Z3S40VBb@rjwysocki.net
2025-03-27 13:17:18 +01:00
Zaid Alali 56b594fdb6 ACPICA: actbl1: Add EINJv2 get error type action
ACPICA commit 6975cd07e20ba955556e1eafe8a326834c354ae6

Add EINJV2_GET_ERROR_TYPE as defined in the new specs(1)(2).

Link: https://bugzilla.tianocore.org/show_bug.cgi?id=4615 (1)
Link: https://bugzilla.tianocore.org/attachment.cgi?id=1446 (2)
Link: https://github.com/acpica/acpica/commit/6975cd07
Signed-off-by: Zaid Alali <zaidal@os.amperecomputing.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3344273.aeNJFYEL58@rjwysocki.net
2025-03-27 13:17:18 +01:00
Zaid Alali 5d2f7e76b7 ACPICA: actbl1: Update values to hex to follow ACPI specs
ACPICA commit 0b44ed75fb551bf3fbbbd39ca72bd932872fff20

ACPI specs(1) define Error Injection Actions in hex values.
This commit intends to update values from decimal to hex to be
consistent with ACPI specs.

Link: https://uefi.org/specs/ACPI/6.5/18_Platform_Error_Interfaces.html (1)
Link: https://github.com/acpica/acpica/commit/0b44ed75
Signed-off-by: Zaid Alali <zaidal@os.amperecomputing.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/13729719.uLZWGnKmhe@rjwysocki.net
2025-03-27 13:17:18 +01:00
Saket Dumbre a05cea36dc ACPICA: New release 20240927
ACPICA commit 4632caf451c28da5355ab7131df8bef77818e0f4

Link: https://github.com/acpica/acpica/commit/4632caf4
Signed-off-by: Saket Dumbre <saket.dumbre@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/1918458.tdWV9SEqCh@rjwysocki.net
2025-03-27 13:17:18 +01:00
Seunghun Han bed18f0bdc ACPICA: fix acpi parse and parseext cache leaks
ACPICA commit 8829e70e1360c81e7a5a901b5d4f48330e021ea5

I'm Seunghun Han, and I work for National Security Research Institute of
South Korea.

I have been doing a research on ACPI and found an ACPI cache leak in ACPI
early abort cases.

Boot log of ACPI cache leak is as follows:
[    0.352414] ACPI: Added _OSI(Module Device)
[    0.353182] ACPI: Added _OSI(Processor Device)
[    0.353182] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.353182] ACPI: Added _OSI(Processor Aggregator Device)
[    0.356028] ACPI: Unable to start the ACPI Interpreter
[    0.356799] ACPI Error: Could not remove SCI handler (20170303/evmisc-281)
[    0.360215] kmem_cache_destroy Acpi-State: Slab cache still has objects
[    0.360648] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W
4.12.0-rc4-next-20170608+ #10
[    0.361273] Hardware name: innotek gmb_h virtual_box/virtual_box, BIOS
virtual_box 12/01/2006
[    0.361873] Call Trace:
[    0.362243]  ? dump_stack+0x5c/0x81
[    0.362591]  ? kmem_cache_destroy+0x1aa/0x1c0
[    0.362944]  ? acpi_sleep_proc_init+0x27/0x27
[    0.363296]  ? acpi_os_delete_cache+0xa/0x10
[    0.363646]  ? acpi_ut_delete_caches+0x6d/0x7b
[    0.364000]  ? acpi_terminate+0xa/0x14
[    0.364000]  ? acpi_init+0x2af/0x34f
[    0.364000]  ? __class_create+0x4c/0x80
[    0.364000]  ? video_setup+0x7f/0x7f
[    0.364000]  ? acpi_sleep_proc_init+0x27/0x27
[    0.364000]  ? do_one_initcall+0x4e/0x1a0
[    0.364000]  ? kernel_init_freeable+0x189/0x20a
[    0.364000]  ? rest_init+0xc0/0xc0
[    0.364000]  ? kernel_init+0xa/0x100
[    0.364000]  ? ret_from_fork+0x25/0x30

I analyzed this memory leak in detail. I found that “Acpi-State” cache and
“Acpi-Parse” cache were merged because the size of cache objects was same
slab cache size.

I finally found “Acpi-Parse” cache and “Acpi-parse_ext” cache were leaked
using SLAB_NEVER_MERGE flag in kmem_cache_create() function.

Real ACPI cache leak point is as follows:
[    0.360101] ACPI: Added _OSI(Module Device)
[    0.360101] ACPI: Added _OSI(Processor Device)
[    0.360101] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.361043] ACPI: Added _OSI(Processor Aggregator Device)
[    0.364016] ACPI: Unable to start the ACPI Interpreter
[    0.365061] ACPI Error: Could not remove SCI handler (20170303/evmisc-281)
[    0.368174] kmem_cache_destroy Acpi-Parse: Slab cache still has objects
[    0.369332] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W
4.12.0-rc4-next-20170608+ #8
[    0.371256] Hardware name: innotek gmb_h virtual_box/virtual_box, BIOS
virtual_box 12/01/2006
[    0.372000] Call Trace:
[    0.372000]  ? dump_stack+0x5c/0x81
[    0.372000]  ? kmem_cache_destroy+0x1aa/0x1c0
[    0.372000]  ? acpi_sleep_proc_init+0x27/0x27
[    0.372000]  ? acpi_os_delete_cache+0xa/0x10
[    0.372000]  ? acpi_ut_delete_caches+0x56/0x7b
[    0.372000]  ? acpi_terminate+0xa/0x14
[    0.372000]  ? acpi_init+0x2af/0x34f
[    0.372000]  ? __class_create+0x4c/0x80
[    0.372000]  ? video_setup+0x7f/0x7f
[    0.372000]  ? acpi_sleep_proc_init+0x27/0x27
[    0.372000]  ? do_one_initcall+0x4e/0x1a0
[    0.372000]  ? kernel_init_freeable+0x189/0x20a
[    0.372000]  ? rest_init+0xc0/0xc0
[    0.372000]  ? kernel_init+0xa/0x100
[    0.372000]  ? ret_from_fork+0x25/0x30
[    0.388039] kmem_cache_destroy Acpi-parse_ext: Slab cache still has objects
[    0.389063] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W
4.12.0-rc4-next-20170608+ #8
[    0.390557] Hardware name: innotek gmb_h virtual_box/virtual_box, BIOS
virtual_box 12/01/2006
[    0.392000] Call Trace:
[    0.392000]  ? dump_stack+0x5c/0x81
[    0.392000]  ? kmem_cache_destroy+0x1aa/0x1c0
[    0.392000]  ? acpi_sleep_proc_init+0x27/0x27
[    0.392000]  ? acpi_os_delete_cache+0xa/0x10
[    0.392000]  ? acpi_ut_delete_caches+0x6d/0x7b
[    0.392000]  ? acpi_terminate+0xa/0x14
[    0.392000]  ? acpi_init+0x2af/0x34f
[    0.392000]  ? __class_create+0x4c/0x80
[    0.392000]  ? video_setup+0x7f/0x7f
[    0.392000]  ? acpi_sleep_proc_init+0x27/0x27
[    0.392000]  ? do_one_initcall+0x4e/0x1a0
[    0.392000]  ? kernel_init_freeable+0x189/0x20a
[    0.392000]  ? rest_init+0xc0/0xc0
[    0.392000]  ? kernel_init+0xa/0x100
[    0.392000]  ? ret_from_fork+0x25/0x30

When early abort is occurred due to invalid ACPI information, Linux kernel
terminates ACPI by calling acpi_terminate() function. The function calls
acpi_ut_delete_caches() function to delete local caches (acpi_gbl_namespace_
cache, state_cache, operand_cache, ps_node_cache, ps_node_ext_cache).

But the deletion codes in acpi_ut_delete_caches() function only delete
slab caches using kmem_cache_destroy() function, therefore the cache
objects should be flushed before acpi_ut_delete_caches() function.

"Acpi-Parse" cache and "Acpi-ParseExt" cache are used in an AML parse
function, acpi_ps_parse_loop(). The function should complete all ops
using acpi_ps_complete_final_op() when an error occurs due to invalid
AML codes.
However, the current implementation of acpi_ps_complete_final_op() does not
complete all ops when it meets some errors and this cause cache leak.

This cache leak has a security threat because an old kernel (<= 4.9) shows
memory locations of kernel functions in stack dump. Some malicious users
could use this information to neutralize kernel ASLR.

To fix ACPI cache leak for enhancing security, I made a patch to complete all
ops unconditionally for acpi_ps_complete_final_op() function.

I hope that this patch improves the security of Linux kernel.

Thank you.

Link: https://github.com/acpica/acpica/commit/8829e70e
Signed-off-by: Seunghun Han <kkamagui@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/2363774.ElGaqSPkdT@rjwysocki.net
2025-03-27 13:17:17 +01:00
Seunghun Han 156fd20a41 ACPICA: fix acpi operand cache leak in dswstate.c
ACPICA commit 987a3b5cf7175916e2a4b6ea5b8e70f830dfe732

I found an ACPI cache leak in ACPI early termination and boot continuing case.

When early termination occurs due to malicious ACPI table, Linux kernel
terminates ACPI function and continues to boot process. While kernel terminates
ACPI function, kmem_cache_destroy() reports Acpi-Operand cache leak.

Boot log of ACPI operand cache leak is as follows:
>[    0.585957] ACPI: Added _OSI(Module Device)
>[    0.587218] ACPI: Added _OSI(Processor Device)
>[    0.588530] ACPI: Added _OSI(3.0 _SCP Extensions)
>[    0.589790] ACPI: Added _OSI(Processor Aggregator Device)
>[    0.591534] ACPI Error: Illegal I/O port address/length above 64K: C806E00000004002/0x2 (20170303/hwvalid-155)
>[    0.594351] ACPI Exception: AE_LIMIT, Unable to initialize fixed events (20170303/evevent-88)
>[    0.597858] ACPI: Unable to start the ACPI Interpreter
>[    0.599162] ACPI Error: Could not remove SCI handler (20170303/evmisc-281)
>[    0.601836] kmem_cache_destroy Acpi-Operand: Slab cache still has objects
>[    0.603556] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc5 #26
>[    0.605159] Hardware name: innotek gmb_h virtual_box/virtual_box, BIOS virtual_box 12/01/2006
>[    0.609177] Call Trace:
>[    0.610063]  ? dump_stack+0x5c/0x81
>[    0.611118]  ? kmem_cache_destroy+0x1aa/0x1c0
>[    0.612632]  ? acpi_sleep_proc_init+0x27/0x27
>[    0.613906]  ? acpi_os_delete_cache+0xa/0x10
>[    0.617986]  ? acpi_ut_delete_caches+0x3f/0x7b
>[    0.619293]  ? acpi_terminate+0xa/0x14
>[    0.620394]  ? acpi_init+0x2af/0x34f
>[    0.621616]  ? __class_create+0x4c/0x80
>[    0.623412]  ? video_setup+0x7f/0x7f
>[    0.624585]  ? acpi_sleep_proc_init+0x27/0x27
>[    0.625861]  ? do_one_initcall+0x4e/0x1a0
>[    0.627513]  ? kernel_init_freeable+0x19e/0x21f
>[    0.628972]  ? rest_init+0x80/0x80
>[    0.630043]  ? kernel_init+0xa/0x100
>[    0.631084]  ? ret_from_fork+0x25/0x30
>[    0.633343] vgaarb: loaded
>[    0.635036] EDAC MC: Ver: 3.0.0
>[    0.638601] PCI: Probing PCI hardware
>[    0.639833] PCI host bridge to bus 0000:00
>[    0.641031] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
> ... Continue to boot and log is omitted ...

I analyzed this memory leak in detail and found acpi_ds_obj_stack_pop_and_
delete() function miscalculated the top of the stack. acpi_ds_obj_stack_push()
function uses walk_state->operand_index for start position of the top, but
acpi_ds_obj_stack_pop_and_delete() function considers index 0 for it.
Therefore, this causes acpi operand memory leak.

This cache leak causes a security threat because an old kernel (<= 4.9) shows
memory locations of kernel functions in stack dump. Some malicious users
could use this information to neutralize kernel ASLR.

I made a patch to fix ACPI operand cache leak.

Link: https://github.com/acpica/acpica/commit/987a3b5c
Signed-off-by: Seunghun Han <kkamagui@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/4999480.31r3eYUQgx@rjwysocki.net
2025-03-27 13:17:17 +01:00
Linus Torvalds 38fec10eb6 Linux 6.14 2025-03-24 07:02:41 -07:00
Linus Torvalds 586de92313 i2c-for-6.14-rc8
amd-mp2 driver: fix double free of irq
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmffOuIACgkQFA3kzBSg
 Kbbk8g/+PTkmHGiisPwX5nUDmvmFzRFG/mphHjVUtTDw0Yp2gR4lOyHZlLIaDTNk
 olqferh+LniC6Bl73rn84DJShQ/ATtiPY4MlFvUHrLwN0lLqqJC7LuabKUTjpYC6
 OSaMhM0BOo3A69pKRSD06MWDtDZYk5o8o29uk6IZ9tFNGBEQvZOGoMVaatR//13o
 c/iBQUxO/hP0x/Uk+Ad1JU/2YeiyDmG2EalDZyyX63gTCcB3dMfI4UekLri1vQea
 6Py9g8TIrmWpEgpI6ys6IeOGqERK40HJZ/RZDVnHS7Uv/QQ6QlLC608X47t7+tgW
 ZTCerCjrIHSjDaHSNbvqk29jVc17gLYOZzMSoborZJuypBecVK12k+CDrvyMcVSi
 +Q27+FnWg07SIQzNJK6aH7TrBkzsIav3n/+WT6LUcozUPNE1A884c+Gn1/9uYVLW
 13BOLT44Hvdk76E8Ff9Tc6akct5Agyrl3fQzAX4orLuBg9fxkPAkhqByZsX0rbSy
 9ympypSYlORJux6+gCQRk3hCTtcrHOutnkHTuiQuMExdQhe28z9R+AiVSn0S66mR
 bh5FQOPG2cLWqRCG2z7dUKh3ZoQvorRwNS2DUCZQJIqRYvhKr4zUhjstTZL2DLYJ
 XGrC8rmpNoXeK1wn139kyKAQ90kCHXtsHbF9xibURtZhhNFL0yU=
 =RvqJ
 -----END PGP SIGNATURE-----

Merge tag 'i2c-for-6.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fix from Wolfram Sang:
 "Fix double free of irq in amd-mp2 driver"

* tag 'i2c-for-6.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: amd-mp2: drop free_irq() of devm_request_irq() allocated irq
2025-03-22 17:33:38 -07:00
Linus Torvalds 183601b78a Fix an information leak regression in the AMD IBS PMU code.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmffIn8RHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1hBaQ/+PFBVDEELrGMqALH02RW8ZVHWAspXdale
 jRpAVZAZyt6FiU+opgaZJu3rSozbYhjClNFXmR+qCRznCXJ8fFxQrsniHWFeU38r
 mQ0vxKkBVdac0i5d5D5BS5/d7DY75xtkYO2mVG+Goi5F9lH+szWJhUvXorloL7YG
 2sB0TSWTSfzm4wUK/xPK9yfobgtAlg32hwNyfOCh8QXKnJayXvZnex2lgzX8nuU8
 bqpe+SrxAZPXScHvzyVf/joXZ99K2gin84j9Y6uGXlHPC2dxW5Z+dOMiQ3+NtQPe
 x6sdKij8JCbMR9KyouGyRrL1RrT49EzUmP2mrFPIMtvGW/SLNXbLfOEv2i42Deg6
 +d9k9jwoiCekETQ0cHtkeBFHkTKrh8LjKNqzXY4jeCy3EiJKQXMNvzPmSqpGTRzl
 qcNRXN580vxYINk2J49H43Gx7idPB57OpqQwyxMIbSmIbIPqiXWfImFOIW3ClWve
 frnjLo9bjW58a9f9Q8fz+t7MJvIgPSBmaKBSjA4EF2aPcFrchpTEBwTyYpGGDzmj
 tQENg9ZNF/czPHchm84c4nSdEEbop4tM2IZXPDRTjfhnsB9Ke4GyMzcto3WIjhxW
 N+3SMtLDqRmoEopas5xPZrBGBFktqE+LHRgz30dLIUZkEfWc0veKcLyQ5x7QsKLZ
 tVLqsc0hjHk=
 =0DeL
 -----END PGP SIGNATURE-----

Merge tag 'perf-urgent-2025-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 perf events fix from Ingo Molnar:
 "Fix an information leak regression in the AMD IBS PMU code"

* tag 'perf-urgent-2025-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/amd/ibs: Prevent leaking sensitive data to userspace
2025-03-22 14:40:27 -07:00
Linus Torvalds fcea541800 Hi,
I presume -rc7 is the last rc for v6.14 but here is one critical fix
 for the release. If possible, please include, otherwise will be
 postponed to the merge window...
 
 BR, Jarkkoa
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRE6pSOnaBC00OEHEIaerohdGur0gUCZ96/RgAKCRAaerohdGur
 0vrOAQD356uAoxN1bjXsuT2iTv4QlWyrUkcY2D8l8cSIU28S7AD/SWw+D8tekwDx
 OMGgliGJZkqWpY9l24MqxkOC5/9MNQU=
 =tNUM
 -----END PGP SIGNATURE-----

Merge tag 'keys-next-6.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd

Pull keys fix from Jarkko Sakkinen:
 "Fix potential use-after-free in key_put()"

* tag 'keys-next-6.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
  keys: Fix UAF in key_put()
2025-03-22 14:10:07 -07:00
Linus Torvalds bb18645ac1 io_uring-6.14-20250322
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmfe7xsQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpnDHD/4rKlhIMGsWjBMaO1+ogNMsh9pJGRQdQZWB
 dCcIz1zRZbzY9WE1CQmkAWpM6tEbkUPMw3RrW1wduNO9W1OCQ4wW/wv9gShzi5HU
 O+yOF9s+wd2733n3Ghxr6zTFCyHeaHb5mFVQsct1eOsbdprxysQLQ6QwB4FqOcKa
 vZJyDg9Zxsd9wNblzgd7+QSMnPgsCrBhgC86mayDEsQ2e68CXFkxv8W6zBl28rx1
 auGCIF33Zic0FUWKqc2N2e2xZ0RUZKeKqf09ZpzoEVZ2Zti2IUd1RAZFaRo5SBTm
 ZhU71Eip4OqWruNSHmE8KtEgLscV5rwNZ2IH29Ywif71JTYMqEGE3Jr9O1w6REti
 bNH/ELSXEC/rpscmG904g8UQ3Nv8LcdETq0B3lxl1dnKVVy5jFe3mSvvvWIckJAJ
 t2KZf1HwX4Q0MXdi8HUnN4uswvu4xPYfjTNaEjqaK0H9U7BTY1CBkfTRjtWatPNH
 WCfeDK6Bj0T51ke/kmu3EpP6l19H1iivhC+Wz6bCgJ7mrsSlsm44ibjrsNgHeqSP
 x3jhZTM7RqIdC4UIv+LgHz/IZJ07iMVkpXGTAKBZnW+SrzTsVRfK6/RawqDmxL5T
 h63Z8rly8kTS9GmWaw82wieHqQpzJrYu2BXik6r5L5ON5DwvYeegcnMTczgldQKL
 pxQxiBO7yQ==
 =+zW+
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-6.14-20250322' of git://git.kernel.dk/linux

Pull io_uring fix from Jens Axboe:
 "Just a single fix for the commit that went into your tree yesterday,
  which exposed an issue with not always clearing notifications. That
  could cause them to be used more than once"

* tag 'io_uring-6.14-20250322' of git://git.kernel.dk/linux:
  io_uring/net: fix sendzc double notif flush
2025-03-22 10:45:44 -07:00
Pavel Begunkov 67c007d6c1 io_uring/net: fix sendzc double notif flush
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 5823 at lib/refcount.c:28 refcount_warn_saturate+0x15a/0x1d0 lib/refcount.c:28
RIP: 0010:refcount_warn_saturate+0x15a/0x1d0 lib/refcount.c:28
Call Trace:
 <TASK>
 io_notif_flush io_uring/notif.h:40 [inline]
 io_send_zc_cleanup+0x121/0x170 io_uring/net.c:1222
 io_clean_op+0x58c/0x9a0 io_uring/io_uring.c:406
 io_free_batch_list io_uring/io_uring.c:1429 [inline]
 __io_submit_flush_completions+0xc16/0xd20 io_uring/io_uring.c:1470
 io_submit_flush_completions io_uring/io_uring.h:159 [inline]

Before the blamed commit, sendzc relied on io_req_msg_cleanup() to clear
REQ_F_NEED_CLEANUP, so after the following snippet the request will
never hit the core io_uring cleanup path.

io_notif_flush();
io_req_msg_cleanup();

The easiest fix is to null the notification. io_send_zc_cleanup() can
still be called after, but it's tolerated.

Reported-by: syzbot+cf285a028ffba71b2ef5@syzkaller.appspotmail.com
Tested-by: syzbot+cf285a028ffba71b2ef5@syzkaller.appspotmail.com
Fixes: cc34d8330e ("io_uring/net: don't clear REQ_F_NEED_CLEANUP unconditionally")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/e1306007458b8891c88c4f20c966a17595f766b0.1742643795.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-03-22 08:14:36 -06:00
David Howells 75845c6c1a keys: Fix UAF in key_put()
Once a key's reference count has been reduced to 0, the garbage collector
thread may destroy it at any time and so key_put() is not allowed to touch
the key after that point.  The most key_put() is normally allowed to do is
to touch key_gc_work as that's a static global variable.

However, in an effort to speed up the reclamation of quota, this is now
done in key_put() once the key's usage is reduced to 0 - but now the code
is looking at the key after the deadline, which is forbidden.

Fix this by using a flag to indicate that a key can be gc'd now rather than
looking at the key's refcount in the garbage collector.

Fixes: 9578e327b2 ("keys: update key quotas in key_put()")
Reported-by: syzbot+6105ffc1ded71d194d6d@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/673b6aec.050a0220.87769.004a.GAE@google.com/
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: syzbot+6105ffc1ded71d194d6d@syzkaller.appspotmail.com
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
2025-03-22 15:36:49 +02:00
Namhyung Kim 50a53b60e1 perf/amd/ibs: Prevent leaking sensitive data to userspace
Although IBS "swfilt" can prevent leaking samples with kernel RIP to the
userspace, there are few subtle cases where a 'data' address and/or a
'branch target' address can fall under kernel address range although RIP
is from userspace. Prevent leaking kernel 'data' addresses by discarding
such samples when {exclude_kernel=1,swfilt=1}.

IBS can now be invoked by unprivileged user with the introduction of
"swfilt". However, this creates a loophole in the interface where an
unprivileged user can get physical address of the userspace virtual
addresses through IBS register raw dump (PERF_SAMPLE_RAW). Prevent this
as well.

This upstream commit fixed the most obvious leak:

  65a99264f5 perf/x86: Check data address for IBS software filter

Follow that up with a more complete fix.

Fixes: d29e744c71 ("perf/x86: Relax privilege filter restriction on AMD IBS")
Suggested-by: Matteo Rizzo <matteorizzo@google.com>
Co-developed-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250321161251.1033-1-ravi.bangoria@amd.com
2025-03-22 08:18:24 +01:00
Linus Torvalds 88d324e69e spi: Fix for v6.14
This is a straightforward fix for a reference count leak in the rarely
 used SPI device mode functionality.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmfdbbYACgkQJNaLcl1U
 h9ChVAf/TrLZ/1nL5Qiao1Pf8g462kLUa0UbP4iSBtAmxmF9iERkD8pkD6+STtCT
 UCA5zCPKX3q8YVdlnRHEXS1dQeJZIkKgxmaeNwdK+gUS+CFulFwpIgtcymT/HI8P
 xDZ027q8Fm3AC0tMtkaqCMQF5uhUnpuTxtWjh8OhNldVzVRB/XTGsa2CpfUdpxUi
 FN3vdwnVzPicIkYkbrUqNkak3EXbNekf3tzc7cq7kicSZsnTYa1rZr3gDbdoyO5c
 vI9cAcXQlkz3WZaUc0mNr5iuCISOHfji57vgOb/7qrXQz6Jx5qipZ0UvUnTCoGzb
 SLq2UrsTupLyXs8GX2YNWGDOml5rNA==
 =lSkK
 -----END PGP SIGNATURE-----

Merge tag 'spi-fix-v6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fix from Mark Brown:
 "This is a straightforward fix for a reference count leak in the rarely
  used SPI device mode functionality"

* tag 'spi-fix-v6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: Fix reference count leak in slave_show()
2025-03-21 14:07:40 -07:00
Linus Torvalds 21d1ccf0e9 regulator: Fixes for v6.14
More fixes than I'd like at this point, some of which is due to me
 cooking things in -next for a bit and resetting that cooking time as
 more fixes came in.
 
  - Christian Eggers fixed some race conditions with the dummy regulator
    not being available very early in boot due to the use of asynchronous
    probing, both the provider side (ensuring that it's availalbe) and
    consumer side (handling things if that goes wrong) are fixed.
  - Ludvig Pärsson fixed some lockdep issues with the debugfs
    registration for regulators holding more locks than it really needs
    causing issues later when looking at the resulting debugfs.boot
  - Some device specific fixes for incorrect descriptions of the RTQ2208
    from ChiYuan Huang.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmfdbWUACgkQJNaLcl1U
 h9BGtAf/bJMDHt7Lkz3F2fXMdGtToMpE1D8DS9p7GhefgCRToMCQMv7n/HcX3M5H
 IcFJZrotiNKvkJr8diG6JazhUJ4SNjFlFJEU+Zwyj9Lhy8biEytfeTQIVY2Fl9hp
 ZJgWeVRR44fE/MEVjrv8IMDCq5xCt9q2QeoAKhUuM3gm6IF+CyD8Fw8KPp5h+08u
 0UvwNPraHnFlFT8mwb59NKdrUf78FNz04LhaMmLMspaZC39q5ON20EG0+h60lwcC
 lxRgtVkOO8CWCVVucOjBfi4mmqvbvHvzwzo4hfmxTpO3cBDvxEDyxsj0l07FfLPq
 pjhJV7uqMDeO+v8sgiAcIyiUL+scxg==
 =5s9o
 -----END PGP SIGNATURE-----

Merge tag 'regulator-fix-v6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "More fixes than I'd like at this point, some of which is due to me
  cooking things in -next for a bit and resetting that cooking time as
  more fixes came in.

   - Christian Eggers fixed some race conditions with the dummy
     regulator not being available very early in boot due to the use of
     asynchronous probing, both the provider side (ensuring that it's
     availalbe) and consumer side (handling things if that goes wrong)
     are fixed

   - Ludvig Pärsson fixed some lockdep issues with the debugfs
     registration for regulators holding more locks than it really needs
     causing issues later when looking at the resulting debugfs.boot

   - Some device specific fixes for incorrect descriptions of the
     RTQ2208 from ChiYuan Huang"

* tag 'regulator-fix-v6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: rtq2208: Fix the LDO DVS capability
  regulator: rtq2208: Fix incorrect buck converter phase mapping
  regulator: check that dummy regulator has been probed before using it
  regulator: dummy: force synchronous probing
  regulator: core: Fix deadlock in create_regulator()
2025-03-21 13:42:55 -07:00
Linus Torvalds 3e49db00df Pin control late fixes:
- A single patch for Spacemit K1 fixing up the Kconfig to not
   default to "y".
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAmfdR5wACgkQQRCzN7AZ
 XXMoFA//eCv+WVrrT5689yeOJVEXgOKToZ2DzUdu5VKBmSOq2qeC4k4Vl0VeTi80
 Zm/WM3cc2orVOmjb+MIUezDjdGL2AvQlBVUOXuEcc8G7sNnqtTDCzb3Zo5LlMuMf
 D/yCZCYnTh1bW0eORXUc3iJZumrS5UIjGKtTB4v3cxJj7zyxPH65U3a95HpSJM4m
 uoPO7nDOmc4/J5bR62QhatNOE1IbSOYFf3DM2oiqUQqWFkzI5UlV3+u42EZm6ywt
 3jxOVnQcz3VW9m4YmQ6ppyCZ0M6Z9qkRASTbMLH+sgu1GgClXfjT4Y5IFCjFIsz/
 Gn3bVdEatv1P8KR3vaU2tV9cMcyfU7E24nmZDE4cKR0Y3DdtSC17Sc+WuN62uyi4
 FmQArCc4uw4nkW0vUz5du575poAtdNrELpbMGa7tv4Q0uLrkVvZ6E7RHcepKYapV
 iod1PgrMlay4J7UI9F6dPOhCfxXUoPhSoJDDiS7nYXNWE/gpTXEnL5PvW4pC9pqO
 7/2sKQ9WAXvZTpIi04cppYXe0TOnBFL9yXU8hZwlvxkMGfJTB25eqhCRJXZjjNxB
 Z2e2mrUEqLMcjrXlQGzynbORof7Phhdn/Wpae4yQ2UyjkwCL6LSJkaK7Ml1BJGZA
 MS+aY5bJ5c8Lt/YCwQOZPmUwhSQrXbYdRl9+He1x2D/x05YOR/k=
 =gNlC
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-v6.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control fix from Linus Walleij:

 - A single patch for Spacemit K1 fixing up the Kconfig to not default
   to "y"

* tag 'pinctrl-v6.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: spacemit: PINCTRL_SPACEMIT_K1 should not default to y unconditionally
2025-03-21 13:02:28 -07:00
Linus Torvalds d07de43e3f io_uring-6.14-20250321
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmfdXP0QHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpsB1EACD4LL93u/GUfCDI3gHMYdGv1Yy79j+qcB9
 +ikQYy+pM9iPHvFjXDZ8ZNzveaUic5OAXvrIQcfexcpbbJS3LxkmppBWZ7/gQxhA
 +nNXXcxYvhmzstnGTjsSlkUOosqUKWyo1M3JsFhZHL3H+Te+FGiSg82wwDdbNS69
 eezOzha4njxpkeIgcWI4Qzryg5//bYZKZBdf078m+y/Qa4xL9276VY3Y8bg+R51l
 wVYuDv5EjJT/zItXYr0uU+NRNFraMP1B23Ew+6EkdV/t4pzaH45H6+WfHv4tV5hS
 JbGZbvt/Zbvv9citAWsxqUkrGLDuveugKBEH/dKvffBW/tk0RmoiQrs3ZpO+g0/+
 Kdlfv/ggALWYC+QYUVyTzmb/xGk5YipSzN06M6t1+ELbedpaZyFWj5vhNSEsqc8l
 4edOoyA4ZPafGaipTNfsE4kSNk7UL1AiWqPxJWq3O9WYkVj2Zt9sD3dbhuddIIwm
 bEAbOvOEZXSQh8EBp0x2epkKc5y8ma75OdZui3cOlQEAKq+JMkPSYxPJLqkgAmrr
 SAFUoRYtM6ShKX6AGdwzk6w4htp1L3G8tlGssM4eqC2e9wQJ9B3nCep1Xvs48rjW
 MjpZfxfFRrfV14WHGun+63F9lbdGW4GJqnMbzpvdTrTmGfdOE88frCdcw0EEHRxB
 EmAoCbJ+aw==
 =TEDX
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-6.14-20250321' of git://git.kernel.dk/linux

Pull io_uring fix from Jens Axboe:
 "Single fix heading to stable, fixing an issue with io_req_msg_cleanup()
  sometimes too eagerly clearing cleanup flags"

* tag 'io_uring-6.14-20250321' of git://git.kernel.dk/linux:
  io_uring/net: don't clear REQ_F_NEED_CLEANUP unconditionally
2025-03-21 10:30:15 -07:00
Linus Torvalds 5c7474b544 Two fixes: an RAPL PMU driver error handling fix, and an AMD IBS software
filter fix.
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmfdQbURHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1g+pw/+L+UYQM4jDh0lv4IA4Piy366l2y4zpveU
 Peb5lxPY7fbC0zkdGnIdjE2b4ifDkduPyPNL6EO9PI4+4BbOuCy5p3VHOK6ksmN7
 umo5GqcPel6wn1CJZOqQASfzWohkfmhfccjJYYdt2dFltviKlbd7FwsHKsJj3b2g
 nmzI2tKGyGKk8OaxwBY+z7Z4lY8c2tRAVBCfN9oCw/VEDC7aOb+pmE0y9d0pFiPd
 VgPTDh45oz/eelUO8mUF7yCDLe/xM7C/SQ/bGIz+XX7ajy2I3fZzUU+fSQEGRDmW
 jT2tEmA27iy75H7eI6k3WQbjiXrwRHLxzqWZUZQHOqTrxvjwPyziNwyXiqJfZ++u
 d/0dTH/hfl2AsVrnmB5AjCO7ARPMzc2Lu4zRa8lbsUMywftFx+yEOIDSE9qOT0rO
 Bg5OR4daE807hZvWAa4JZt6N/VA9CEtdJSjN1vlGej6fAiy5bal8sv/xQIIgkeNg
 7iaY9Vj6Gkz//VOzCbSOrSbsNYTSamkgfxt9p3ZkaAjnvckQDzOmx4F3WHO5Dhgu
 UwnUlcsxrSoE7W6T4V6bGNY1E+rTNoZjQvA4dLrhqyWr9OndeGYg7VdOuzUmi6Aw
 3I570jA0TrJrMaIcw88Bp8IUDDPc67Q4U6jJy8NQ7DpBItNV6BaDgnoy6qOC/Tzk
 nutfK1YBsag=
 =7Slp
 -----END PGP SIGNATURE-----

Merge tag 'perf-urgent-2025-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 perf events fixes from Ingo Molnar:
 "Two fixes: an RAPL PMU driver error handling fix, and an AMD IBS
  software filter fix"

* tag 'perf-urgent-2025-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/rapl: Fix error handling in init_rapl_pmus()
  perf/x86: Check data address for IBS software filter
2025-03-21 08:52:31 -07:00
Linus Torvalds cb90c8df91 Revert a scheduler performance optimization that regressed other workloads.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmfdP/YRHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1hiUBAAiWqjSF3RQ+Sc3/2sRV/pv3dWvMC790+k
 VYQm7RPvYtXyfS9G+p9GnjRuRmsKRyte7Ctui0/z+J0K82kXr5WZlnR6xtkuNQtr
 2BWpR5vFLC0jXxRy1Z8xgSQV914WNqWdnwo2AHwGI4lS2bBij6WA27YEfPTttmDf
 tjNfKX3fXeF6TPbsPqxtTDWY/7qVv4hlxgE890m56eXhYZQPSGck+D2oRfvAbd9e
 LcqTXDxs8AeQsCYPMa/mzKPj4QVI8YIqCChszp9/wpmZup20XksRJdpYOjBCZi8a
 a9DzP+D5XYCj/dl1QXXudyIs/CGkf1+muv93NQRQ2+ZdYX6XZgkpkSm6xEKg1icp
 XzOXxVAqA3v5z8+QYAUb3B7DSnZrCMxSp0jhc4B/vORIDoLVF6vpvnhzn39ZhvB/
 fzrc15H2ddIJ52Ng+9bbbCxFy7+DZvUC05QYgQ5OPhM3jiD8ysTHY1B/I46aINwU
 q2ephtqZU6hVm/0C+anVO6MAxHUed7bJRpf9tc1GaTetjmBzH7Wc93sfloFrfdZK
 5v+JJSCa95GF7fyiZkcK85iO6oaJ3vIjEYewk+hC/2LHfXqkY0Jy3g/SXG48ILOW
 r4xwIN4yJ7wPYfPGG3N1wjKCX7OAopHJY8hinFrjxvFUT3GBTea8/bpqoaE12FSo
 m7d3Ei9GlNE=
 =683W
 -----END PGP SIGNATURE-----

Merge tag 'sched-urgent-2025-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fix from Ingo Molnar:
 "Revert a scheduler performance optimization that regressed other
  workloads"

* tag 'sched-urgent-2025-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  Revert "sched/core: Reduce cost of sched_move_task when config autogroup"
2025-03-21 08:48:40 -07:00
Wolfram Sang 807d47a6dc i2c-host-fixes for v6.14-rc8
amd-mp2: fix double free of irq.
 -----BEGIN PGP SIGNATURE-----
 
 iIwEABYIADQWIQScDfrjQa34uOld1VLaeAVmJtMtbgUCZ90gNRYcYW5kaS5zaHl0
 aUBrZXJuZWwub3JnAAoJENp4BWYm0y1ujLQA/0w5+LLmSHrCfusmecDj0OFV/tWQ
 v2upMrX710N6SkzZAQDvrI+4W9moQqYYAR6EyQiD14FigCfW7StBYcKNgsnPAA==
 =6boQ
 -----END PGP SIGNATURE-----

Merge tag 'i2c-host-fixes-6.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current

i2c-host-fixes for v6.14-rc8

amd-mp2: fix double free of irq.
2025-03-21 16:18:59 +01:00
Linus Torvalds b3ee1e4609 drm fixes for 6.14-rc8
scheduler:
 - fix fence reference leak
 
 xe:
 - Fix for an error if exporting a dma-buf multiple time
 
 amdgpu:
 - Fix video caps limits on several asics
 - SMU 14.x fixes
 - GC 12 fixes
 - eDP fixes
 - DMUB fix
 
 amdkfd:
 - GC 12 trap handler fix
 - GC 7/8 queue validation fix
 
 radeon:
 - VCE IB parsing fix
 
 v3d:
 - fix job error handling bugs
 
 qaic:
 - fix two integer overflows
 
 host1x:
 - fix NULL domain handling
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmfc6CsACgkQDHTzWXnE
 hr5eUw/+KX/HumHOTmEbQlZAHO25zNEX11H310I0frbgCoT+adsuMoQrLd35+Kg4
 SP4BduY//L98QBxCcXN29afzssVWuZFFcAmc8WobEDNbVNE/2zhKOTWy6L/kyeOb
 UQDcdRFyij4jEet4qkbRrer5Cvq3Da7eHpqqdh4Wu69Zgnog95uKVKBmtl5JxsE6
 zTTvm2il0Q3SjIoF+pFW97XfhOBUuuLFpoB1zdPfhqgnusYqLAod7MQx40GClXII
 VR2ci9t98lUZzVlrHxuC6/7R4q8w9d8HkwmFiYArYW9P80yVxHnkL6FhBVbK+Ah0
 i2WD4YUIzh/CVFiYa174YSHTGysE4pSMI2dj7MItfPI2p+WI2lTS1Xz8Essvf7Q8
 p9lBxluHHiZxlZfIAnZb7Dac4eaMEyeGhJzuEb2GxGfDLfgqzK+jRT7OBm1WpVST
 Vw/UFj20vYDz/bCFBtO8x7FrON6CCYFIYMP152f6hGmypghNMvMmIH3XTdaWzuiX
 fHUfICeksaz9FX19ObeQfQ949vdDZ5QytEfndhmHGjyNp2MyaN6d5GbahDsXp7V3
 6YX+YJ87H4Hd8vfUJx6k6RBspyWa8D68RYMHGo/8nAd5+byJ7sbBALatU6krKjdY
 BL/tDhaX0L0GynDijvtamg+KVmpwL4Eu1u5LXMgaUw16FE0qyCY=
 =f9rA
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2025-03-21' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Just the usual spread of a bunch for amdgpu, and small changes to
  others.

  scheduler:
   - fix fence reference leak

  xe:
   - Fix for an error if exporting a dma-buf multiple time

  amdgpu:
   - Fix video caps limits on several asics
   - SMU 14.x fixes
   - GC 12 fixes
   - eDP fixes
   - DMUB fix

  amdkfd:
   - GC 12 trap handler fix
   - GC 7/8 queue validation fix

  radeon:
   - VCE IB parsing fix

  v3d:
   - fix job error handling bugs

  qaic:
   - fix two integer overflows

  host1x:
   - fix NULL domain handling"

* tag 'drm-fixes-2025-03-21' of https://gitlab.freedesktop.org/drm/kernel: (21 commits)
  drm/xe: Fix exporting xe buffers multiple times
  gpu: host1x: Do not assume that a NULL domain means no DMA IOMMU
  drm/amdgpu/pm: Handle SCLK offset correctly in overdrive for smu 14.0.2
  drm/amd/display: Fix incorrect fw_state address in dmub_srv
  drm/amd/display: Use HW lock mgr for PSR1 when only one eDP
  drm/amd/display: Fix message for support_edp0_on_dp1
  drm/amdkfd: Fix user queue validation on Gfx7/8
  drm/amdgpu: Restore uncached behaviour on GFX12
  drm/amdgpu/gfx12: correct cleanup of 'me' field with gfx_v12_0_me_fini()
  drm/amdkfd: Fix instruction hazard in gfx12 trap handler
  drm/amdgpu/pm: wire up hwmon fan speed for smu 14.0.2
  drm/amd/pm: add unique_id for gfx12
  drm/amdgpu: Remove JPEG from vega and carrizo video caps
  drm/amdgpu: Fix JPEG video caps max size for navi1x and raven
  drm/amdgpu: Fix MPEG2, MPEG4 and VC1 video caps max size
  drm/radeon: fix uninitialized size issue in radeon_vce_cs_parse()
  accel/qaic: Fix integer overflow in qaic_validate_req()
  accel/qaic: Fix possible data corruption in BOs > 2G
  drm/v3d: Set job pointer to NULL when the job's fence has an error
  drm/v3d: Don't run jobs that have errors flagged in its fence
  ...
2025-03-20 21:29:58 -07:00
Linus Torvalds a7ea35b61e smb3 client reconnect fix
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmfc32sACgkQiiy9cAdy
 T1EIMQv8DoQ6hkJbyj6ehTPZqDLxwrTWvBGapRHKYfb9Er84XxVcJBEFp+Bumz50
 nyX0uFkoHFfVQYDnMCcjMxgp/w/a5GWY7nRZkxjdUjm7+Bv9Z9loPGJjvx5/ZWgS
 6WxoBKZTXFscrfFHH4FTZ/bE7hGaszHE0w3PT61RBSKhnGHNGExrfnk1bIc1Z8zu
 t/ut3Xmzdp+h16XsfrJYWYiFMAlkgRnZgfSxeCre29U8NRmun7Wcn3u5ux1GE70F
 Fzj0FP1sM3QzYHGIyt7ZaPCKSwI/REgJzuJtLqFZMdgmV06x4rjFiNsAquZ9oHS8
 W2FF5vJGxW40CxXgkw6kPKkg3/HDh/cHtICe0Syarj6OzwqxrkLAAaNHvY4T679d
 hvlcoUfPrySRKflDQwP6mBQlcUfX0AXek7CDU0Sih6LOHvQx/E5+jIpZmLS51hpt
 9dwpVu1jPc+pnvMg7sYpbEyEE8oB796gSfOujcaTZIw+9rV1HoKX00PySNWqHAQl
 CZjfY+Th
 =B+Wi
 -----END PGP SIGNATURE-----

Merge tag 'v6.14-rc7-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fix from Steve French:
 "smb3 client reconnect fix"

* tag 'v6.14-rc7-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6:
  smb: client: don't retry IO on failed negprotos with soft mounts
2025-03-20 20:50:45 -07:00
Dave Airlie 41e09ef6c2 amd-drm-fixes-6.14-2025-03-20:
amdgpu:
 - Fix video caps limits on several asics
 - SMU 14.x fixes
 - GC 12 fixes
 - eDP fixes
 - DMUB fix
 
 amdkfd:
 - GC 12 trap handler fix
 - GC 7/8 queue validation fix
 
 radeon:
 - VCE IB parsing fix
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCZ9yC0gAKCRC93/aFa7yZ
 2LjoAQCOJoHO9/d2CT4ptv3/GkuLNaYwD8bjD4x/tBKjkSYHIwEAg+6FcgWW0+qw
 +09vWf/+AVfe+BrXiTu3iCYRN/LkNgY=
 =2SNk
 -----END PGP SIGNATURE-----

Merge tag 'amd-drm-fixes-6.14-2025-03-20' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes

amd-drm-fixes-6.14-2025-03-20:

amdgpu:
- Fix video caps limits on several asics
- SMU 14.x fixes
- GC 12 fixes
- eDP fixes
- DMUB fix

amdkfd:
- GC 12 trap handler fix
- GC 7/8 queue validation fix

radeon:
- VCE IB parsing fix

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

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250320210800.1358992-1-alexander.deucher@amd.com
2025-03-21 11:59:49 +10:00
Dave Airlie 5854df5017 Driver Changes:
- Fix for an error if exporting a dma-buf multiple time (Tomasz)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRskUM7w1oG5rx2IZO4FpNVCsYGvwUCZ9xaEwAKCRC4FpNVCsYG
 v3RSAPwJ+VXUOVzqxRPyobF0dlrQu+/Nb7O5wcDnVCyeaQ+6MwD/dkXH5viXN/g3
 w4DMYRE3meRkHpmvp3Vv3ibZ9uV/FgM=
 =N/m8
 -----END PGP SIGNATURE-----

Merge tag 'drm-xe-fixes-2025-03-20' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes

Driver Changes:
- Fix for an error if exporting a dma-buf multiple time (Tomasz)

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

From: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/Z9xalLaCWsNbh0P0@fedora
2025-03-21 11:31:40 +10:00
Dave Airlie d2738724e4 A sched fence reference leak fix, two fence fixes for v3d, two overflow
fixes for quaic, and a iommu handling fix for host1x.
 -----BEGIN PGP SIGNATURE-----
 
 iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCZ9vQmQAKCRAnX84Zoj2+
 dko4AYCgVyPAFmpEhmX7gmFC7fGwNM0uephsy2+0uy1GnmLfc+uT+0cJw6iROg9a
 JOq+5YwBegJ9hwV6Dc/iDk1xTYDeYdw3ctZ7PSAPkBP9uMtN5+X3trTg2Qh9sM1J
 f004QiANIw==
 =eG/z
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2025-03-20' of ssh://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes

A sched fence reference leak fix, two fence fixes for v3d, two overflow
fixes for quaic, and a iommu handling fix for host1x.

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

From: Maxime Ripard <mripard@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250320-valiant-outstanding-nightingale-e9acae@houat
2025-03-21 10:41:51 +10:00
Linus Torvalds a1cffe8cc8 dma-mapping fix for Linux 6.14
- fix missing clear bdr in check_ram_in_range_map()
   (Baochen Qiang)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSrngzkoBtlA8uaaJ+Jp1EFxbsSRAUCZ9yfLwAKCRCJp1EFxbsS
 RKzsAP4pXY+v1mNFzFshg6hXz9l+hnQF+ACc2L+ek1NYX7YseAD/dzZN1/5ZXBLf
 5Q7bw3IeiPqcusqOBSbBOLHKTlWLCg4=
 =LX6X
 -----END PGP SIGNATURE-----

Merge tag 'dma-mapping-6.14-2025-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux

Pull dma-mapping fix from Marek Szyprowski:

 - fix missing clear bdr in check_ram_in_range_map() (Baochen Qiang)

* tag 'dma-mapping-6.14-2025-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux:
  dma-mapping: fix missing clear bdr in check_ram_in_range_map()
2025-03-20 16:55:24 -07:00
Linus Torvalds b5329d5a35 vfs-6.14-final.fixes
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCZ9wn4gAKCRCRxhvAZXjc
 orAvAP0dxo4NFzAKFld85Xe4DIuU1Bcrv1dY1ydoB26gp/1njwEApgs0nsNlnKfs
 +QIKzEZJLtdZd9vKAgJ0EqvBS2QG9AE=
 =VtwV
 -----END PGP SIGNATURE-----

Merge tag 'vfs-6.14-final.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:
 "A final set of fixes for this cycle:

  VFS:

   - Ensure that the stable offset api doesn't return duplicate
     directory entries when userspace has to perform the getdents call
     multiple times on large directories

  afs:

   - Prevent invalid pointer dereference during get_link RCU pathwalk

  fuse:

   - Fix deadlock caused by uninitialized rings when using io_uring with
     fuse

   - Handle race condition when using io_uring with fuse to prevent NULL
     dereference

  libnetfs:

   - Ensure that invalidate_cache is only called if implemented

   - Fix collection of results during pause when collection is
     offloaded

   - Ensure rolling_buffer_load_from_ra() doesn't clear mark bits

   - Make netfs_unbuffered_read() return ssize_t rather than int"

* tag 'vfs-6.14-final.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  libfs: Fix duplicate directory entry in offset_dir_lookup
  fuse: fix possible deadlock if rings are never initialized
  netfs: Fix netfs_unbuffered_read() to return ssize_t rather than int
  netfs: Fix rolling_buffer_load_from_ra() to not clear mark bits
  netfs: Call `invalidate_cache` only if implemented
  netfs: Fix collection of results during pause when collection offloaded
  fuse: fix uring race condition for null dereference of fc
  afs: Fix afs_atcell_get_link() to check if ws_cell is unset first
2025-03-20 14:13:50 -07:00
Dhananjay Ugwekar 7e512f5ad2 perf/x86/rapl: Fix error handling in init_rapl_pmus()
If init_rapl_pmu() fails while allocating memory for "rapl_pmu" objects,
we miss freeing the "rapl_pmus" object in the error path. Fix that.

Fixes: 9b99d65c0b ("perf/x86/rapl: Move the pmu allocation out of CPU hotplug")
Signed-off-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250320100617.4480-1-dhananjay.ugwekar@amd.com
2025-03-20 21:03:55 +01:00
Linus Torvalds f45f8f0ed4 A lone fix for a s390 regression. An earlier 6.14 commit stopped
taking the pte lock for pages that are being converted to secure,
 but it was needed to avoid races.
 
 The patch was in development for a while and is finally ready, but
 I wish it was split into 3-4 commits at least.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmfcWLgUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroPGgQf+IqKHcgePKxxm060K2GWE/4YRj1qJ
 j9JxYvS0bg7/0xyR2iCA1mSDQrFjsKIzbMeGJlXkJ+rlRdUkSZ7hCAyWnEEjZpBI
 ua2jR5IM7t+YdS3gQFZicc+jxLxD+tfTEfY7ouFGcKOeY07SyVNjBZi9yHLoE+mB
 sENVP5BvVA3b65akkJ+whnHf7J5r0GtXePm2ov+WE06rYP2L4zD+vK3fWfbd4lLG
 LeaQZ7UHA0sb2rLw/jdEIwLTHB9Eb8OmdnGG6ISnNOzJv6yKhbIxrkz7TmzO5CQl
 tuK2+KQblrqbFoblNesjRA6ib7Gb8ghEyiQxTPIiF8AnIEQe7Hfu7VcLBg==
 =flLN
 -----END PGP SIGNATURE-----

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

Pull kvm fix from Paolo Bonzini:
 "A lone fix for a s390 regression. An earlier 6.14 commit stopped
  taking the pte lock for pages that are being converted to secure, but
  it was needed to avoid races.

  The patch was in development for a while and is finally ready, but I
  wish it was split into 3-4 commits at least"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: s390: pv: fix race when making a page secure
2025-03-20 11:34:30 -07:00
Jens Axboe cc34d8330e io_uring/net: don't clear REQ_F_NEED_CLEANUP unconditionally
io_req_msg_cleanup() relies on the fact that io_netmsg_recycle() will
always fully recycle, but that may not be the case if the msg cache
was already full. To ensure that normal cleanup always gets run,
let io_netmsg_recycle() deal with clearing the relevant cleanup flags,
as it knows exactly when that should be done.

Cc: stable@vger.kernel.org
Reported-by: David Wei <dw@davidwei.uk>
Fixes: 7519134178 ("io_uring/net: add iovec recycling")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-03-20 12:27:27 -06:00
Tomasz Rusinowicz 50af7cab75 drm/xe: Fix exporting xe buffers multiple times
The `struct ttm_resource->placement` contains TTM_PL_FLAG_* flags, but
it was incorrectly tested for XE_PL_* flags.
This caused xe_dma_buf_pin() to always fail when invoked for
the second time. Fix this by checking the `mem_type` field instead.

Fixes: 7764222d54 ("drm/xe: Disallow pinning dma-bufs in VRAM")
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: intel-xe@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v6.8+
Signed-off-by: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250218100353.2137964-1-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
(cherry picked from commit b96dabdba9)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
2025-03-20 17:59:49 +01:00
Linus Torvalds 5fc3193608 Including fixes from can, bluetooth and ipsec.
This contains a last minute revert of a recent GRE patch, mostly
 to allow me stating there are no known regressions outstanding.
 
 Current release - regressions:
 
   - revert "gre: Fix IPv6 link-local address generation."
 
   - eth: ti: am65-cpsw: fix NAPI registration sequence
 
 Previous releases - regressions:
 
   - ipv6: fix memleak of nhc_pcpu_rth_output in fib_check_nh_v6_gw().
 
   - mptcp: fix data stream corruption in the address announcement
 
   - bluetooth: fix connection regression between LE and non-LE adapters
 
   - can:
     - flexcan: only change CAN state when link up in system PM
     - ucan: fix out of bound read in strscpy() source
 
 Previous releases - always broken:
 
   - lwtunnel: fix reentry loops
 
   - ipv6: fix TCP GSO segmentation with NAT
 
   - xfrm: force software GSO only in tunnel mode
 
   - eth: ti: icssg-prueth: add lock to stats
 
 Misc:
 
   - add Andrea Mayer as a maintainer of SRv6
 
 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEg1AjqC77wbdLX2LbKSR5jcyPE6QFAmfcOhESHHBhYmVuaUBy
 ZWRoYXQuY29tAAoJECkkeY3MjxOkJUQP/2jpOcA+ogkCfRhcJHHaeX9gCX+buSY4
 RZnMUkSUhW5dcL9mTybx3tzH/0oNlGfLtA016SR+Grq0mIBIYsRWhTW6C8mOgvsZ
 PrHvE9VyATBSxUM9o9bL5WMg/M9TvX7foR63+zGPN2lEk6mmLK/hIBFNjkv9R8Vk
 /VR0ZRKHMsJARsyRve1Sf8DZXndAfROnWhCCmWWxKpnCd4biBL/6n6p00vfxpAls
 /Xnm1PC0NMuRz0hlIr8UN9DkkF1v+LEhp1EFbg5e7i8cJkAJyXcvZBb4rJ8f2Ty7
 4qXK53i+kp+NryNAZ6cNu6OtkD+DtdDUNJ28ElkdnKOc8H787YGFvCTBDPiqe5yu
 CVA6tT1hsuKjEnXdX3545+tTW48XS+6J60ZeVnslfC3fakG03ckOZboofT+LQV1y
 wcv4+73dDrIbSo3X7DBdksFzQi/ICb1VG/GOdGlg8vlokKnH0di/veoBtbyAR7dJ
 2Fv3rpE6e/JQQmXYffto0qrNXOYrEx7Zqmo2QbDS6dTkQ1FiDsxRYegRmVxHLHX9
 0fd48FNFIqEJSM5RwLOQW9X83aObT5p2OiHiA+WrnmkiSiMwK4EdusBm4WtFZ7qc
 bqaUHbnAmg1g7UiPn7cGE3navoasH8xmkS77ZsbyW618ej/hRFGDwWMQSuEMyeLz
 PKrT/OMXIHu9
 =aYLc
 -----END PGP SIGNATURE-----

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

Pull networking fixes from Paolo Abeni:
 "Including fixes from can, bluetooth and ipsec.

  This contains a last minute revert of a recent GRE patch, mostly to
  allow me stating there are no known regressions outstanding.

  Current release - regressions:

   - revert "gre: Fix IPv6 link-local address generation."

   - eth: ti: am65-cpsw: fix NAPI registration sequence

  Previous releases - regressions:

   - ipv6: fix memleak of nhc_pcpu_rth_output in fib_check_nh_v6_gw().

   - mptcp: fix data stream corruption in the address announcement

   - bluetooth: fix connection regression between LE and non-LE adapters

   - can:
       - flexcan: only change CAN state when link up in system PM
       - ucan: fix out of bound read in strscpy() source

  Previous releases - always broken:

   - lwtunnel: fix reentry loops

   - ipv6: fix TCP GSO segmentation with NAT

   - xfrm: force software GSO only in tunnel mode

   - eth: ti: icssg-prueth: add lock to stats

  Misc:

   - add Andrea Mayer as a maintainer of SRv6"

* tag 'net-6.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (33 commits)
  MAINTAINERS: Add Andrea Mayer as a maintainer of SRv6
  Revert "gre: Fix IPv6 link-local address generation."
  Revert "selftests: Add IPv6 link-local address generation tests for GRE devices."
  net/neighbor: add missing policy for NDTPA_QUEUE_LENBYTES
  tools headers: Sync uapi/asm-generic/socket.h with the kernel sources
  mptcp: Fix data stream corruption in the address announcement
  selftests: net: test for lwtunnel dst ref loops
  net: ipv6: ioam6: fix lwtunnel_output() loop
  net: lwtunnel: fix recursion loops
  net: ti: icssg-prueth: Add lock to stats
  net: atm: fix use after free in lec_send()
  xsk: fix an integer overflow in xp_create_and_assign_umem()
  net: stmmac: dwc-qos-eth: use devm_kzalloc() for AXI data
  selftests: drv-net: use defer in the ping test
  phy: fix xa_alloc_cyclic() error handling
  dpll: fix xa_alloc_cyclic() error handling
  devlink: fix xa_alloc_cyclic() error handling
  ipv6: Set errno after ip_fib_metrics_init() in ip6_route_info_create().
  ipv6: Fix memleak of nhc_pcpu_rth_output in fib_check_nh_v6_gw().
  net: ipv6: fix TCP GSO segmentation with NAT
  ...
2025-03-20 09:39:15 -07:00
Linus Torvalds 80c4c25460 RDMA v6.14 second rc pull request
- Fix rdma-core test failures due to wrong startup ordering in rxe
 
 - Don't crash in bnxt_re if the FW supports more than 64k QPs
 
 - Fix wrong QP table indexing math in bnxt_re
 
 - Calculate the max SRQs for userspace properly in bnxt_re
 
 - Don't try to do math on errno for mlx5's rate calculation
 
 - Properly allow userspace to control the VLAN in the QP state during
   INIT->RTR for bnxt_re
 
 - 6 bug fixes for HNS:
   * Soft lockup when processing huge MRs, add a cond_resched()
   * Fix missed error unwind for doorbell allocation
   * Prevent bad send queue parameters from userspace
   * Wrong error unwind in qp creation
   * Missed xa_destroy during driver shutdown
   * Fix reporting to userspace of max_sge_rd, hns doesn't have a
     read/write difference.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRRRCHOFoQz/8F5bUaFwuHvBreFYQUCZ9wUWwAKCRCFwuHvBreF
 YUo/AP40EMuQvkSVDd9JdcqpTKsyNlgEfEQlxp+X3oqXtd+kuAEA4sXXzsySQErB
 rsAvdXi4GAgKGYH1Q4iLCSGmdw2s7gQ=
 =2HH3
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma

Pull rdma fixes from Jason Gunthorpe:
 "Collected driver fixes from the last few weeks, I was surprised how
  significant many of them seemed to be.

   - Fix rdma-core test failures due to wrong startup ordering in rxe

   - Don't crash in bnxt_re if the FW supports more than 64k QPs

   - Fix wrong QP table indexing math in bnxt_re

   - Calculate the max SRQs for userspace properly in bnxt_re

   - Don't try to do math on errno for mlx5's rate calculation

   - Properly allow userspace to control the VLAN in the QP state during
     INIT->RTR for bnxt_re

   - 6 bug fixes for HNS:
      - Soft lockup when processing huge MRs, add a cond_resched()
      - Fix missed error unwind for doorbell allocation
      - Prevent bad send queue parameters from userspace
      - Wrong error unwind in qp creation
      - Missed xa_destroy during driver shutdown
      - Fix reporting to userspace of max_sge_rd, hns doesn't have a
        read/write difference"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
  RDMA/hns: Fix wrong value of max_sge_rd
  RDMA/hns: Fix missing xa_destroy()
  RDMA/hns: Fix a missing rollback in error path of hns_roce_create_qp_common()
  RDMA/hns: Fix invalid sq params not being blocked
  RDMA/hns: Fix unmatched condition in error path of alloc_user_qp_db()
  RDMA/hns: Fix soft lockup during bt pages loop
  RDMA/bnxt_re: Avoid clearing VLAN_ID mask in modify qp path
  RDMA/mlx5: Handle errors returned from mlx5r_ib_rate()
  RDMA/bnxt_re: Fix reporting maximum SRQs on P7 chips
  RDMA/bnxt_re: Add missing paranthesis in map_qp_id_to_tbl_indx
  RDMA/bnxt_re: Fix allocation of QP table
  RDMA/rxe: Fix the failure of ibv_query_device() and ibv_query_device_ex() tests
2025-03-20 09:25:25 -07:00
Linus Torvalds 05b880b1dc MMC host:
- sdhci-brcmstb: Fix CQE suspend/resume support
  - atmel-mci: Add a missing clk_disable_unprepare() in ->probe()
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmfcIr0XHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCmFEQ/9FjKq7kC2IY/f+U5d5lum+nwC
 V0G4G893R0/nwTigAwwiUUERahW1yt7M5eZ8yhNZzgZ/FzIuEnx0ZEvqScd3AdLZ
 MpGbgZ/OiOCKsz2e/9CoWorTsV/ZfrxfQs57dLtcDJnIVS/sG2w60PghMkY1Dc3g
 K0duiA3nr7M9EuHyXw3Pjx6fPtqm/EXUdlS8CQJP/c/EKDszBbF26zIW37olldiF
 SEd8aU2GKFqApMZupit+SB6fEtNAA8tvv10jJO/Q+Iv1IpWYzYb39qBsmchYVa43
 YXd5c7QOsBsxvrTwelP3pQXhYKGKflXEJNZmvLO03VvhJwraY4BEhuKav8TD4NGQ
 TAv0mN9nnEOMr1recWSp9qHFVIUnXdyznvvR7/K25KltR2v/LQFoyKgeuY9xIbL9
 tzRVTj3HP3TmWbUgSC6QjNTiUmYHTrrOH0PXW0Q5GsoXvB2UAZ4S5yJGvu8bMGEo
 PG7TDq+z8Yf0UK2eTD9DYWJNCgVC1xk2CPrY/hdaYjluLpMrMlZ24AZBe4KzwimL
 WvKGktvJC6SiVepMJuqRNttQoeUpEQbiO71b3FhA4ia+malxrrNM/9C/oe2O5LBd
 UUGh45qMtHGqWS0LgA+to4U0BdSI5uIusNqFtgmtg1VySaMDeeAWmhPHKAkDAEiy
 oGN+HlCVMz1yOiXf1wo=
 =ydEc
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC host fixes from Ulf Hansson:

 - sdhci-brcmstb: Fix CQE suspend/resume support

 - atmel-mci: Add a missing clk_disable_unprepare() in ->probe()

* tag 'mmc-v6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: sdhci-brcmstb: add cqhci suspend/resume to PM ops
  mmc: atmel-mci: Add missing clk_disable_unprepare()
2025-03-20 09:22:11 -07:00
Linus Torvalds a4f586a9fc EFI fixes for v6.14 #3
- Avoid physical address 0x0 for random page allocations
 
 - Add correct lockdep annotation when traversing efivarfs on resume
 
 - Avoid NULL mount in kernel_file_open() when traversing efivarfs on
   resume
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQQm/3uucuRGn1Dmh0wbglWLn0tXAUCZ9u1NQAKCRAwbglWLn0t
 XO6wAP4rzFsZ6RjKvqMGVcy2E/ADANrV0hbSoWHL5xQWOfzjbAEAns4gKR3k4UkS
 9j0h/yQpyaZ58jRWl2BcPFPc5x5zFQM=
 =vUS0
 -----END PGP SIGNATURE-----

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

Pull EFI fixes from Ard Biesheuvel:
 "Here's a final batch of EFI fixes for v6.14.

  The efivarfs ones are fixes for changes that were made this cycle.
  James's fix is somewhat of a band-aid, but it was blessed by the VFS
  folks, who are working with James to come up with something better for
  the next cycle.

   - Avoid physical address 0x0 for random page allocations

   - Add correct lockdep annotation when traversing efivarfs on resume

   - Avoid NULL mount in kernel_file_open() when traversing efivarfs on
     resume"

* tag 'efi-fixes-for-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  efivarfs: fix NULL dereference on resume
  efivarfs: use I_MUTEX_CHILD nested lock to traverse variables on resume
  efi/libstub: Avoid physical address 0x0 when doing random allocation
2025-03-20 09:18:38 -07:00
David Ahern feaee98c6c MAINTAINERS: Add Andrea Mayer as a maintainer of SRv6
Andrea has made significant contributions to SRv6 support in Linux.
Acknowledge the work and on-going interest in Srv6 support with a
maintainers entry for these files so hopefully he is included
on patches going forward.

Signed-off-by: David Ahern <dsahern@kernel.org>
Acked-by: Andrea Mayer <andrea.mayer@uniroma2.it>
Link: https://patch.msgid.link/20250312092212.46299-1-dsahern@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-03-20 15:49:00 +01:00
Paolo Abeni 8417db0be5 Merge branch 'gre-revert-ipv6-link-local-address-fix'
Guillaume Nault says:

====================
gre: Revert IPv6 link-local address fix.

Following Paolo's suggestion, let's revert the IPv6 link-local address
generation fix for GRE devices. The patch introduced regressions in the
upstream CI, which are still under investigation.

Start by reverting the kselftest that depend on that fix (patch 1), then
revert the kernel code itself (patch 2).
====================

Link: https://patch.msgid.link/cover.1742418408.git.gnault@redhat.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-03-20 15:46:20 +01:00
Guillaume Nault fc486c2d06 Revert "gre: Fix IPv6 link-local address generation."
This reverts commit 183185a18f.

This patch broke net/forwarding/ip6gre_custom_multipath_hash.sh in some
circumstances (https://lore.kernel.org/netdev/Z9RIyKZDNoka53EO@mini-arch/).
Let's revert it while the problem is being investigated.

Fixes: 183185a18f ("gre: Fix IPv6 link-local address generation.")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Link: https://patch.msgid.link/8b1ce738eb15dd841aab9ef888640cab4f6ccfea.1742418408.git.gnault@redhat.com
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-03-20 15:46:16 +01:00
Guillaume Nault 355d940f4d Revert "selftests: Add IPv6 link-local address generation tests for GRE devices."
This reverts commit 6f50175cca.

Commit 183185a18f ("gre: Fix IPv6 link-local address generation.") is
going to be reverted. So let's revert the corresponding kselftest
first.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Link: https://patch.msgid.link/259a9e98f7f1be7ce02b53d0b4afb7c18a8ff747.1742418408.git.gnault@redhat.com
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-03-20 15:46:16 +01:00
Paolo Abeni 84761651dd ipsec-2025-03-19
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEH7ZpcWbFyOOp6OJbrB3Eaf9PW7cFAmfaaB0ACgkQrB3Eaf9P
 W7dzTw/+J4HrGU8sGrCyWIXLA7+ATsHF+acxjXkrR0sJTVv3dO/TusPZW68BkeFA
 C4gk42pf6tKDLiuBRBkUyZ0lLJ6jTFvJTfCFc5FkfxxiOMty3XSVOaTaiQerS44T
 50Zd45WivTsxwwYLjDFOEgHO7n7Ogg/i7AANFL/xuiR30WB2265dn/S8+4jRdii+
 XHnqMLWjsLB7IS6SsxumtEYkXM/vA0UwfCHYRDY7r4S5YBQ8jNhqBSZ0bH6/+3zn
 bhs7vzyfeNRdEOD4cY+ZfKTMgPBjzU6CUGrMQxRuFltV5w+sBvTsvRPkVw5nsLqD
 pNXrZTC3F9ryw/GetBKoeKLkGEx8dZNmkyIqpnV3OjJ9RMIk+93euRYZLP5aA6PD
 8511Jl9nc0biwUij6Qfb4JrqSnMYmZ2HuVd7xXIqdU5UGCXBPJ4gMsTegi+EtzzR
 MHjNx+NvfhrrW2s5+q9hRieI6sBHarElLHyl4XCqpu+IBi0L66QKK4gMmrK7GV1D
 HxzeQGdAkkzCLdEEqysxEqKN3RZlIu76Ee1X0Ivu38n+QToNDFq7mOQ0HGmLbx7t
 qkwkcagU3Ap8ag/qXpzhCjX2VJ2WwY6JmZeGy/+KotZo0tnsspXRKEeViLrU4PXI
 Zkpc6Uu6nEHaqeb9D3M9VTgn26c8MMFcoay8NIu55KVND5EyPXY=
 =BSbW
 -----END PGP SIGNATURE-----

Merge tag 'ipsec-2025-03-19' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec

Steffen Klassert says:

====================
pull request (net): ipsec 2025-03-19

1) Fix tunnel mode TX datapath in packet offload mode
   by directly putting it to the xmit path.
   From Alexandre Cassen.

2) Force software GSO only in tunnel mode in favor
   of potential HW GSO. From Cosmin Ratiu.

ipsec-2025-03-19

* tag 'ipsec-2025-03-19' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec:
  xfrm_output: Force software GSO only in tunnel mode
  xfrm: fix tunnel mode TX datapath in packet offload mode
====================

Link: https://patch.msgid.link/20250319065513.987135-1-steffen.klassert@secunet.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-03-20 15:39:05 +01:00
Paolo Abeni 2fdf0880ca Here is batman-adv bugfix:
- Ignore own maximum aggregation size during RX, Sven Eckelmann
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEE1ilQI7G+y+fdhnrfoSvjmEKSnqEFAmfZiVQWHHN3QHNpbW9u
 d3VuZGVybGljaC5kZQAKCRChK+OYQpKeoQspD/9dCyfOE15dEWtVawoCj+qERF1v
 ZxeKFF2ltdkuDF3hQUB6I1GqmQXqnQp4VCtpqk4fomTwkMCtKMlZtni80iPLP3OF
 cpjxDQjy6a7vW2YhCniCwPdgVlxr1DNqFT/WeZyi+dXJ4VI4W8KqkRhaWxyFnCSV
 jlo74msifjNB2VY0hzuB8W7qZgEnpklnvDc7Hvi6cYF5NyPX6GsgmtCzkOP5kNsV
 PELUGILvVnu8TBasfhzzjUHKfj5D9OS/McOC3kFnbRVhrqOed6bx5ZLqXmIdlmTa
 ttMas+6i07WJaWxmK/HMv5II6S4rW3zvyh/tE3znYv00P7TnP4fnoRIxJI1iHht2
 BbEtKxgwvCpnBOLK903+zYDMBzPAvjlRtLq1xVZQ+ArdicSw0dYHpPlR/Hn3Dy4o
 jrLuLBl238u3ZxMUY/qdHDJNIsgtqKeJfvLIiPF3MJ5Xv6xTVuB1MDcHK144NqcK
 Iu5ziD5qNfvRH2NbJkkGQEoa54rfnGz/t318cCaBJ8tULm3PiEoAEcsBgYlMYWkR
 VqPgJYnY6vwVtzzY6U2fbKIES5N9WGEV5koGOJrzz+pgpnq/gZC9/d9A7/3fNIgy
 6Dq6O6s+ZRteowxTGigsZbH+tLb6yG+pUPoto6dqk9HEBjZnK3x+h7dm46KtbQ9C
 wAhEL+M+mh3WxvzJ6Q==
 =RDKf
 -----END PGP SIGNATURE-----

Merge tag 'batadv-net-pullrequest-20250318' of git://git.open-mesh.org/linux-merge

Simon Wunderlich says:

====================
Here is batman-adv bugfix:

- Ignore own maximum aggregation size during RX, Sven Eckelmann

* tag 'batadv-net-pullrequest-20250318' of git://git.open-mesh.org/linux-merge:
  batman-adv: Ignore own maximum aggregation size during RX
====================

Link: https://patch.msgid.link/20250318150035.35356-1-sw@simonwunderlich.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-03-20 15:30:00 +01:00
Lin Ma 90a7138619 net/neighbor: add missing policy for NDTPA_QUEUE_LENBYTES
Previous commit 8b5c171bb3 ("neigh: new unresolved queue limits")
introduces new netlink attribute NDTPA_QUEUE_LENBYTES to represent
approximative value for deprecated QUEUE_LEN. However, it forgot to add
the associated nla_policy in nl_ntbl_parm_policy array. Fix it with one
simple NLA_U32 type policy.

Fixes: 8b5c171bb3 ("neigh: new unresolved queue limits")
Signed-off-by: Lin Ma <linma@zju.edu.cn>
Link: https://patch.msgid.link/20250315165113.37600-1-linma@zju.edu.cn
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-03-20 15:23:29 +01:00
Alexander Mikhalitsyn 23b763302c tools headers: Sync uapi/asm-generic/socket.h with the kernel sources
This also fixes a wrong definitions for SCM_TS_OPT_ID & SO_RCVPRIORITY.

Accidentally found while working on another patchset.

Cc: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Cc: Willem de Bruijn <willemb@google.com>
Cc: Jason Xing <kerneljasonxing@gmail.com>
Cc: Anna Emese Nyiri <annaemesenyiri@gmail.com>
Cc: Kuniyuki Iwashima <kuniyu@amazon.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Fixes: a89568e9be ("selftests: txtimestamp: add SCM_TS_OPT_ID test")
Fixes: e45469e594 ("sock: Introduce SO_RCVPRIORITY socket option")
Link: https://lore.kernel.org/netdev/20250314195257.34854-1-kuniyu@amazon.com/
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Link: https://patch.msgid.link/20250314214155.16046-1-aleksandr.mikhalitsyn@canonical.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-03-20 15:14:46 +01:00
Arthur Mongodin 2c1f97a52c mptcp: Fix data stream corruption in the address announcement
Because of the size restriction in the TCP options space, the MPTCP
ADD_ADDR option is exclusive and cannot be sent with other MPTCP ones.
For this reason, in the linked mptcp_out_options structure, group of
fields linked to different options are part of the same union.

There is a case where the mptcp_pm_add_addr_signal() function can modify
opts->addr, but not ended up sending an ADD_ADDR. Later on, back in
mptcp_established_options, other options will be sent, but with
unexpected data written in other fields due to the union, e.g. in
opts->ext_copy. This could lead to a data stream corruption in the next
packet.

Using an intermediate variable, prevents from corrupting previously
established DSS option. The assignment of the ADD_ADDR option
parameters is now done once we are sure this ADD_ADDR option can be set
in the packet, e.g. after having dropped other suboptions.

Fixes: 1bff1e43a3 ("mptcp: optimize out option generation")
Cc: stable@vger.kernel.org
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Arthur Mongodin <amongodin@randorisec.fr>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
[ Matt: the commit message has been updated: long lines splits and some
  clarifications. ]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250314-net-mptcp-fix-data-stream-corr-sockopt-v1-1-122dbb249db3@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-03-20 15:12:22 +01:00
Yang Yingliang 6ea39cc388 i2c: amd-mp2: drop free_irq() of devm_request_irq() allocated irq
irq allocated with devm_request_irq() will be freed in devm_irq_release(),
using free_irq() in ->remove() will causes a dangling pointer, and a
subsequent double free. So remove the free_irq() in the error path and
remove path.

Fixes: 969864efae ("i2c: amd-mp2: use msix/msi if the hardware supports")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20221103121146.99836-1-yangyingliang@huawei.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2025-03-20 14:37:47 +01:00
Yongjian Sun f70681e9e6
libfs: Fix duplicate directory entry in offset_dir_lookup
There is an issue in the kernel:

In tmpfs, when using the "ls" command to list the contents
of a directory with a large number of files, glibc performs
the getdents call in multiple rounds. If a concurrent unlink
occurs between these getdents calls, it may lead to duplicate
directory entries in the ls output. One possible reproduction
scenario is as follows:

Create 1026 files and execute ls and rm concurrently:

for i in {1..1026}; do
    echo "This is file $i" > /tmp/dir/file$i
done

ls /tmp/dir				rm /tmp/dir/file4
	->getdents(file1026-file5)
						->unlink(file4)

	->getdents(file5,file3,file2,file1)

It is expected that the second getdents call to return file3
through file1, but instead it returns an extra file5.

The root cause of this problem is in the offset_dir_lookup
function. It uses mas_find to determine the starting position
for the current getdents call. Since mas_find locates the first
position that is greater than or equal to mas->index, when file4
is deleted, it ends up returning file5.

It can be fixed by replacing mas_find with mas_find_rev, which
finds the first position that is less than or equal to mas->index.

Fixes: b9b588f22a ("libfs: Use d_children list to iterate simple_offset directories")
Signed-off-by: Yongjian Sun <sunyongjian1@huawei.com>
Link: https://lore.kernel.org/r/20250320034417.555810-1-sunyongjian@huaweicloud.com
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-03-20 14:28:18 +01:00
Paolo Abeni f31b6fbfe8 Merge branch 'net-fix-lwtunnel-reentry-loops'
Justin Iurman says:

====================
net: fix lwtunnel reentry loops

When the destination is the same after the transformation, we enter a
lwtunnel loop. This is true for most of lwt users: ioam6, rpl, seg6,
seg6_local, ila_lwt, and lwt_bpf. It can happen in their input() and
output() handlers respectively, where either dst_input() or dst_output()
is called at the end. It can also happen in xmit() handlers.

Here is an example for rpl_input():

dump_stack_lvl+0x60/0x80
rpl_input+0x9d/0x320
lwtunnel_input+0x64/0xa0
lwtunnel_input+0x64/0xa0
lwtunnel_input+0x64/0xa0
lwtunnel_input+0x64/0xa0
lwtunnel_input+0x64/0xa0
[...]
lwtunnel_input+0x64/0xa0
lwtunnel_input+0x64/0xa0
lwtunnel_input+0x64/0xa0
lwtunnel_input+0x64/0xa0
lwtunnel_input+0x64/0xa0
ip6_sublist_rcv_finish+0x85/0x90
ip6_sublist_rcv+0x236/0x2f0

... until rpl_do_srh() fails, which means skb_cow_head() failed.

This series provides a fix at the core level of lwtunnel to catch such
loops when they're not caught by the respective lwtunnel users, and
handle the loop case in ioam6 which is one of the users. This series
also comes with a new selftest to detect some dst cache reference loops
in lwtunnel users.
====================

Link: https://patch.msgid.link/20250314120048.12569-1-justin.iurman@uliege.be
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-03-20 11:25:56 +01:00