Date: Mon, 5 Aug 2024 12:00:33 +0200 From: Vlastimil Babka To: Linus Torvalds Cc: David Rientjes , Joonsoo Kim , Christoph Lameter , Pekka Enberg , Andrew Morton , "linux-mm@kvack.org" , LKML , patches@lists.linux.dev, Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Chengming Zhou , Rik van Riel Subject: [GIT PULL] slab fixes for 6.11-rc2 Hi Linus, please pull the latest slab hot-fixes from: git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-fixes-for-6.11-rc2 Thanks, Vlastimil ====================================== - Stable fix for KFENCE integration (Rik van Riel) Since v6.8 we've had a subtle breakage in SLUB with KFENCE enabled, that can cause a crash. It hasn't been found earlier due to quite specific conditions necessary (OOM during kmem_cache_alloc_bulk()). ---------------------------------------------------------------- Rik van Riel (1): mm, slub: do not call do_slab_free for kfence object mm/slub.c | 3 +++ 1 file changed, 3 insertions(+) . Date: Mon, 5 Aug 2024 15:08:10 -0600 From: Shuah Khan To: Linus Torvalds Cc: shuah , Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] Kselftest fixes update for Linux 6.11-rc3 This is a multi-part message in MIME format. --------------LlER0KbKGvSKZ6L4wyCWLfpp Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Linus, Please pull the kselftest fixes update for Linux 6.11-rc3. This kselftest fixes update consists of a single fix to the conditional in ksft.py script which incorrectly flags a test suite failed when there are skipped tests in the mix. The logic is fixed to take skipped tests into account and report the test as passed. diff is attached. thanks, -- Shuah ---------------------------------------------------------------- The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-fixes-6.11-rc3 for you to fetch changes up to 170c966cbe274e664288cfc12ee919d5e706dc50: selftests: ksft: Fix finished() helper exit code on skipped tests (2024-07-31 11:38:56 -0600) ---------------------------------------------------------------- linux_kselftest-fixes-6.11-rc3 This kselftest fixes update consists of a single fix to the conditional in ksft.py script which incorrectly flags a test suite failed when there are skipped tests in the mix. The logic is fixed to take skipped tests into account and report the test as passed. ---------------------------------------------------------------- Laura Nao (1): selftests: ksft: Fix finished() helper exit code on skipped tests tools/testing/selftests/kselftest/ksft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------- --------------LlER0KbKGvSKZ6L4wyCWLfpp Content-Type: text/x-patch; charset=UTF-8; name="linux_kselftest-fixes-6.11-rc3.diff" Content-Disposition: attachment; filename="linux_kselftest-fixes-6.11-rc3.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3Rvb2xzL3Rlc3Rpbmcvc2VsZnRlc3RzL2tzZWxmdGVzdC9rc2Z0LnB5 IGIvdG9vbHMvdGVzdGluZy9zZWxmdGVzdHMva3NlbGZ0ZXN0L2tzZnQucHkKaW5kZXggY2Q4 OWZiMmJjMTBlLi5iZjIxNTc5MGE4OWQgMTAwNjQ0Ci0tLSBhL3Rvb2xzL3Rlc3Rpbmcvc2Vs ZnRlc3RzL2tzZWxmdGVzdC9rc2Z0LnB5CisrKyBiL3Rvb2xzL3Rlc3Rpbmcvc2VsZnRlc3Rz L2tzZWxmdGVzdC9rc2Z0LnB5CkBAIC03MCw3ICs3MCw3IEBAIGRlZiB0ZXN0X3Jlc3VsdChj b25kaXRpb24sIGRlc2NyaXB0aW9uPSIiKToKIAogCiBkZWYgZmluaXNoZWQoKToKLSAgICBp ZiBrc2Z0X2NudFsicGFzcyJdID09IGtzZnRfbnVtX3Rlc3RzOgorICAgIGlmIGtzZnRfY250 WyJwYXNzIl0gKyBrc2Z0X2NudFsic2tpcCJdID09IGtzZnRfbnVtX3Rlc3RzOgogICAgICAg ICBleGl0X2NvZGUgPSBLU0ZUX1BBU1MKICAgICBlbHNlOgogICAgICAgICBleGl0X2NvZGUg PSBLU0ZUX0ZBSUwK --------------LlER0KbKGvSKZ6L4wyCWLfpp-- . Date: Tue, 06 Aug 2024 09:40:38 +0300 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: Linus Torvalds Cc: LKML , PDx86 , Hans de Goede , Andy Shevchenko Subject: [GIT PULL] platform-drivers-x86 for v6.11-2 Hi Linus, Here is a platform-drivers-x86 fixes PR for v6.11. Fixes: - intel-vbtn: ACPI notifier racing with itself. - intel/ifs: Init local variable to cover a timeout corner case. - WMI docs spelling New HW Support: - amd/{pmc,pmf}: AMD 1Ah model 60h series. - amd/pmf: SPS quirk support for ASUS ROG Ally X Regards, i. The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git tags/platform-drivers-x86-v6.11-2 for you to fetch changes up to 3114f77e9453daa292ec0906f313a715c69b5943: platform/x86/intel/ifs: Initialize union ifs_status to zero (2024-07-31 12:37:34 +0300) ---------------------------------------------------------------- platform-drivers-x86 for v6.11-2 Fixes: - intel-vbtn: ACPI notifier racing with itself. - intel/ifs: Init local variable to cover a timeout corner case. - WMI docs spelling New HW Support: - amd/{pmc,pmf}: AMD 1Ah model 60h series. - amd/pmf: SPS quirk support for ASUS ROG Ally X The following is an automated shortlog grouped by driver: amd/pmc: - Send OS_HINT command for new AMD platform amd/pmf: - Add new ACPI ID AMDI0107 amd: pmf: - Add quirk for ROG Ally X intel/ifs: - Initialize union ifs_status to zero intel-vbtn: - Protect ACPI notify handler against recursion msi-wmi-platform: - Fix spelling mistakes ---------------------------------------------------------------- Hans de Goede (1): platform/x86: intel-vbtn: Protect ACPI notify handler against recursion Kuppuswamy Sathyanarayanan (1): platform/x86/intel/ifs: Initialize union ifs_status to zero Luis Felipe Hernandez (1): platform/x86: msi-wmi-platform: Fix spelling mistakes Luke D. Jones (1): platform/x86/amd: pmf: Add quirk for ROG Ally X Shyam Sundar S K (2): platform/x86/amd/pmc: Send OS_HINT command for new AMD platform platform/x86/amd/pmf: Add new ACPI ID AMDI0107 Documentation/wmi/devices/msi-wmi-platform.rst | 6 +++--- drivers/platform/x86/amd/pmc/pmc.c | 2 ++ drivers/platform/x86/amd/pmc/pmc.h | 1 + drivers/platform/x86/amd/pmf/core.c | 3 +++ drivers/platform/x86/amd/pmf/pmf-quirks.c | 9 ++++++++- drivers/platform/x86/intel/ifs/runtest.c | 2 +- drivers/platform/x86/intel/vbtn.c | 9 +++++++++ 7 files changed, 27 insertions(+), 5 deletions(-) . Date: Tue, 6 Aug 2024 07:26:59 -0500 From: Nishanth Menon To: Olof Johansson , Arnd Bergmann , , Subject: [GIT PULL] arm64: dts: TI K3 fixes for v6.11 --vwawzq3tw7tz25jq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi SoC maintainers, Please find DT fixups for the v6.11 rc cycle - This tag includes the previous late PR https://patchwork.kernel.org/project/linux-soc/patch/aacd1e96-9ff4-4222-9f4= d-29e63041f7fb@ti.com/ The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git tags/ti-k3-d= t-fixes-for-v6.11 for you to fetch changes up to 402d336053a5d827c70ec11109e079811e86e0e8: arm64: dts: ti: k3-j784s4-main: Correct McASP DMAs (2024-08-06 06:39:23 -= 0500) ---------------------------------------------------------------- Devicetree fixes for TI K3 platforms for v6.11 Critical fixes for the following: * j784s4: Fix for McASP DMA map * J722s/AM62p: GPIO ranges fixes * k3-am62-verdin-dahlia: sleep-moci fixes for deep-sleep (revert) ---------------------------------------------------------------- Andrew Halaney (2): arm64: dts: ti: k3-j784s4-evm: Assign only lanes 0 and 1 to PCIe1 arm64: dts: ti: k3-j784s4-evm: Consolidate serdes0 references Francesco Dolcini (1): arm64: dts: ti: k3-am62-verdin-dahlia: Keep CTRL_SLEEP_MOCI# regulato= r on Jared McArthur (3): arm64: dts: ti: k3-am62p: Add gpio-ranges for mcu_gpio0 arm64: dts: ti: k3-am62p: Fix gpio-range for main_pmx0 arm64: dts: ti: k3-j722s: Fix gpio-range for main_pmx0 Nishanth Menon (1): Merge tag 'ti-k3-dt-for-v6.11-part2' into ti-k3-dts-next Parth Pancholi (1): arm64: dts: ti: k3-j784s4-main: Correct McASP DMAs arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi | 22 ------------------- arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 6 ------ .../boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi | 2 ++ arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 3 ++- arch/arm64/boot/dts/ti/k3-j722s-main.dtsi | 3 ++- arch/arm64/boot/dts/ti/k3-j784s4-evm.dts | 25 +++++++-----------= ---- arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 4 ++-- 7 files changed, 16 insertions(+), 49 deletions(-) --=20 Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5= 849D 1736 249D --vwawzq3tw7tz25jq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmayFo0ACgkQ3bWEnRc2 JJ1oKg/9EAHR8Cr6XyueByC0qUGUvjv4gHQMRRx22PRE5uyMvWjIkTfN9I4q8Sfa HtG3o6J5TBeGm4DytawgYf++CqQsAE08jfednrkeUwV/NF1jkbtWIJTe3e2OI/n1 agWFDlJtKHLJwM8QqqtagczKypM8mbl50OU7Pdqgh2Nf06fUFe7/Q98SH8H62/S+ YCNEp0XZW5rfh167lc0yp9M0RZiFCna/IlM5MbFr7UMkOuzSd91G2cKq3IKqaR8g HHIoXacueiOIeqB4vjweTKAFP23Lwp4Yx4gzyMXyvmtSTl8l37JyCjskx941v4XR QeGPtLJJ4osPom3yNgy9LgerVPpv4+9ayFJBImmm9EKCVTCIZMfLDOnEZXoZveFx u8XMegLIXRNtbBtzdWjjsKm12hC4DIonqPiVriPdoxc3L0cTLEnuW4zx7hyHtlfR f+hgVcO+MuJ6UUWEZgsXkVkCeS5sSkwtJT+ssHUOV4e16/ttt60PCdjCNDVNbJ+c j3WS/49CZ2A9+gKOYhFVne0yOhjQvRkIu2e0nc9qqea/YB1tMXDI8qPfjbZPeeeq VPCKmhJ3XF1eeN4D6QmSHi10Fe4OxHTwGnJC9opxYR+xbspumxfI0Hp6YMo8XYbP Pk+SCtMczevJKc8E5ihVKBo5YUqYr8jpYMSkLE+MVVf11c8Pbj4= =XSOH -----END PGP SIGNATURE----- --vwawzq3tw7tz25jq-- . Date: Tue, 6 Aug 2024 23:35:01 +0200 From: Sebastian Reichel To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [GIT PULL] power-supply changes for 6.11-rc3 --ixfyut5kjxo53sav Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Linus, The following changes since commit 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0: Linux 6.10-rc1 (2024-05-26 15:20:12 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git tags/for-v6.11-rc for you to fetch changes up to d6cca7631a4b54a8995e3bc53e5afb11d3b0c8ff: power: supply: qcom_battmgr: Ignore extra __le32 in info payload (2024-07-27 00:18:40 +0200) ---------------------------------------------------------------- Power Supply Fixes for 6.11 cycle * rt5033: fix driver regression causing kernel oops * axp288-charger: fix charge voltage setup * qcom-battmgr: fix thermal zone spamming errors * qcom-battmgr: fix init on Qualcomm X Elite ---------------------------------------------------------------- Hans de Goede (2): power: supply: axp288_charger: Fix constant_charge_voltage writes power: supply: axp288_charger: Round constant_charge_voltage writes down Neil Armstrong (1): power: supply: qcom_battmgr: return EAGAIN when firmware service is not up Nikita Travkin (1): power: supply: rt5033: Bring back i2c_set_clientdata Stephan Gerhold (1): power: supply: qcom_battmgr: Ignore extra __le32 in info payload drivers/power/supply/axp288_charger.c | 24 ++++++++++++------------ drivers/power/supply/qcom_battmgr.c | 12 +++++++----- drivers/power/supply/rt5033_battery.c | 1 + 3 files changed, 20 insertions(+), 17 deletions(-) --ixfyut5kjxo53sav Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmaylwQACgkQ2O7X88g7 +polKA//VycZvY96wXNSB4eLTUJIudH6BWB0n7gypu5ln5d/zM4YAoaFCwy9K0y3 iBoJopFeX/N1mOhRLhYbNCvAOfj1YSGcC6HJ3NKre5ALMzpVplpOTtxjuPhxxmWL ZlLCA2sJNozYySip9jPq6kOgsk/GvEMckoqb/r4l/6lkuMZHva0uM4BUZZ5TgzyQ jO3WJxVRtJ/2Gzz7s0Z2CFIVFBiCaoZZzWpWqzJBqYbDd3FfgPbECPFUpxMURgjd gpCEmDVF0QdJY5ncksMgWEbk1Xe8vp8ppvo2Usf29x+ohbMpps6nVoO6T+11vc/p LQUQtNV9YZpRj1beqzCzNAR3MTNeCXJJC2cK5nTOxa2or5vVGoKnAAb8Da9kvzBJ NUTq7b8sx35rOFWr5QFal+f+i3zyfJ7vHyXLoxuubRyXSKp5LW6P0o9YgcRYr2qu vTwZY7+XoLf9+tjEg3s3MxNMe4m91ywLT0XSEa/yyk9K5+uVAL5cM8cWrN7hbUqA oonKeXd3hUShIhFvyre2LfajEBjmaJJLXvl7Zvzh7FG2GPXOPxedeWTgrJIhchwr l3olSw3cLZjaRFRxKxeRkYyxV8PxHbsJQZR01QyFDouVRNiOaLXjgS/kq0G+X4Iy jPPMtMr1LKWo0pbo8Th4NLrM1XWrtqIMZ/GOce9Q5yc4kY2gjd0= =3gdF -----END PGP SIGNATURE----- --ixfyut5kjxo53sav-- . Date: Wed, 7 Aug 2024 15:40:22 +0200 From: David Sterba To: torvalds@linux-foundation.org Cc: David Sterba , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] Btrfs fixes for 6.11-rc3 Hi, a few regular fixes. Please pull, thanks. - fix double inode unlock for direct IO sync writes (reported by syzbot) - fix root tree id/name map definitions, don't use fixed size buffers for name (reported by -Werror=unterminated-string-initialization) - fix qgroup reserve leaks in bufferd write path - update scrub status structure more often so it can be reported in user space more accurately and let 'resume' not repeat work - in preparation to remove space chache v1 in the future print a warning if it's detected ---------------------------------------------------------------- The following changes since commit b8e947e9f64cac9df85a07672b658df5b2bcff07: btrfs: initialize location to fix -Wmaybe-uninitialized in btrfs_lookup_dentry() (2024-07-30 15:33:06 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git tags/for-6.11-rc2-tag for you to fetch changes up to 12653ec36112ab55fa06c01db7c4432653d30a8d: btrfs: avoid using fixed char array size for tree names (2024-08-02 22:44:27 +0200) ---------------------------------------------------------------- Boris Burkov (2): btrfs: implement launder_folio for clearing dirty page reserve btrfs: fix qgroup reserve leaks in cow_file_range Filipe Manana (1): btrfs: fix double inode unlock for direct IO sync writes Josef Bacik (1): btrfs: emit a warning about space cache v1 being deprecated Qu Wenruo (3): btrfs: factor out stripe length calculation into a helper btrfs: scrub: update last_physical after scrubbing one stripe btrfs: avoid using fixed char array size for tree names fs/btrfs/file.c | 5 ++++- fs/btrfs/inode.c | 10 ++++++++++ fs/btrfs/print-tree.c | 2 +- fs/btrfs/scrub.c | 25 +++++++++++++++++++------ fs/btrfs/super.c | 5 ++++- 5 files changed, 38 insertions(+), 9 deletions(-) . Date: Wed, 7 Aug 2024 20:28:07 -0700 From: Andrew Morton To: Linus Torvalds Cc: mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [GIT PULL] hotfixes for 6.11-rc2 Linus, please merge this batch of hotfixes, thanks. The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm tags/mm-hotfixes-stable-2024-08-07-18-32 for you to fetch changes up to 6d45e1c948a8b7ed6ceddb14319af69424db730c: padata: Fix possible divide-by-0 panic in padata_mt_helper() (2024-08-07 18:33:56 -0700) ---------------------------------------------------------------- 9 hotfixes. 5 are cc:stable, 4 either pertain to post-6.10 material or aren't considered necessary for earlier kernels. 5 are MM and 4 are non-MM. No identifiable theme here - please see the individual changelogs. ---------------------------------------------------------------- Andrey Konovalov (1): kcov: properly check for softirq context Baolin Wang (2): mm: shmem: avoid allocating huge pages larger than MAX_PAGECACHE_ORDER for shmem mm: shmem: fix incorrect aligned index when checking conflicts David Heidelberg (1): mailmap: update entry for David Heidelberg Muchun Song (1): mm: list_lru: fix UAF for memory cgroup Nico Pache (1): selftests: mm: add s390 to ARCH check Petr Vorel (1): MAINTAINERS: Update LTP members and web Shakeel Butt (1): memcg: protect concurrent access to mem_cgroup_idr Waiman Long (1): padata: Fix possible divide-by-0 panic in padata_mt_helper() .mailmap | 1 + MAINTAINERS | 4 +++- kernel/kcov.c | 15 ++++++++++++--- kernel/padata.c | 7 +++++++ mm/list_lru.c | 28 ++++++++++++++++++++++------ mm/memcontrol.c | 22 ++++++++++++++++++++-- mm/shmem.c | 14 +++++--------- tools/testing/selftests/mm/Makefile | 2 +- 8 files changed, 71 insertions(+), 22 deletions(-) . Date: Wed, 7 Aug 2024 20:39:25 -0700 From: Boqun Feng To: peterz@infradead.org, mingo@redhat.com Cc: will@kernel.org, longman@redhat.com, boqun.feng@gmail.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, paulmck@kernel.org, frederic@kernel.org, josh@joshtriplett.org, neeraj.iitr10@gmail.com, urezki@gmail.com, rcu@vger.kernel.org Subject: [GIT PULL] LOCKDEP changes for v6.12 Hi Peter & Ingo, Per discussion: https://lore.kernel.org/lkml/20240802151619.GN39708@noisy.programming.kicks-ass.net/ I'm sending a PR with some lockdep changes to tip. The following changes since commit d5934e76316e84eced836b6b2bafae1837d1cd58: cleanup: Add usage and style documentation (2024-08-05 16:54:41 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux tags/lockdep-for-tip.20240806 for you to fetch changes up to 39dea484e2bb9066abbc01e2c5e03b6917b0b775: locking/lockdep: Simplify character output in seq_line() (2024-08-06 10:46:43 -0700) I've reviewed and tested these changes from my end, but since I don't have a branch tracked by linux-next, so that part of testing is missing. It does pass the 0day build test though. RCU is Cced since I believe patch: lockdep: fix deadlock issue between lockdep and rcu is also queued in the upcoming RCU PR for v6.12. However, since it's a bug fix in lockdep, I feel it makes more sense to go via tip. Worst case, git merge will eventually find the duplicate commit, so not a problem. I'm doing this "sub-maintenance" via a PR, but I'm also OK to send them as patch series, whatever makes your life easier. ;-) Also since this is a sub-maintenance, I plan to stop pusing anything new after -rc2 for a particular release (i.e. anything new after -rc3 will be in a PR from me in the later release), mostly due to lockdep shouldn't have anything urgent (famous last words though), and give you guys more time to prepare the PRs from the tip tree, but again I'm open to any suggestion as well. ---------------------------------------------------------------- Lockdep changes for v6.12: - Fixes a deadlock in lockdep by avoiding calling rcu with the graph lock held. - Uses str_plural() to fix Coccinelle warning. - Uses seq_putc() instead of seq_printf() to print a single character in lockdep proc file. Regards, Boqun ---------------------------------------------------------------- Markus Elfring (1): locking/lockdep: Simplify character output in seq_line() Thorsten Blum (1): lockdep: Use str_plural() to fix Coccinelle warning Zhiguo Niu (1): lockdep: fix deadlock issue between lockdep and rcu kernel/locking/lockdep.c | 50 ++++++++++++++++++++++++++++--------------- kernel/locking/lockdep_proc.c | 2 +- 2 files changed, 34 insertions(+), 18 deletions(-) . Date: Thu, 8 Aug 2024 19:24:37 +0800 From: Huacai Chen To: Linus Torvalds , Arnd Bergmann , Huacai Chen Cc: loongarch@lists.linux.dev, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Guo Ren , Xuerui Wang , Jiaxun Yang , Huacai Chen Subject: [GIT PULL] LoongArch fixes for v6.11-rc3 The following changes since commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed: Linux 6.11-rc2 (2024-08-04 13:50:53 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git tags/loongarch-fixes-6.11-1 for you to fetch changes up to 494b0792d962e8efac72b3a5b6d9bcd4e6fa8cf0: LoongArch: KVM: Remove undefined a6 argument comment for kvm_hypercall() (2024-08-07 17:37:14 +0800) ---------------------------------------------------------------- LoongArch fixes for v6.11-rc3 Enable general EFI poweroff method to make poweroff usable on hardwares which lack ACPI S5, use accessors to page table entries instead of direct dereference to avoid potential problems, and two trivial kvm cleanups. ---------------------------------------------------------------- Dandan Zhang (1): LoongArch: KVM: Remove undefined a6 argument comment for kvm_hypercall() Huacai Chen (1): LoongArch: Use accessors to page table entries instead of direct dereference Miao Wang (1): LoongArch: Enable general EFI poweroff method Yuli Wang (1): LoongArch: KVM: Remove unnecessary definition of KVM_PRIVATE_MEM_SLOTS arch/loongarch/include/asm/hugetlb.h | 4 +-- arch/loongarch/include/asm/kfence.h | 6 ++--- arch/loongarch/include/asm/kvm_host.h | 2 -- arch/loongarch/include/asm/kvm_para.h | 4 +-- arch/loongarch/include/asm/pgtable.h | 48 +++++++++++++++++++++-------------- arch/loongarch/kernel/efi.c | 6 +++++ arch/loongarch/kvm/mmu.c | 8 +++--- arch/loongarch/mm/hugetlbpage.c | 6 ++--- arch/loongarch/mm/init.c | 10 ++++---- arch/loongarch/mm/kasan_init.c | 10 ++++---- arch/loongarch/mm/pgtable.c | 2 +- 11 files changed, 60 insertions(+), 46 deletions(-) . Date: Thu, 8 Aug 2024 11:32:58 -0400 From: Kent Overstreet To: Linus Torvalds Cc: linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] bcachefs fixes for 6.11-rc3 Hi Linus, couple little ones for you... The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://evilpiepirate.org/bcachefs.git tags/bcachefs-2024-08-08 for you to fetch changes up to 73dc1656f41a42849e43b945fe44d4e3d55eb6c3: bcachefs: Use bch2_wait_on_allocator() in btree node alloc path (2024-08-07 21:04:55 -0400) ---------------------------------------------------------------- bcachefs fixes for 6.11-rc3 Assorted little stuff: - lockdep fixup for lockdep_set_notrack_class() - we can now remove a device when using erasure coding without deadlocking, though we still hit other issues - the "allocator stuck" timeout is now configurable, and messages are ratelimited; default timeout has been increased from 10 seconds to 30 ---------------------------------------------------------------- Kent Overstreet (10): bcachefs: Fix double free of ca->buckets_nouse lockdep: Fix lockdep_set_notrack_class() for CONFIG_LOCK_STAT bcachefs: Don't rely on implicit unsigned -> signed integer conversion bcachefs: Add a comment for bucket helper types bcachefs: Add missing bch2_trans_begin() call bcachefs: Improved allocator debugging for ec bcachefs: ec should not allocate from ro devs bcachefs: Add missing path_traverse() to btree_iter_next_node() bcachefs: Make allocator stuck timeout configurable, ratelimit messages bcachefs: Use bch2_wait_on_allocator() in btree node alloc path fs/bcachefs/alloc_background.h | 12 ++++++++++-- fs/bcachefs/alloc_foreground.c | 32 ++++++++++++++++++++++++++++---- fs/bcachefs/alloc_foreground.h | 9 +++++++-- fs/bcachefs/bcachefs.h | 2 ++ fs/bcachefs/bcachefs_format.h | 2 ++ fs/bcachefs/btree_iter.c | 5 +++++ fs/bcachefs/btree_update_interior.c | 2 +- fs/bcachefs/ec.c | 34 +++++++++++++++++++++++----------- fs/bcachefs/io_misc.c | 6 +----- fs/bcachefs/io_read.c | 1 + fs/bcachefs/io_write.c | 5 +---- fs/bcachefs/opts.h | 5 +++++ fs/bcachefs/super-io.c | 4 ++++ fs/bcachefs/super.c | 1 - fs/bcachefs/sysfs.c | 6 +++++- kernel/locking/lockdep.c | 6 ++++++ 16 files changed, 101 insertions(+), 31 deletions(-) . Date: Thu, 8 Aug 2024 12:21:08 -0400 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Masami Hiramatsu , Mathieu Desnoyers , Mark Rutland , Jianhui Zhou <912460177@qq.com>, Mathias Krause , Petr Pavlu , Tze-nan Wu Subject: [GIT PULL] tracing: Updates for 6.11-rc2 Linus, tracing fixes for v6.11: - Have reading of event format files test if the meta data still exists. When an event is freed, a flag (EVENT_FILE_FL_FREED) in the meta data is set to state that it is to prevent any new references to it from happening while waiting for existing references to close. When the last reference closes, the meta data is freed. But the "format" file was missing a check to this flag (along with some other files) that allowed new references to happen, and a use-after-free bug to occur. - Have the trace event meta data use the refcount infrastructure instead of relying on its own atomic counters. - Have tracefs inodes use alloc_inode_sb() for allocation instead of using kmem_cache_alloc() directly. - Have eventfs_create_dir() return an ERR_PTR instead of NULL as the callers expect a real object or an ERR_PTR. - Have release_ei() use call_srcu() and not call_rcu() as all the protection is on SRCU and not RCU. - Fix ftrace_graph_ret_addr() to use the task passed in and not current. - Fix overflow bug in get_free_elt() where the counter can overflow the integer and cause an infinite loop. - Remove unused function ring_buffer_nr_pages() - Have tracefs freeing use the inode RCU infrastructure instead of creating its own. When the kernel had randomize structure fields enabled, the rcu field of the tracefs_inode was overlapping the rcu field of the inode structure, and corrupting it. Instead, use the destroy_inode() callback to do the initial cleanup of the code, and then have free_inode() free it. Please pull the latest trace-v6.11-rc2 tree, which can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git trace-v6.11-rc2 Tag SHA1: 511ef7e0a9da29a1d9a120a99630152d9c779ee3 Head SHA1: 0b6743bd60a56a701070b89fb80c327a44b7b3e2 Jianhui Zhou (1): ring-buffer: Remove unused function ring_buffer_nr_pages() Mathias Krause (3): tracefs: Fix inode allocation eventfs: Don't return NULL in eventfs_create_dir() eventfs: Use SRCU for freeing eventfs_inodes Petr Pavlu (1): function_graph: Fix the ret_stack used by ftrace_graph_ret_addr() Steven Rostedt (3): tracing: Have format file honor EVENT_FILE_FL_FREED tracing: Use refcount for trace_event_file reference counter tracefs: Use generic inode RCU for synchronizing freeing Tze-nan Wu (1): tracing: Fix overflow in get_free_elt() ---- fs/tracefs/event_inode.c | 4 ++-- fs/tracefs/inode.c | 12 +++++------ fs/tracefs/internal.h | 5 +---- include/linux/ring_buffer.h | 1 - include/linux/trace_events.h | 2 +- kernel/trace/fgraph.c | 2 +- kernel/trace/ring_buffer.c | 12 ----------- kernel/trace/trace.h | 23 +++++++++++++++++++++ kernel/trace/trace_events.c | 41 ++++++++++++++++++++++--------------- kernel/trace/trace_events_hist.c | 4 ++-- kernel/trace/trace_events_inject.c | 2 +- kernel/trace/trace_events_trigger.c | 6 +++--- kernel/trace/tracing_map.c | 6 +++--- 13 files changed, 66 insertions(+), 54 deletions(-) --------------------------- diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c index 5d88c184f0fc..01e99e98457d 100644 --- a/fs/tracefs/event_inode.c +++ b/fs/tracefs/event_inode.c @@ -112,7 +112,7 @@ static void release_ei(struct kref *ref) entry->release(entry->name, ei->data); } - call_rcu(&ei->rcu, free_ei_rcu); + call_srcu(&eventfs_srcu, &ei->rcu, free_ei_rcu); } static inline void put_ei(struct eventfs_inode *ei) @@ -736,7 +736,7 @@ struct eventfs_inode *eventfs_create_dir(const char *name, struct eventfs_inode /* Was the parent freed? */ if (list_empty(&ei->list)) { cleanup_ei(ei); - ei = NULL; + ei = ERR_PTR(-EBUSY); } return ei; } diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index 1028ab6d9a74..1748dff58c3b 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -42,7 +42,7 @@ static struct inode *tracefs_alloc_inode(struct super_block *sb) struct tracefs_inode *ti; unsigned long flags; - ti = kmem_cache_alloc(tracefs_inode_cachep, GFP_KERNEL); + ti = alloc_inode_sb(sb, tracefs_inode_cachep, GFP_KERNEL); if (!ti) return NULL; @@ -53,15 +53,14 @@ static struct inode *tracefs_alloc_inode(struct super_block *sb) return &ti->vfs_inode; } -static void tracefs_free_inode_rcu(struct rcu_head *rcu) +static void tracefs_free_inode(struct inode *inode) { - struct tracefs_inode *ti; + struct tracefs_inode *ti = get_tracefs(inode); - ti = container_of(rcu, struct tracefs_inode, rcu); kmem_cache_free(tracefs_inode_cachep, ti); } -static void tracefs_free_inode(struct inode *inode) +static void tracefs_destroy_inode(struct inode *inode) { struct tracefs_inode *ti = get_tracefs(inode); unsigned long flags; @@ -69,8 +68,6 @@ static void tracefs_free_inode(struct inode *inode) spin_lock_irqsave(&tracefs_inode_lock, flags); list_del_rcu(&ti->list); spin_unlock_irqrestore(&tracefs_inode_lock, flags); - - call_rcu(&ti->rcu, tracefs_free_inode_rcu); } static ssize_t default_read_file(struct file *file, char __user *buf, @@ -437,6 +434,7 @@ static int tracefs_drop_inode(struct inode *inode) static const struct super_operations tracefs_super_operations = { .alloc_inode = tracefs_alloc_inode, .free_inode = tracefs_free_inode, + .destroy_inode = tracefs_destroy_inode, .drop_inode = tracefs_drop_inode, .statfs = simple_statfs, .show_options = tracefs_show_options, diff --git a/fs/tracefs/internal.h b/fs/tracefs/internal.h index f704d8348357..d83c2a25f288 100644 --- a/fs/tracefs/internal.h +++ b/fs/tracefs/internal.h @@ -10,10 +10,7 @@ enum { }; struct tracefs_inode { - union { - struct inode vfs_inode; - struct rcu_head rcu; - }; + struct inode vfs_inode; /* The below gets initialized with memset_after(ti, 0, vfs_inode) */ struct list_head list; unsigned long flags; diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 96d2140b471e..fd35d4ec12e1 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h @@ -193,7 +193,6 @@ void ring_buffer_set_clock(struct trace_buffer *buffer, void ring_buffer_set_time_stamp_abs(struct trace_buffer *buffer, bool abs); bool ring_buffer_time_stamp_abs(struct trace_buffer *buffer); -size_t ring_buffer_nr_pages(struct trace_buffer *buffer, int cpu); size_t ring_buffer_nr_dirty_pages(struct trace_buffer *buffer, int cpu); struct buffer_data_read_page; diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index 9df3e2973626..fed58e54f15e 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -680,7 +680,7 @@ struct trace_event_file { * caching and such. Which is mostly OK ;-) */ unsigned long flags; - atomic_t ref; /* ref count for opened files */ + refcount_t ref; /* ref count for opened files */ atomic_t sm_ref; /* soft-mode reference counter */ atomic_t tm_ref; /* trigger-mode reference counter */ }; diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c index fc205ad167a9..d1d5ea2d0a1b 100644 --- a/kernel/trace/fgraph.c +++ b/kernel/trace/fgraph.c @@ -902,7 +902,7 @@ unsigned long ftrace_graph_ret_addr(struct task_struct *task, int *idx, i = *idx ? : task->curr_ret_stack; while (i > 0) { - ret_stack = get_ret_stack(current, i, &i); + ret_stack = get_ret_stack(task, i, &i); if (!ret_stack) break; /* diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 28853966aa9a..cebd879a30cb 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -692,18 +692,6 @@ u64 ring_buffer_event_time_stamp(struct trace_buffer *buffer, return ts; } -/** - * ring_buffer_nr_pages - get the number of buffer pages in the ring buffer - * @buffer: The ring_buffer to get the number of pages from - * @cpu: The cpu of the ring_buffer to get the number of pages from - * - * Returns the number of pages used by a per_cpu buffer of the ring buffer. - */ -size_t ring_buffer_nr_pages(struct trace_buffer *buffer, int cpu) -{ - return buffer->buffers[cpu]->nr_pages; -} - /** * ring_buffer_nr_dirty_pages - get the number of used pages in the ring buffer * @buffer: The ring_buffer to get the number of pages from diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 8783bebd0562..bd3e3069300e 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -1634,6 +1634,29 @@ static inline void *event_file_data(struct file *filp) extern struct mutex event_mutex; extern struct list_head ftrace_events; +/* + * When the trace_event_file is the filp->i_private pointer, + * it must be taken under the event_mutex lock, and then checked + * if the EVENT_FILE_FL_FREED flag is set. If it is, then the + * data pointed to by the trace_event_file can not be trusted. + * + * Use the event_file_file() to access the trace_event_file from + * the filp the first time under the event_mutex and check for + * NULL. If it is needed to be retrieved again and the event_mutex + * is still held, then the event_file_data() can be used and it + * is guaranteed to be valid. + */ +static inline struct trace_event_file *event_file_file(struct file *filp) +{ + struct trace_event_file *file; + + lockdep_assert_held(&event_mutex); + file = READ_ONCE(file_inode(filp)->i_private); + if (!file || file->flags & EVENT_FILE_FL_FREED) + return NULL; + return file; +} + extern const struct file_operations event_trigger_fops; extern const struct file_operations event_hist_fops; extern const struct file_operations event_hist_debug_fops; diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 6ef29eba90ce..7266ec2a4eea 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -992,18 +992,18 @@ static void remove_subsystem(struct trace_subsystem_dir *dir) void event_file_get(struct trace_event_file *file) { - atomic_inc(&file->ref); + refcount_inc(&file->ref); } void event_file_put(struct trace_event_file *file) { - if (WARN_ON_ONCE(!atomic_read(&file->ref))) { + if (WARN_ON_ONCE(!refcount_read(&file->ref))) { if (file->flags & EVENT_FILE_FL_FREED) kmem_cache_free(file_cachep, file); return; } - if (atomic_dec_and_test(&file->ref)) { + if (refcount_dec_and_test(&file->ref)) { /* Count should only go to zero when it is freed */ if (WARN_ON_ONCE(!(file->flags & EVENT_FILE_FL_FREED))) return; @@ -1386,12 +1386,12 @@ event_enable_read(struct file *filp, char __user *ubuf, size_t cnt, char buf[4] = "0"; mutex_lock(&event_mutex); - file = event_file_data(filp); + file = event_file_file(filp); if (likely(file)) flags = file->flags; mutex_unlock(&event_mutex); - if (!file || flags & EVENT_FILE_FL_FREED) + if (!file) return -ENODEV; if (flags & EVENT_FILE_FL_ENABLED && @@ -1424,8 +1424,8 @@ event_enable_write(struct file *filp, const char __user *ubuf, size_t cnt, case 1: ret = -ENODEV; mutex_lock(&event_mutex); - file = event_file_data(filp); - if (likely(file && !(file->flags & EVENT_FILE_FL_FREED))) { + file = event_file_file(filp); + if (likely(file)) { ret = tracing_update_buffers(file->tr); if (ret < 0) { mutex_unlock(&event_mutex); @@ -1540,7 +1540,8 @@ enum { static void *f_next(struct seq_file *m, void *v, loff_t *pos) { - struct trace_event_call *call = event_file_data(m->private); + struct trace_event_file *file = event_file_data(m->private); + struct trace_event_call *call = file->event_call; struct list_head *common_head = &ftrace_common_fields; struct list_head *head = trace_get_fields(call); struct list_head *node = v; @@ -1572,7 +1573,8 @@ static void *f_next(struct seq_file *m, void *v, loff_t *pos) static int f_show(struct seq_file *m, void *v) { - struct trace_event_call *call = event_file_data(m->private); + struct trace_event_file *file = event_file_data(m->private); + struct trace_event_call *call = file->event_call; struct ftrace_event_field *field; const char *array_descriptor; @@ -1627,12 +1629,14 @@ static int f_show(struct seq_file *m, void *v) static void *f_start(struct seq_file *m, loff_t *pos) { + struct trace_event_file *file; void *p = (void *)FORMAT_HEADER; loff_t l = 0; /* ->stop() is called even if ->start() fails */ mutex_lock(&event_mutex); - if (!event_file_data(m->private)) + file = event_file_file(m->private); + if (!file) return ERR_PTR(-ENODEV); while (l < *pos && p) @@ -1706,8 +1710,8 @@ event_filter_read(struct file *filp, char __user *ubuf, size_t cnt, trace_seq_init(s); mutex_lock(&event_mutex); - file = event_file_data(filp); - if (file && !(file->flags & EVENT_FILE_FL_FREED)) + file = event_file_file(filp); + if (file) print_event_filter(file, s); mutex_unlock(&event_mutex); @@ -1736,9 +1740,13 @@ event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt, return PTR_ERR(buf); mutex_lock(&event_mutex); - file = event_file_data(filp); - if (file) - err = apply_event_filter(file, buf); + file = event_file_file(filp); + if (file) { + if (file->flags & EVENT_FILE_FL_FREED) + err = -ENODEV; + else + err = apply_event_filter(file, buf); + } mutex_unlock(&event_mutex); kfree(buf); @@ -2485,7 +2493,6 @@ static int event_callback(const char *name, umode_t *mode, void **data, if (strcmp(name, "format") == 0) { *mode = TRACE_MODE_READ; *fops = &ftrace_event_format_fops; - *data = call; return 1; } @@ -2996,7 +3003,7 @@ trace_create_new_event(struct trace_event_call *call, atomic_set(&file->tm_ref, 0); INIT_LIST_HEAD(&file->triggers); list_add(&file->list, &tr->events); - event_file_get(file); + refcount_set(&file->ref, 1); return file; } diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index 6ece1308d36a..5f9119eb7c67 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -5601,7 +5601,7 @@ static int hist_show(struct seq_file *m, void *v) mutex_lock(&event_mutex); - event_file = event_file_data(m->private); + event_file = event_file_file(m->private); if (unlikely(!event_file)) { ret = -ENODEV; goto out_unlock; @@ -5880,7 +5880,7 @@ static int hist_debug_show(struct seq_file *m, void *v) mutex_lock(&event_mutex); - event_file = event_file_data(m->private); + event_file = event_file_file(m->private); if (unlikely(!event_file)) { ret = -ENODEV; goto out_unlock; diff --git a/kernel/trace/trace_events_inject.c b/kernel/trace/trace_events_inject.c index 8650562bdaa9..a8f076809db4 100644 --- a/kernel/trace/trace_events_inject.c +++ b/kernel/trace/trace_events_inject.c @@ -299,7 +299,7 @@ event_inject_write(struct file *filp, const char __user *ubuf, size_t cnt, strim(buf); mutex_lock(&event_mutex); - file = event_file_data(filp); + file = event_file_file(filp); if (file) { call = file->event_call; size = parse_entry(buf, call, &entry); diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c index 4bec043c8690..a5e3d6acf1e1 100644 --- a/kernel/trace/trace_events_trigger.c +++ b/kernel/trace/trace_events_trigger.c @@ -159,7 +159,7 @@ static void *trigger_start(struct seq_file *m, loff_t *pos) /* ->stop() is called even if ->start() fails */ mutex_lock(&event_mutex); - event_file = event_file_data(m->private); + event_file = event_file_file(m->private); if (unlikely(!event_file)) return ERR_PTR(-ENODEV); @@ -213,7 +213,7 @@ static int event_trigger_regex_open(struct inode *inode, struct file *file) mutex_lock(&event_mutex); - if (unlikely(!event_file_data(file))) { + if (unlikely(!event_file_file(file))) { mutex_unlock(&event_mutex); return -ENODEV; } @@ -293,7 +293,7 @@ static ssize_t event_trigger_regex_write(struct file *file, strim(buf); mutex_lock(&event_mutex); - event_file = event_file_data(file); + event_file = event_file_file(file); if (unlikely(!event_file)) { mutex_unlock(&event_mutex); kfree(buf); diff --git a/kernel/trace/tracing_map.c b/kernel/trace/tracing_map.c index a4dcf0f24352..3a56e7c8aa4f 100644 --- a/kernel/trace/tracing_map.c +++ b/kernel/trace/tracing_map.c @@ -454,7 +454,7 @@ static struct tracing_map_elt *get_free_elt(struct tracing_map *map) struct tracing_map_elt *elt = NULL; int idx; - idx = atomic_inc_return(&map->next_elt); + idx = atomic_fetch_add_unless(&map->next_elt, 1, map->max_elts); if (idx < map->max_elts) { elt = *(TRACING_MAP_ELT(map->elts, idx)); if (map->ops && map->ops->elt_init) @@ -699,7 +699,7 @@ void tracing_map_clear(struct tracing_map *map) { unsigned int i; - atomic_set(&map->next_elt, -1); + atomic_set(&map->next_elt, 0); atomic64_set(&map->hits, 0); atomic64_set(&map->drops, 0); @@ -783,7 +783,7 @@ struct tracing_map *tracing_map_create(unsigned int map_bits, map->map_bits = map_bits; map->max_elts = (1 << map_bits); - atomic_set(&map->next_elt, -1); + atomic_set(&map->next_elt, 0); map->map_size = (1 << (map_bits + 1)); map->ops = ops; . Date: Fri, 9 Aug 2024 11:53:51 +0100 From: Andi Shyti To: Wolfram Sang Cc: linux-i2c , lkml , Gaosheng Cui , Vladimir Zapolskiy Subject: [GIT PULL] i2c-host-fixes for v6.11-rc3 Hi Wolfram, two fixes from Gaosheng in this pull request on the Qualcomm Geni device. Thanks Gaosheng and Vladimir for the reviews. Wish you a great weekend, Andi The following changes since commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed: Linux 6.11-rc2 (2024-08-04 13:50:53 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git tags/i2c-host-fixes-6.11-rc3 for you to fetch changes up to 9ba48db9f77ce0001dbb882476fa46e092feb695: i2c: qcom-geni: Add missing geni_icc_disable in geni_i2c_runtime_resume (2024-08-07 01:12:14 +0100) ---------------------------------------------------------------- Two fixes on the Qualcomm GENI I2C controller are cleaning up the error exit patch in the runtime_resume() function. The first is disabling the clock, the second disables the icc on the way out. ---------------------------------------------------------------- Gaosheng Cui (2): i2c: qcom-geni: Add missing clk_disable_unprepare in geni_i2c_runtime_resume i2c: qcom-geni: Add missing geni_icc_disable in geni_i2c_runtime_resume drivers/i2c/busses/i2c-qcom-geni.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) . Date: Fri, 09 Aug 2024 14:49:43 +0200 From: Takashi Iwai To: Linus Torvalds Cc: Mark Brown , Liam Girdwood , Linux Sound Mailing List , Linux Kernel Mailing List Subject: [GIT PULL] sound fixes for 6.11-rc3 Linus, please pull sound fixes for v6.11-rc3 from: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-6.11-rc3 The topmost commit is d3e82ced462b4ed956504b62603a11d52a599f99 ---------------------------------------------------------------- sound fixes for 6.11-rc3 A collection of lots of small changes, almost all device-specific. - A series of fixes for ASoC Qualcomm stuff - Various fixes for Cirrus ASoC and HD-audio codecs - A few AMD ASoC quirks and usual HD-audio quirks - Other misc fixes, including a long-time regression in USB-audio ---------------------------------------------------------------- Bruno Ancona (1): ASoC: amd: yc: Support mic on HP 14-em0002la Charles Keepax (5): ASoC: cs42l43: Remove redundant semi-colon at end of function ASoC: soc-component: Add new snd_soc_component_get_kcontrol() helpers ASoC: cs35l45: Use new snd_soc_component_get_kcontrol_locked() helper ASoC: cs42l43: Cache shutter IRQ control pointers MAINTAINERS: Update Cirrus Logic parts to linux-sound mailing list Curtis Malainey (1): ASoC: SOF: Remove libraries from topology lookups Dustin L. Howett (1): ALSA: hda/realtek: Add Framework Laptop 13 (Intel Core Ultra) to quirks Francesco Dolcini (1): ASoC: nau8822: Lower debug print priority Jerome Audu (1): ASoC: sti: add missing probe entry for player and reader Jerome Brunet (1): ASoC: meson: axg-fifo: fix irq scheduling issue with PREEMPT_RT Johan Hovold (1): ASoC: codecs: lpass-macro: fix missing codec version Krzysztof Kozlowski (10): ASoC: codecs: wcd937x-sdw: Correct Soundwire ports mask ASoC: codecs: wcd938x-sdw: Correct Soundwire ports mask ASoC: codecs: wcd939x-sdw: Correct Soundwire ports mask ASoC: codecs: wsa881x: Correct Soundwire ports mask ASoC: codecs: wsa883x: Correct Soundwire ports mask ASoC: codecs: wsa884x: Correct Soundwire ports mask ASoC: dt-bindings: qcom,wcd937x: Correct reset GPIO polarity in example ASoC: dt-bindings: qcom,wcd934x: Correct reset GPIO polarity in example ASoC: dt-bindings: qcom,wcd938x: Correct reset GPIO polarity in example ASoC: dt-bindings: qcom,wcd939x: Correct reset GPIO polarity in example Krzysztof Stępniak (1): ASoC: amd: yc: Support mic on Lenovo Thinkpad E14 Gen 6 Paul Handrigan (1): ASoC: cs530x: Change IN HPF Select kcontrol name Richard Fitzgerald (2): ASoC: cs-amp-lib: Fix NULL pointer crash if efi.get_variable is NULL ASoC: cs35l56: Handle OTP read latency over SoundWire Shengjiu Wang (2): ASoC: fsl_micfil: Expand the range of FIFO watermark mask ASoC: fsl_micfil: Differentiate register access permission for platforms Simon Trimmer (4): ALSA: hda: cs35l56: Stop creating ALSA controls for firmware coefficients ASoC: wm_adsp: Add control_add callback and export wm_adsp_control_add() ASoC: cs35l56: Stop creating ALSA controls for firmware coefficients ASoC: cs35l56: Patch CS35L56_IRQ1_MASK_18 to the default value Stefan Binding (1): ALSA: hda: cs35l41: Stop creating ALSA Controls for firmware coefficients Steven 'Steve' Kendall (1): ALSA: hda: Add HP MP9 G4 Retail System AMS to force connect list Takashi Iwai (4): ALSA: line6: Fix racy access to midibuf ALSA: hda/hdmi: Yet more pin fix for HP EliteDesk 800 G4 ALSA: usb-audio: Re-add ScratchAmp quirk entries ASoC: amd: yc: Add quirk entry for OMEN by HP Gaming Laptop 16-n0xxx Zhang Yi (1): ASoC: codecs: ES8326: button detect issue --- .../devicetree/bindings/sound/qcom,wcd934x.yaml | 3 +- .../devicetree/bindings/sound/qcom,wcd937x.yaml | 2 +- .../devicetree/bindings/sound/qcom,wcd938x.yaml | 3 +- .../devicetree/bindings/sound/qcom,wcd939x.yaml | 4 +- MAINTAINERS | 4 +- include/sound/cs35l56.h | 5 ++ include/sound/soc-component.h | 5 ++ sound/pci/hda/cs35l41_hda.c | 13 ---- sound/pci/hda/cs35l56_hda.c | 38 +---------- sound/pci/hda/cs35l56_hda.h | 1 - sound/pci/hda/patch_hdmi.c | 2 + sound/pci/hda/patch_realtek.c | 1 + sound/soc/amd/yc/acp6x-mach.c | 21 ++++++ sound/soc/codecs/cs-amp-lib.c | 2 +- sound/soc/codecs/cs35l45.c | 11 +--- sound/soc/codecs/cs35l56-sdw.c | 77 ++++++++++++++++++++++ sound/soc/codecs/cs35l56-shared.c | 1 + sound/soc/codecs/cs35l56.c | 11 ++++ sound/soc/codecs/cs42l43.c | 75 ++++++++++++++++----- sound/soc/codecs/cs42l43.h | 2 + sound/soc/codecs/cs530x.c | 8 +-- sound/soc/codecs/es8326.c | 2 + sound/soc/codecs/lpass-va-macro.c | 2 + sound/soc/codecs/nau8822.c | 2 +- sound/soc/codecs/wcd937x-sdw.c | 4 +- sound/soc/codecs/wcd938x-sdw.c | 4 +- sound/soc/codecs/wcd939x-sdw.c | 4 +- sound/soc/codecs/wm_adsp.c | 17 ++++- sound/soc/codecs/wm_adsp.h | 3 + sound/soc/codecs/wsa881x.c | 2 +- sound/soc/codecs/wsa883x.c | 2 +- sound/soc/codecs/wsa884x.c | 2 +- sound/soc/fsl/fsl_micfil.c | 20 ++++-- sound/soc/fsl/fsl_micfil.h | 2 +- sound/soc/meson/axg-fifo.c | 26 +++----- sound/soc/soc-component.c | 42 +++++++++--- sound/soc/sof/mediatek/mt8195/mt8195.c | 2 +- sound/soc/sti/sti_uniperif.c | 2 +- sound/soc/sti/uniperif.h | 1 + sound/soc/sti/uniperif_player.c | 1 + sound/soc/sti/uniperif_reader.c | 1 + sound/usb/line6/driver.c | 5 ++ sound/usb/quirks-table.h | 4 ++ 43 files changed, 304 insertions(+), 135 deletions(-) . Date: Sat, 10 Aug 2024 00:23:45 +0900 From: Masami Hiramatsu (Google) To: Linus Torvalds Cc: Masami Hiramatsu (Google) , Menglong Dong , Steven Rostedt , Masami Hiramatsu , linux-kernel@vger.kernel.org Subject: [GIT PULL] probes: Fixes for v6.11-rc2 Hi Linus, Probes fixes for v6.11-rc2: - kprobes: Fix misusing str_has_prefix() parameter order to check symbol prefix correctly. - bpf: kprobe: remove unused declaring of bpf_kprobe_override. Please pull the latest probes-fixes-v6.11-rc2 tree, which can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git probes-fixes-v6.11-rc2 Tag SHA1: 495cd5d4c81ddcbaf8f5e2d7768292adc7309e2a Head SHA1: 8c8acb8f26cbde665b233dd1b9bbcbb9b86822dc Masami Hiramatsu (Google) (1): kprobes: Fix to check symbol prefixes correctly Menglong Dong (1): bpf: kprobe: remove unused declaring of bpf_kprobe_override ---- include/linux/trace_events.h | 1 - kernel/kprobes.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) --------------------------- diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index 9df3e2973626..9435185c10ef 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -880,7 +880,6 @@ do { \ struct perf_event; DECLARE_PER_CPU(struct pt_regs, perf_trace_regs); -DECLARE_PER_CPU(int, bpf_kprobe_override); extern int perf_trace_init(struct perf_event *event); extern void perf_trace_destroy(struct perf_event *event); diff --git a/kernel/kprobes.c b/kernel/kprobes.c index e85de37d9e1e..da59c68df841 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1557,8 +1557,8 @@ static bool is_cfi_preamble_symbol(unsigned long addr) if (lookup_symbol_name(addr, symbuf)) return false; - return str_has_prefix("__cfi_", symbuf) || - str_has_prefix("__pfx_", symbuf); + return str_has_prefix(symbuf, "__cfi_") || + str_has_prefix(symbuf, "__pfx_"); } static int check_kprobe_address_safe(struct kprobe *p, -- Masami Hiramatsu (Google) . Date: Fri, 09 Aug 2024 18:00:11 +0200 From: "Arnd Bergmann" To: "Linus Torvalds" Cc: soc@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] ARM: soc fixes for 6.11, part 1 The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f0= 17b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git tags/arm-f= ixes-6.11-1 for you to fetch changes up to 6b1124c4526fb1648a3921a441515ea8a98b92e4: Merge tag 'ti-k3-dt-fixes-for-v6.11' of https://git.kernel.org/pub/scm= /linux/kernel/git/ti/linux into arm/fixes (2024-08-07 14:45:45 +0200) ---------------------------------------------------------------- ARM: soc fixes for 6.11, part 1 There are three sets of patches for the soc tree: - Marek Beh=C3=BAn addresses multiple build time regressions caused by changes to the cznic turris-omnia support - Dmitry Torokhov fixes a regression in the legacy "gumstix" board code he cleaned up earlier - The TI K3 maintainers found multiple bugs in the in gpio, audio and pcie devicetree nodes. ---------------------------------------------------------------- Andrew Halaney (2): arm64: dts: ti: k3-j784s4-evm: Assign only lanes 0 and 1 to PCIe1 arm64: dts: ti: k3-j784s4-evm: Consolidate serdes0 references Arnd Bergmann (1): Merge tag 'ti-k3-dt-fixes-for-v6.11' of https://git.kernel.org/pub= /scm/linux/kernel/git/ti/linux into arm/fixes Dmitry Torokhov (1): ARM: pxa/gumstix: fix attaching properties to vbus gpio device Francesco Dolcini (1): arm64: dts: ti: k3-am62-verdin-dahlia: Keep CTRL_SLEEP_MOCI# regul= ator on Jared McArthur (3): arm64: dts: ti: k3-am62p: Add gpio-ranges for mcu_gpio0 arm64: dts: ti: k3-am62p: Fix gpio-range for main_pmx0 arm64: dts: ti: k3-j722s: Fix gpio-range for main_pmx0 Marek Beh=C3=BAn (6): platform: cznic: turris-omnia-mcu: Make watchdog code optional platform: cznic: turris-omnia-mcu: Make TRNG code optional platform: cznic: turris-omnia-mcu: Make poweroff and wakeup code o= ptional platform: cznic: turris-omnia-mcu: Make GPIO code optional doc: platform: cznic: turris-omnia-mcu: Fix sphinx-build warning doc: platform: cznic: turris-omnia-mcu: Use double backticks for a= ttribute value Nishanth Menon (1): Merge tag 'ti-k3-dt-for-v6.11-part2' into ti-k3-dts-next Parth Pancholi (1): arm64: dts: ti: k3-j784s4-main: Correct McASP DMAs .../testing/sysfs-bus-i2c-devices-turris-omnia-mcu | 6 +- arch/arm/mach-pxa/gumstix.c | 11 +-- arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi | 22 ------ arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 6 -- .../boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi | 2 + arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 3 +- arch/arm64/boot/dts/ti/k3-j722s-main.dtsi | 3 +- arch/arm64/boot/dts/ti/k3-j784s4-evm.dts | 25 +++---- arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 4 +- drivers/platform/cznic/Kconfig | 80 +++++++++++++++= ------- drivers/platform/cznic/Makefile | 8 +-- drivers/platform/cznic/turris-omnia-mcu-base.c | 4 ++ drivers/platform/cznic/turris-omnia-mcu.h | 42 +++++++++++- 13 files changed, 129 insertions(+), 87 deletions(-) . Date: Fri, 09 Aug 2024 17:59:35 +0200 From: "Arnd Bergmann" To: "Linus Torvalds" Cc: linux-kernel@vger.kernel.org, Linux-Arch , "Rudi Heitbaum" , "Jakub Jelinek" Subject: [GIT PULL] asm-generic fixes for 6.11, part 2 The following changes since commit 343416f0c11c42bed07f6db03ca599f4f1771b17: syscalls: fix syscall macros for newfstat/newfstatat (2024-08-02 15:20:47 +0200) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git tags/asm-generic-fixes-6.11-2 for you to fetch changes up to b82c1d235a30622177ce10dcb94dfd691a49922f: syscalls: add back legacy __NR_nfsservctl macro (2024-08-06 08:57:02 +0200) ---------------------------------------------------------------- asm-generic fixes for 6.11, part 2 There are two more changes to the syscall.tbl conversion: the '__NR_newfstat' in the previous bugfix was a mistake and gets reverted now, after triple-checking that the contents are now back to what they were on all architectures. The __NR_nfsservctl definition is not really needed but came up in the same discussion as it had previously been defined in uapi/asm-generic/unistd.h and tested for in user space. TThere are a few more symbols that used to be defined in the old unistd.h file, but that are never defined on any other architecture using syscall.tbl format. These used to be needed inside of the kernel: __NR_syscalls __NR_arch_specific_syscall __NR3264_* Searching for these on https://codesearch.debian.net/ shows a few packages (rustc, golang, clamav, libseccomp, librsvg, strace) that duplicate all the macros from asm/unistd.h, but nothing that actually uses the macros, so I concluded that they are fine to omit after all. ---------------------------------------------------------------- Arnd Bergmann (2): syscalls: fix fstat() entry again syscalls: add back legacy __NR_nfsservctl macro scripts/syscall.tbl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/syscall.tbl b/scripts/syscall.tbl index 4586a18dfe9b..845e24eb372e 100644 --- a/scripts/syscall.tbl +++ b/scripts/syscall.tbl @@ -53,6 +53,7 @@ 39 common umount2 sys_umount 40 common mount sys_mount 41 common pivot_root sys_pivot_root +42 common nfsservctl sys_ni_syscall 43 32 statfs64 sys_statfs64 compat_sys_statfs64 43 64 statfs sys_statfs 44 32 fstatfs64 sys_fstatfs64 compat_sys_fstatfs64 @@ -100,7 +101,7 @@ 79 stat64 fstatat64 sys_fstatat64 79 64 newfstatat sys_newfstatat 80 stat64 fstat64 sys_fstat64 -80 64 newfstat sys_newfstat +80 64 fstat sys_newfstat 81 common sync sys_sync 82 common fsync sys_fsync 83 common fdatasync sys_fdatasync . Date: Fri, 9 Aug 2024 19:07:18 +0200 From: "Rafael J. Wysocki" To: Linus Torvalds Cc: Linux PM , Linux Kernel Mailing List Subject: [GIT PULL] Power management update for v6.11-rc3 Hi Linus, Please pull from the tag git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \ pm-6.11-rc3 with top-most commit 64a66f4a3c89b4602ee1e6cd23b28729fc4562b3 cpufreq: intel_pstate: Update Balance performance EPP for Emerald Rapids on top of commit 8400291e289ee6b2bf9779ff1c83a291501f017b Linux 6.11-rc1 to receive a power management update for 6.11-rc3. This changes the default EPP (energy-performance preference) value for the Emerald Rapids processor in the intel_pstate driver which should improve both the performance and energy efficiency (Pedro Henrique Kopper). Thanks! --------------- Pedro Henrique Kopper (1): cpufreq: intel_pstate: Update Balance performance EPP for Emerald Rapids --------------- drivers/cpufreq/intel_pstate.c | 1 + 1 file changed, 1 insertion(+) . Date: Fri, 9 Aug 2024 11:11:13 -0700 From: Yury Norov To: Linus Torvalds , Linux Kernel Mailing List Cc: linux-arm-kernel@lists.infradead.org, yury.norov@gmail.com, linux@rasmusvillemoes.dk, Jonathan.Cameron@huawei.com, salil.mehta@huawei.com, shan.gavin@gmail.com Subject: [GIT PULL] cpumask fix for 6.11-rc The following changes since commit 5819e464a17587e6830cfab05f3e91a9a8753a41: cpumask: Fix crash on updating CPU enabled mask (2024-08-08 10:39:41 -0700) are available in the Git repository at: https://github.com/norov/linux.git tags/bitmap-6.11-rc for you to fetch changes up to 5819e464a17587e6830cfab05f3e91a9a8753a41: cpumask: Fix crash on updating CPU enabled mask (2024-08-08 10:39:41 -0700) ---------------------------------------------------------------- cpumask fix for 6.11-rc Hi Linus, Please pull the fix for set_cpu_enabled(). Thanks, Yury ---------------------------------------------------------------- . Date: Sat, 10 Aug 2024 06:00:08 +1000 From: Dave Airlie To: Linus Torvalds , Daniel Vetter Cc: dri-devel , LKML Subject: [git pull] drm fixes for 6.11-rc3 Hi Linus, Weekly regular fixes, mostly amdgpu with i915/xe having a few each, and then some misc bits across the board, seems about right for rc3 time. Regards, Dave. drm-fixes-2024-08-10: drm fixes for 6.11-rc3 client: - fix null ptr deref bridge: - connector: fix double free atomic: - fix async flip update panel: - document panel omap: - add config dependency tests: - fix gem shmem test drm buddy: - Add start address to trim function amdgpu: - DMCUB fix - Fix DET programming on some DCNs - DCC fixes - DCN 4.0.1 fixes - SMU 14.0.x update - MMHUB fix - DCN 3.1.4 fix - GC 12.0 fixes - Fix soft recovery error propogation - SDMA 7.0 fixes - DSC fix xe: - Fix off-by-one when processing RTP rules - Use dma_fence_chain_free in chain fence unused as a sync - Fix PL1 disable flow in xe_hwmon_power_max_write - Take ref to VM in delayed dump snapshot i915: - correct dual pps handling for MTL_PCH+ [display] - Adjust vma offset for framebuffer mmap offset [gem] - Fix Virtual Memory mapping boundaries calculation [gem] - Allow evicting to use the requested placement - Attempt to get pages without eviction first The following changes since commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed: Linux 6.11-rc2 (2024-08-04 13:50:53 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/drm/kernel.git tags/drm-fixes-2024-08-10 for you to fetch changes up to 06f5b920d1d0b686d794426264dc39aa8582db14: Merge tag 'drm-intel-fixes-2024-08-08' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes (2024-08-09 17:16:29 +1000) ---------------------------------------------------------------- drm fixes for 6.11-rc3 client: - fix null ptr deref bridge: - connector: fix double free atomic: - fix async flip update panel: - document panel omap: - add config dependency tests: - fix gem shmem test drm buddy: - Add start address to trim function amdgpu: - DMCUB fix - Fix DET programming on some DCNs - DCC fixes - DCN 4.0.1 fixes - SMU 14.0.x update - MMHUB fix - DCN 3.1.4 fix - GC 12.0 fixes - Fix soft recovery error propogation - SDMA 7.0 fixes - DSC fix xe: - Fix off-by-one when processing RTP rules - Use dma_fence_chain_free in chain fence unused as a sync - Fix PL1 disable flow in xe_hwmon_power_max_write - Take ref to VM in delayed dump snapshot i915: - correct dual pps handling for MTL_PCH+ [display] - Adjust vma offset for framebuffer mmap offset [gem] - Fix Virtual Memory mapping boundaries calculation [gem] - Allow evicting to use the requested placement - Attempt to get pages without eviction first ---------------------------------------------------------------- Andi Shyti (2): drm/i915/gem: Adjust vma offset for framebuffer mmap offset drm/i915/gem: Fix Virtual Memory mapping boundaries calculation Arnd Bergmann (1): drm/omap: add CONFIG_MMU dependency Arunpravin Paneer Selvam (3): drm/buddy: Add start address support to trim function drm/amdgpu: Add address alignment support to DCC buffers drm/amdgpu: Add DCC GFX12 flag to enable address alignment Cristian Ciocaltea (1): drm/bridge-connector: Fix double free in error handling paths Dave Airlie (5): drm/test: fix the gem shmem test to map the sg table. Merge tag 'drm-misc-fixes-2024-08-08' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Merge tag 'amd-drm-fixes-6.11-2024-08-08' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes Merge tag 'drm-xe-fixes-2024-08-08' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Merge tag 'drm-intel-fixes-2024-08-08' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes David Gow (2): drm/i915: Allow evicting to use the requested placement drm/i915: Attempt to get pages without eviction first Dnyaneshwar Bhadane (1): drm/i915/display: correct dual pps handling for MTL_PCH+ Fangzhi Zuo (1): drm/amd/display: Skip Recompute DSC Params if no Stream on Link Frank Min (2): drm/amdgpu: change non-dcc buffer copy configuration drm/amdgpu: correct sdma7 max dw Joshua Ashton (1): drm/amdgpu: Forward soft recovery errors to userspace Karthik Poosa (1): drm/xe/hwmon: Fix PL1 disable flow in xe_hwmon_power_max_write Kenneth Feng (1): drm/amd/pm: update powerplay structure on smu v14.0.2/3 Likun Gao (2): drm/amdgpu: force to use legacy inv in mmhub drm/amdgpu: add golden setting for gc v12 Lucas De Marchi (1): drm/xe/rtp: Fix off-by-one when processing rules Ma Ke (1): drm/client: fix null pointer dereference in drm_client_modeset_probe Matthew Brost (2): drm/xe: Use dma_fence_chain_free in chain fence unused as a sync drm/xe: Take ref to VM in delayed snapshot Rob Clark (1): dt-bindings: display: panel: samsung,atna45dc02: Document ATNA45DC02 Rodrigo Siqueira (6): drm/amd/display: Replace dm_execute_dmub_cmd with dc_wake_and_execute_dmub_cmd drm/amd/display: Add missing DET segments programming drm/amd/display: Add dcc propagation value drm/amd/display: Add missing mcache registers drm/amd/display: Add missing DCN314 to the DML Makefile drm/amd/display: Add missing program DET segment call to pipe init Simon Ser (1): drm/atomic: allow no-op FB_ID updates for async flips .../bindings/display/panel/samsung,atna33xc20.yaml | 9 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 6 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 36 +++++++++++++- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 27 +++++++++++ drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 18 +++++++ drivers/gpu/drm/amd/amdgpu/mmhub_v4_1_0.c | 3 +- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 7 +-- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 ++ drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c | 3 +- drivers/gpu/drm/amd/display/dc/dml/Makefile | 2 + .../drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 2 + .../drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 2 + .../display/dc/resource/dcn401/dcn401_resource.c | 1 + .../display/dc/resource/dcn401/dcn401_resource.h | 4 +- .../gpu/drm/amd/pm/swsmu/inc/smu_v14_0_2_pptable.h | 52 +++++++++++++++++--- drivers/gpu/drm/drm_atomic_uapi.c | 15 ++---- drivers/gpu/drm/drm_bridge_connector.c | 8 +--- drivers/gpu/drm/drm_buddy.c | 25 +++++++++- drivers/gpu/drm/drm_client_modeset.c | 5 ++ drivers/gpu/drm/i915/display/intel_backlight.c | 3 ++ drivers/gpu/drm/i915/display/intel_pps.c | 3 ++ drivers/gpu/drm/i915/gem/i915_gem_mman.c | 55 +++++++++++++++++++--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 13 ++--- drivers/gpu/drm/omapdrm/Kconfig | 1 + drivers/gpu/drm/tests/drm_gem_shmem_test.c | 11 +++++ drivers/gpu/drm/xe/xe_hwmon.c | 3 +- drivers/gpu/drm/xe/xe_lrc.c | 15 +++++- drivers/gpu/drm/xe/xe_rtp.c | 2 +- drivers/gpu/drm/xe/xe_sync.c | 2 +- drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 2 +- include/drm/drm_buddy.h | 2 + 32 files changed, 287 insertions(+), 56 deletions(-) . Date: Fri, 9 Aug 2024 20:36:33 -0500 From: Steve French To: Linus Torvalds Cc: CIFS , LKML Subject: [GIT PULL] smb3 client fxies Please pull the following changes since commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed: Linux 6.11-rc2 (2024-08-04 13:50:53 -0700) are available in the Git repository at: git://git.samba.org/sfrench/cifs-2.6.git tags/6.11-rc2-smb3-client-fixes for you to fetch changes up to 36bb22a08a69d9984a8399c07310d18b115eae20: cifs: cifs_inval_name_dfs_link_error: correct the check for fullpath (2024-08-08 20:06:22 -0500) ---------------------------------------------------------------- Three small smb3 client fixes including two for stable - DFS fix - fix for security flags for requiring encryption - minor cleanup ---------------------------------------------------------------- Gleb Korobeynikov (1): cifs: cifs_inval_name_dfs_link_error: correct the check for fullpath Steve French (1): smb3: fix setting SecurityFlags when encryption is required Xiaxi Shen (1): Fix spelling errors in Server Message Block Documentation/admin-guide/cifs/usage.rst | 2 +- fs/smb/client/cifs_debug.c | 2 +- fs/smb/client/cifsglob.h | 12 ++++++------ fs/smb/client/misc.c | 11 ++++++----- fs/smb/client/smb2pdu.c | 3 +++ fs/smb/client/smbdirect.c | 8 ++++---- fs/smb/client/transport.c | 2 +- 7 files changed, 22 insertions(+), 18 deletions(-) -- Thanks, Steve . Date: Sat, 10 Aug 2024 00:34:08 +0100 From: Mark Brown To: Linus Torvalds Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown Subject: [GIT PULL] SPI fixes for v6.11-rc2 The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git tags/spi-fix-v6.11-rc2 for you to fetch changes up to 730bbfaf7d4890bd99e637db7767dc68cfeb24e7: spi: spi-fsl-lpspi: Fix scldiv calculation (2024-08-07 23:45:12 +0100) ---------------------------------------------------------------- spi: Fixes for v6.11 A few SPI fixes since the merge window, clock rate calculation fixes for the Kunpeng and lpsi drivers and a missing registration of a device ID for spidev (which had only been updated for DT cases, causing warnings). ---------------------------------------------------------------- Devyn Liu (2): spi: hisi-kunpeng: Add validation for the minimum value of speed_hz spi: hisi-kunpeng: Add verification for the max_frequency provided by the firmware Geert Uytterhoeven (1): spi: spidev: Add missing spi_device_id for bh2228fv Stefan Wahren (1): spi: spi-fsl-lpspi: Fix scldiv calculation drivers/spi/spi-fsl-lpspi.c | 6 ++++-- drivers/spi/spi-hisi-kunpeng.c | 4 ++++ drivers/spi/spidev.c | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) . Date: Sat, 10 Aug 2024 08:29:14 +0200 From: Christoph Hellwig To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, iommu@lists.linux.dev Subject: [GIT PULL] dma-mapping fix for Linux 6.11 The following changes since commit 94ede2a3e9135764736221c080ac7c0ad993dc2d: profiling: remove stale percpu flip buffer variables (2024-07-29 16:34:17 -0700) are available in the Git repository at: git://git.infradead.org/users/hch/dma-mapping.git tags/dma-mapping-6.11-2024-08-10 for you to fetch changes up to bd44ca3de49cc1badcff7a96010fa2c64f04868c: dma-debug: avoid deadlock between dma debug vs printk and netconsole (2024-08-06 10:29:32 -0700) ---------------------------------------------------------------- dma-mapping fix for Linux 6.11 - avoid a deadlock with dma-debug and netconsole (Rik van Riel) ---------------------------------------------------------------- Rik van Riel (1): dma-debug: avoid deadlock between dma debug vs printk and netconsole kernel/dma/debug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) . Date: Sat, 10 Aug 2024 13:18:01 +0200 From: Wolfram Sang To: Linus Torvalds Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Rosin , Bartosz Golaszewski , Andi Shyti Subject: [PULL REQUEST] i2c-for-6.11-rc3 --+oB5Gc7SstWijNr7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The following changes since commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed: Linux 6.11-rc2 (2024-08-04 13:50:53 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git tags/i2c-for-6.11-rc3 for you to fetch changes up to 01a620d491592ead12eca039fe1c9e74908c35cf: Merge tag 'i2c-host-fixes-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current (2024-08-09 15:28:08 +0200) ---------------------------------------------------------------- i2c-for-6.11-rc3 SMBusAlert handling in the I2C core gets two fixes. One to avoid an endless loop when scanning for handlers and one to make sure handlers are always called even if HW has broken behaviour. The I2C header gets a compilation fix is ACPI is enabled but I2C isn't. The testunit gets a rename in the code to match the documentation. Two fixes on the Qualcomm GENI I2C controller are cleaning up the error exit patch in the runtime_resume() function. The first is disabling the clock, the second disables the icc on the way out. ---------------------------------------------------------------- Gaosheng Cui (2): i2c: qcom-geni: Add missing clk_disable_unprepare in geni_i2c_runtime_resume i2c: qcom-geni: Add missing geni_icc_disable in geni_i2c_runtime_resume Guenter Roeck (2): i2c: smbus: Improve handling of stuck alerts i2c: smbus: Send alert notifications to all devices if source not found Richard Fitzgerald (1): i2c: Fix conditional for substituting empty ACPI functions Wolfram Sang (2): i2c: testunit: match HostNotify test name with docs Merge tag 'i2c-host-fixes-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current with much appreciated quality assurance from ---------------------------------------------------------------- Vladimir Zapolskiy (2): (Rev.) i2c: qcom-geni: Add missing geni_icc_disable in geni_i2c_runtime_resume (Rev.) i2c: qcom-geni: Add missing clk_disable_unprepare in geni_i2c_runtime_resume Wolfram Sang (1): (Test) i2c: smbus: Improve handling of stuck alerts drivers/i2c/busses/i2c-qcom-geni.c | 5 ++- drivers/i2c/i2c-slave-testunit.c | 4 +-- drivers/i2c/i2c-smbus.c | 64 +++++++++++++++++++++++++++++++++----- include/linux/i2c.h | 2 +- 4 files changed, 64 insertions(+), 11 deletions(-) --+oB5Gc7SstWijNr7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAma3TGQACgkQFA3kzBSg KbZ4Kw/9FcqLUEB0fCwAg2JvxRqEO1Eav/SwbswJxWe/qEC1qFY/OJ74zg6iNKye 4XGyERDS+nKBYCQWsfe3nCHH2AI9+q5+d0JGv3wJGAaIjisxZRxL+BTb9S3Qw7hI xP6/iRBH6ZVFPpUyP/zTJoiFDSwjbxIeRVM1Bm33TAJTfnhFVqPCooOJOWIGuv0E DeTADWGuEpLLhOFFb52c/5CPeSWr6yiHvsV3jaep69CKbO63L1GU4CeJBShKWJcl vD+C1YJ7CqiATbtVyxc/Y5XXjPvX0J1hsmjhRcSHhsw4eOsACarP9Z7pJL7fXXCR iT4iH3HVWOT5gTUYxwSZvabqgNGn0ullZNXEqSe/idg+hjazjBznSdnT4dDceUBS qFDDMCW+RYlT5LYsnl04EFG+G44tnwTlyf02eTS+BSB1W0yuPJiVOeX+tE1/OQA6 3Nip1j0HULN6BmOjtJOc+SmEC0ZZrk/P1Ax5sfKSSqFqmIsynv5rThR24TFgH8Sb mn/H4wVRXu2f9V6zE30uCllDcWvYfWYp/CgGDZbv7zgut9k2i5vkbSLLM372rwr1 n059RwKbk9Rp2u6bRDhAMw5i+W9RpCGZ/UA7xdwjV1x4sYuLXEI4DoXkvYmFi+co ZM6bTHucu0nfHoQ/7XEUr/eH1vd09Ig/hpA2VoPnfzl43dMEp6w= =zXid -----END PGP SIGNATURE----- --+oB5Gc7SstWijNr7-- . Date: Sat, 10 Aug 2024 12:46:42 -0400 From: Kent Overstreet To: Linus Torvalds Cc: linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] bcachefs fixes for 6.11-rc3, more Hi Linus, couple last minute fixes for the new disk accounting. Cheers, Kent The following changes since commit 73dc1656f41a42849e43b945fe44d4e3d55eb6c3: bcachefs: Use bch2_wait_on_allocator() in btree node alloc path (2024-08-07 21:04:55 -0400) are available in the Git repository at: git://evilpiepirate.org/bcachefs.git tags/bcachefs-2024-08-10 for you to fetch changes up to 8a2491db7bea6ad88ec568731eafd583501f1c96: bcachefs: bcachefs_metadata_version_disk_accounting_v3 (2024-08-09 19:21:28 -0400) ---------------------------------------------------------------- bcachefs fixes for 6.11-rc2, more - fix a bug that was causing ACLs to seemingly "disappear" - new on disk format version, bcachefs_metadata_version_disk_accounting_v3 bcachefs_metadata_version_disk_accounting_v2 accidentally included padding in disk_accounting_key; fortunately, 6.11 isn't out yet so we can fix this with another version bump. ---------------------------------------------------------------- Kent Overstreet (4): bcachefs: Switch to .get_inode_acl() bcachefs: bch2_accounting_invalid() bcachefs: improve bch2_dev_usage_to_text() bcachefs: bcachefs_metadata_version_disk_accounting_v3 fs/bcachefs/acl.c | 11 +++--- fs/bcachefs/acl.h | 2 +- fs/bcachefs/alloc_foreground.c | 2 +- fs/bcachefs/bcachefs_format.h | 3 +- fs/bcachefs/buckets.c | 12 ++++--- fs/bcachefs/buckets.h | 2 +- fs/bcachefs/disk_accounting.c | 65 +++++++++++++++++++++++++++++++++++- fs/bcachefs/disk_accounting_format.h | 15 ++++----- fs/bcachefs/fs.c | 8 ++--- fs/bcachefs/replicas.c | 1 - fs/bcachefs/sb-downgrade.c | 27 ++++++++++++++- fs/bcachefs/sb-errors_format.h | 6 +++- 12 files changed, 126 insertions(+), 28 deletions(-) . Date: Sat, 10 Aug 2024 13:40:39 -0400 From: Chuck Lever To: Linus Torvalds Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, Jeff Layton Subject: [GIT PULL] nfsd fixes for v6.11 The following changes since commit 769d20028f45a4f442cfe558a32faba357a7f5e2: nfsd: nfsd_file_lease_notifier_call gets a file_lease as an argument (2024-07-12 12:58:48 -0400) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git tags/nfsd-6.11-1 for you to fetch changes up to 91da337e5d506f2c065d20529d105ca40090e320: nfsd: don't set SVC_SOCK_ANONYMOUS when creating nfsd sockets (2024-07-22 09:47:39 -0400) ---------------------------------------------------------------- nfsd-6.11 fixes: - Two minor fixes for recent changes ---------------------------------------------------------------- Arnd Bergmann (1): sunrpc: avoid -Wformat-security warning Jeff Layton (1): nfsd: don't set SVC_SOCK_ANONYMOUS when creating nfsd sockets fs/nfsd/nfsctl.c | 3 +-- net/sunrpc/svc.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) -- Chuck Lever . Date: Sun, 11 Aug 2024 09:22:51 +0100 From: James Bottomley To: Andrew Morton , Linus Torvalds Cc: linux-scsi , linux-kernel Subject: [GIT PULL] SCSI fixes for 6.11-rc2 Two core fixes: one to prevent discard type changes (seen on iSCSI) during intermittent errors and the other is fixing a lockdep problem caused by the queue limits change. One driver fix in ufs. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Li Feng (1): scsi: sd: Keep the discard mode stable Shin'ichiro Kawasaki (1): scsi: sd: Move sd_read_cpr() out of the q->limits_lock region Vamshi Gajjela (1): scsi: ufs: core: Fix hba->last_dme_cmd_tstamp timestamp updating logic And the diffstat: drivers/scsi/sd.c | 15 ++++++++++----- drivers/ufs/core/ufshcd.c | 11 ++++++++--- 2 files changed, 18 insertions(+), 8 deletions(-) With full diff below. James --- diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 8bb3a3611851..699f4f9674d9 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -2711,8 +2711,6 @@ static int read_capacity_16(struct scsi_disk *sdkp, struct scsi_device *sdp, if (buffer[14] & 0x40) /* LBPRZ */ sdkp->lbprz = 1; - - sd_config_discard(sdkp, lim, SD_LBP_WS16); } sdkp->capacity = lba + 1; @@ -3365,8 +3363,6 @@ static void sd_read_block_limits(struct scsi_disk *sdkp, sdkp->unmap_alignment = get_unaligned_be32(&vpd->data[32]) & ~(1 << 31); - sd_config_discard(sdkp, lim, sd_discard_mode(sdkp)); - config_atomic: sdkp->max_atomic = get_unaligned_be32(&vpd->data[44]); sdkp->atomic_alignment = get_unaligned_be32(&vpd->data[48]); @@ -3753,9 +3749,10 @@ static int sd_revalidate_disk(struct gendisk *disk) sd_read_block_limits_ext(sdkp); sd_read_block_characteristics(sdkp, &lim); sd_zbc_read_zones(sdkp, &lim, buffer); - sd_read_cpr(sdkp); } + sd_config_discard(sdkp, &lim, sd_discard_mode(sdkp)); + sd_print_capacity(sdkp, old_capacity); sd_read_write_protect_flag(sdkp, buffer); @@ -3808,6 +3805,14 @@ static int sd_revalidate_disk(struct gendisk *disk) if (err) return err; + /* + * Query concurrent positioning ranges after + * queue_limits_commit_update() unlocked q->limits_lock to avoid + * deadlock with q->sysfs_dir_lock and q->sysfs_lock. + */ + if (sdkp->media_present && scsi_device_supports_vpd(sdp)) + sd_read_cpr(sdkp); + /* * For a zoned drive, revalidating the zones can be done only once * the gendisk capacity is set. So if this fails, set back the gendisk diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 5e3c67e96956..0b3d0c8e0dda 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -4100,11 +4100,16 @@ static inline void ufshcd_add_delay_before_dme_cmd(struct ufs_hba *hba) min_sleep_time_us = MIN_DELAY_BEFORE_DME_CMDS_US - delta; else - return; /* no more delay required */ + min_sleep_time_us = 0; /* no more delay required */ } - /* allow sleep for extra 50us if needed */ - usleep_range(min_sleep_time_us, min_sleep_time_us + 50); + if (min_sleep_time_us > 0) { + /* allow sleep for extra 50us if needed */ + usleep_range(min_sleep_time_us, min_sleep_time_us + 50); + } + + /* update the last_dme_cmd_tstamp */ + hba->last_dme_cmd_tstamp = ktime_get(); } /** . Date: Sun, 11 Aug 2024 15:22:31 +0200 From: Greg KH To: Linus Torvalds Cc: Andrew Morton , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [GIT PULL] Char/Misc driver fixes for 6.11-rc3 The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git tags/char-misc-6.11-rc3 for you to fetch changes up to ffcf2eb4bfa24f7256de53a95182c3e3e23fdc6c: spmi: pmic-arb: add missing newline in dev_err format strings (2024-07-31 13:49:28 +0200) ---------------------------------------------------------------- Char/Misc fixes for 6.11-rc3 Here are some small char/misc/other driver fixes for 6.11-rc3 for reported issues. Included in here are: - binder driver fixes - fsi MODULE_DESCRIPTION() additions (people seem to love them...) - eeprom driver fix - Kconfig dependency fix to resolve build issues - spmi driver fixes All of these have been in linux-next for a while with no reported problems. Signed-off-by: Greg Kroah-Hartman ---------------------------------------------------------------- Armin Wolf (1): eeprom: ee1004: Fix locking issues in ee1004_probe() Arnd Bergmann (1): misc: mrvl-cn10k-dpi: add PCI_IOV dependency Carlos Llamas (1): binder: fix descriptor lookup for context manager David Collins (1): spmi: pmic-arb: add missing newline in dev_err format strings Jeff Johnson (2): fsi: add missing MODULE_DESCRIPTION() macros char: add missing NetWinder MODULE_DESCRIPTION() macros Konrad Dybcio (1): spmi: pmic-arb: Pass the correct of_node to irq_domain_add_tree Mukesh Ojha (1): binder_alloc: Fix sleeping function called from invalid context drivers/android/binder.c | 15 +++----- drivers/android/binder_alloc.c | 2 +- drivers/android/dbitmap.h | 22 ++++------- drivers/char/ds1620.c | 1 + drivers/char/nwbutton.c | 1 + drivers/char/nwflash.c | 1 + drivers/fsi/fsi-core.c | 1 + drivers/fsi/fsi-master-aspeed.c | 1 + drivers/fsi/fsi-master-ast-cf.c | 3 +- drivers/fsi/fsi-master-gpio.c | 1 + drivers/fsi/fsi-master-hub.c | 1 + drivers/fsi/fsi-scom.c | 1 + drivers/misc/Kconfig | 2 +- drivers/misc/eeprom/ee1004.c | 85 ++++++++++++++++++++++++----------------- drivers/spmi/spmi-pmic-arb.c | 11 +++--- 15 files changed, 81 insertions(+), 67 deletions(-) . Date: Sun, 11 Aug 2024 15:23:21 +0200 From: Greg KH To: Linus Torvalds , Andrew Morton Cc: linux-kernel@vger.kernel.org, Stephen Rothwell , Saravana Kannan Subject: [GIT PULL] Driver core fixes for 6.11-rc3 The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git tags/driver-core-6.11-rc3 for you to fetch changes up to 15fffc6a5624b13b428bb1c6e9088e32a55eb82c: driver core: Fix uevent_show() vs driver detach race (2024-07-31 14:41:44 +0200) ---------------------------------------------------------------- Driver Core / Documentation fixes for 6.11-rc3 Here are some small fixes, and some documentation updates for 6.11-rc3. Included in here are: - embargoed hardware documenation updates based on a lot of review by legal-types in lots of companies to try to make the process a _bit_ easier for us to manage over time. - rust firmware documentation fix - driver detach race fix for the fix that went into 6.11-rc1 All of these have been in linux-next for a while with no reported issues. Signed-off-by: Greg Kroah-Hartman ---------------------------------------------------------------- Andrew Ballance (1): rust: firmware: fix invalid rustdoc link Dan Williams (1): driver core: Fix uevent_show() vs driver detach race Greg Kroah-Hartman (2): Documentation: embargoed-hardware-issues.rst: minor cleanups and fixes Documentation: embargoed-hardware-issues.rst: add a section documenting the "early access" process .../process/embargoed-hardware-issues.rst | 153 +++++++++++++-------- drivers/base/core.c | 13 +- drivers/base/module.c | 4 + rust/kernel/firmware.rs | 2 +- 4 files changed, 109 insertions(+), 63 deletions(-) . Date: Sun, 11 Aug 2024 15:24:01 +0200 From: Greg KH To: Linus Torvalds Cc: Jiri Slaby , Stephen Rothwell , Andrew Morton , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [GIT PULL] TTY / Serial driver fixes for 6.11-rc3 The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tags/tty-6.11-rc3 for you to fetch changes up to 6e20753da6bc651e02378a0cdb78f16c42098c88: tty: vt: conmakehash: cope with abs_srctree no longer in env (2024-07-31 12:31:32 +0200) ---------------------------------------------------------------- tty/serial driver fixes for 6.11-rc3 Here are some small tty and serial driver fixes for reported problems for 6.11-rc3. Included in here are: - sc16is7xx serial driver fixes - uartclk bugfix for a divide by zero issue - conmakehash userspace build issue fix All of these have been in linux-next for a while with no reported issues. Signed-off-by: Greg Kroah-Hartman ---------------------------------------------------------------- George Kennedy (1): serial: core: check uartclk for zero to avoid divide by zero Hugo Villeneuve (2): serial: sc16is7xx: fix TX fifo corruption serial: sc16is7xx: fix invalid FIFO access with special register set Max Krummenacher (1): tty: vt: conmakehash: cope with abs_srctree no longer in env drivers/tty/serial/sc16is7xx.c | 25 +++++++++++++++---------- drivers/tty/serial/serial_core.c | 8 ++++++++ drivers/tty/vt/conmakehash.c | 20 +++++++------------- 3 files changed, 30 insertions(+), 23 deletions(-) . Date: Sun, 11 Aug 2024 15:24:20 +0200 From: Greg KH To: Linus Torvalds Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [GIT PULL] USB driver fixes for 6.11-rc3 The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git tags/usb-6.11-rc3 for you to fetch changes up to 65ba8cef0416816b912c04850fc2468329994353: usb: typec: ucsi: Fix a deadlock in ucsi_send_command_common() (2024-08-07 12:48:30 +0200) ---------------------------------------------------------------- USB fixes for 6.11-rc3 Here are a number of small USB driver fixes for reported issues for 6.11-rc3. Included in here are: - usb serial driver MODULE_DESCRIPTION() updates - usb serial driver fixes - typec driver fixes - usb-ip driver fix - gadget driver fixes - dt binding update All of these have been in linux-next with no reported issues. Signed-off-by: Greg Kroah-Hartman ---------------------------------------------------------------- Alexander Stein (1): dt-bindings: usb: microchip,usb2514: Add USB2517 compatible Chris Wulff (2): usb: gadget: u_audio: Check return codes from usb_ep_enable and config_ep_by_speed. usb: gadget: core: Check for unset descriptor Dan Carpenter (1): usb: typec: tcpci: Fix error code in tcpci_check_std_output_cap() Dr. David Alan Gilbert (1): USB: serial: spcp8x5: remove unused struct 'spcp8x5_usb_ctrl_arg' Greg Kroah-Hartman (2): Merge tag 'usb-serial-6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Merge tag 'usb-serial-6.11-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Harshit Mogalapalli (2): usb: typec: tipd: Fix dereferencing freeing memory in tps6598x_apply_patch() usb: typec: tipd: Delete extra semi-colon Heikki Krogerus (1): usb: typec: ucsi: Fix a deadlock in ucsi_send_command_common() Javier Carrasco (2): USB: serial: garmin_gps: annotate struct garmin_packet with __counted_by USB: serial: garmin_gps: use struct_size() to allocate pkt Jeff Johnson (1): USB: serial: add missing MODULE_DESCRIPTION() macros Konrad Dybcio (1): usb: typec: fsa4480: Check if the chip is really there Marek Marczykowski-Górecki (1): USB: serial: debug: do not echo input by default Oliver Neukum (1): usb: vhci-hcd: Do not drop references before new references are gained Prashanth K (1): usb: gadget: u_serial: Set start_delayed during suspend Takashi Iwai (1): usb: gadget: midi2: Fix the response for FB info with block 0xff Tudor Ambarus (2): usb: gadget: f_fs: restore ffs_func_disable() functionality usb: gadget: f_fs: pull out f->disable() from ffs_func_set_alt() Xu Yang (1): usb: typec: tcpm: avoid sink goto SNK_UNATTACHED state if not received source capability message .../devicetree/bindings/usb/microchip,usb2514.yaml | 1 + drivers/usb/gadget/function/f_fs.c | 32 ++++++++++------- drivers/usb/gadget/function/f_midi2.c | 21 +++++++---- drivers/usb/gadget/function/u_audio.c | 42 +++++++++++++++++----- drivers/usb/gadget/function/u_serial.c | 1 + drivers/usb/gadget/udc/core.c | 10 +++--- drivers/usb/serial/ch341.c | 1 + drivers/usb/serial/garmin_gps.c | 5 ++- drivers/usb/serial/mxuport.c | 1 + drivers/usb/serial/navman.c | 1 + drivers/usb/serial/qcaux.c | 1 + drivers/usb/serial/spcp8x5.c | 10 ------ drivers/usb/serial/symbolserial.c | 1 + drivers/usb/serial/usb-serial-simple.c | 1 + drivers/usb/serial/usb_debug.c | 8 +++++ drivers/usb/typec/mux/fsa4480.c | 14 ++++++++ drivers/usb/typec/tcpm/tcpci.c | 2 +- drivers/usb/typec/tcpm/tcpm.c | 2 +- drivers/usb/typec/tipd/core.c | 4 +-- drivers/usb/typec/ucsi/ucsi.c | 11 +++--- drivers/usb/usbip/vhci_hcd.c | 9 +++-- 21 files changed, 119 insertions(+), 59 deletions(-) . Date: Sun, 11 Aug 2024 15:58:05 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] irq/urgent for v6.11-rc3 Linus, please pull the latest irq/urgent branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-2024-= 08-11 up to: 03f9885c60ad: irqchip/riscv-aplic: Retrigger MSI interrupt on source = configuration Three small fixes for interrupt core and drivers: - The interrupt core fails to honor caller supplied affinity hints for non-managed interrupts and uses the system default affinity on startup instead. Set the missing flag in the descriptor to tell the core to use the provided affinity. - Fix a shift out of bounds error in the Xilinx driver - Handle switching to level trigger correctly in the RISCV APLIC driver. It failed to retrigger the interrupt which causes it to become stale. Thanks, tglx ------------------> Radhey Shyam Pandey (1): irqchip/xilinx: Fix shift out of bounds Shay Drory (1): genirq/irqdesc: Honor caller provided affinity in alloc_desc() Yong-Xuan Wang (1): irqchip/riscv-aplic: Retrigger MSI interrupt on source configuration drivers/irqchip/irq-riscv-aplic-msi.c | 32 +++++++++++++++++++++++++------- drivers/irqchip/irq-xilinx-intc.c | 2 +- kernel/irq/irqdesc.c | 1 + 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/drivers/irqchip/irq-riscv-aplic-msi.c b/drivers/irqchip/irq-risc= v-aplic-msi.c index 028444af48bd..d7773f76e5d0 100644 --- a/drivers/irqchip/irq-riscv-aplic-msi.c +++ b/drivers/irqchip/irq-riscv-aplic-msi.c @@ -32,15 +32,10 @@ static void aplic_msi_irq_unmask(struct irq_data *d) aplic_irq_unmask(d); } =20 -static void aplic_msi_irq_eoi(struct irq_data *d) +static void aplic_msi_irq_retrigger_level(struct irq_data *d) { struct aplic_priv *priv =3D irq_data_get_irq_chip_data(d); =20 - /* - * EOI handling is required only for level-triggered interrupts - * when APLIC is in MSI mode. - */ - switch (irqd_get_trigger_type(d)) { case IRQ_TYPE_LEVEL_LOW: case IRQ_TYPE_LEVEL_HIGH: @@ -59,6 +54,29 @@ static void aplic_msi_irq_eoi(struct irq_data *d) } } =20 +static void aplic_msi_irq_eoi(struct irq_data *d) +{ + /* + * EOI handling is required only for level-triggered interrupts + * when APLIC is in MSI mode. + */ + aplic_msi_irq_retrigger_level(d); +} + +static int aplic_msi_irq_set_type(struct irq_data *d, unsigned int type) +{ + int rc =3D aplic_irq_set_type(d, type); + + if (rc) + return rc; + /* + * Updating sourcecfg register for level-triggered interrupts + * requires interrupt retriggering when APLIC is in MSI mode. + */ + aplic_msi_irq_retrigger_level(d); + return 0; +} + static void aplic_msi_write_msg(struct irq_data *d, struct msi_msg *msg) { unsigned int group_index, hart_index, guest_index, val; @@ -130,7 +148,7 @@ static const struct msi_domain_template aplic_msi_templat= e =3D { .name =3D "APLIC-MSI", .irq_mask =3D aplic_msi_irq_mask, .irq_unmask =3D aplic_msi_irq_unmask, - .irq_set_type =3D aplic_irq_set_type, + .irq_set_type =3D aplic_msi_irq_set_type, .irq_eoi =3D aplic_msi_irq_eoi, #ifdef CONFIG_SMP .irq_set_affinity =3D irq_chip_set_affinity_parent, diff --git a/drivers/irqchip/irq-xilinx-intc.c b/drivers/irqchip/irq-xilinx-i= ntc.c index 238d3d344949..7e08714d507f 100644 --- a/drivers/irqchip/irq-xilinx-intc.c +++ b/drivers/irqchip/irq-xilinx-intc.c @@ -189,7 +189,7 @@ static int __init xilinx_intc_of_init(struct device_node = *intc, irqc->intr_mask =3D 0; } =20 - if (irqc->intr_mask >> irqc->nr_irq) + if ((u64)irqc->intr_mask >> irqc->nr_irq) pr_warn("irq-xilinx: mismatch in kind-of-intr param\n"); =20 pr_info("irq-xilinx: %pOF: num_irq=3D%d, edge=3D0x%x\n", diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 07e99c936ba5..1dee88ba0ae4 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -530,6 +530,7 @@ static int alloc_descs(unsigned int start, unsigned int c= nt, int node, flags =3D IRQD_AFFINITY_MANAGED | IRQD_MANAGED_SHUTDOWN; } + flags |=3D IRQD_AFFINITY_SET; mask =3D &affinity->mask; node =3D cpu_to_node(cpumask_first(mask)); affinity++; . Date: Sun, 11 Aug 2024 15:58:06 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] timers/urgent for v6.11-rc3 Linus, please pull the latest timers/urgent branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-20= 24-08-11 up to: 5916be8a53de: timekeeping: Fix bogus clock_was_set() invocation in do= _adjtimex() Updates for time keeping: - Fix a couple of issues in the NTP code where user supplied values are neither sanity checked nor clamped to the operating range. This results in integer overflows and eventualy NTP getting out of sync. According to the history the sanity checks had been removed in favor of clamping the values, but the clamping never worked correctly under all circumstances. The NTP people asked to not bring the sanity checks back as it might break existing applications. Make the clamping work correctly and add it where it's missing - If adjtimex() sets the clock it has to trigger the hrtimer subsystem so it can adjust and if the clock was set into the future expire timers if needed. The caller should provide a bitmask to tell hrtimers which clocks have been adjusted. adjtimex() uses not the proper constant and uses CLOCK_REALTIME instead, which is 0. So hrtimers adjusts only the clocks, but does not check for expired timers, which might make them expire really late. Use the proper bitmask constant instead. Thanks, tglx ------------------> Justin Stitt (2): ntp: Clamp maxerror and esterror to operating range ntp: Safeguard against time_constant overflow Thomas Gleixner (1): timekeeping: Fix bogus clock_was_set() invocation in do_adjtimex() kernel/time/ntp.c | 9 ++++----- kernel/time/timekeeping.c | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 406dccb79c2b..8d2dd214ec68 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -727,17 +727,16 @@ static inline void process_adjtimex_modes(const struct = __kernel_timex *txc, } =20 if (txc->modes & ADJ_MAXERROR) - time_maxerror =3D txc->maxerror; + time_maxerror =3D clamp(txc->maxerror, 0, NTP_PHASE_LIMIT); =20 if (txc->modes & ADJ_ESTERROR) - time_esterror =3D txc->esterror; + time_esterror =3D clamp(txc->esterror, 0, NTP_PHASE_LIMIT); =20 if (txc->modes & ADJ_TIMECONST) { - time_constant =3D txc->constant; + time_constant =3D clamp(txc->constant, 0, MAXTC); if (!(time_status & STA_NANO)) time_constant +=3D 4; - time_constant =3D min(time_constant, (long)MAXTC); - time_constant =3D max(time_constant, 0l); + time_constant =3D clamp(time_constant, 0, MAXTC); } =20 if (txc->modes & ADJ_TAI && diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 2fa87dcfeda9..5391e4167d60 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -2606,7 +2606,7 @@ int do_adjtimex(struct __kernel_timex *txc) clock_set |=3D timekeeping_advance(TK_ADV_FREQ); =20 if (clock_set) - clock_was_set(CLOCK_REALTIME); + clock_was_set(CLOCK_SET_WALL); =20 ntp_notify_cmos_timer(); =20 . Date: Sun, 11 Aug 2024 15:58:08 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] x86/urgent for v6.11-rc3 Linus, please pull the latest x86/urgent branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2024-= 08-11 up to: 919f18f961c0: x86/mtrr: Check if fixed MTRRs exist before saving them A set of x86 fixes: - Fix 32-bit PTI for real. pti_clone_entry_text() is called twice, once before initcalls so that initcalls can use the user-mode helper and then again after text is set read only. Setting read only on 32-bit might break up the PMD mapping, which makes the second invocation of pti_clone_entry_text() find the mappings out of sync and failing. Allow the second call to split the existing PMDs in the user mapping and synchronize with the kernel mapping. - Don't make acpi_mp_wake_mailbox not read only after init as the mail box must be writable in the case that CPU hotplug operations happen after boot. Otherwise the attempt to start a CPU crashes with a write to read only memory. - Add a missing sanity check in mtrr_save_state() to ensure that the fixed MTRR MSRs are supported. Otherwise mtrr_save_state() ends up in a #GP, which is fixed up, but the WARN_ON() can bring systems down when panic on warn is set. Thanks, tglx ------------------> Andi Kleen (1): x86/mtrr: Check if fixed MTRRs exist before saving them Chen Yu (1): x86/paravirt: Fix incorrect virt spinlock setting on bare metal Thomas Gleixner (1): x86/mm: Fix PTI for i386 some more Zhiquan Li (1): x86/acpi: Remove __ro_after_init from acpi_mp_wake_mailbox arch/x86/include/asm/qspinlock.h | 12 +++++----- arch/x86/kernel/acpi/madt_wakeup.c | 2 +- arch/x86/kernel/cpu/mtrr/mtrr.c | 2 +- arch/x86/kernel/paravirt.c | 7 +++--- arch/x86/mm/pti.c | 45 ++++++++++++++++++++++++------------= -- 5 files changed, 41 insertions(+), 27 deletions(-) diff --git a/arch/x86/include/asm/qspinlock.h b/arch/x86/include/asm/qspinloc= k.h index a053c1293975..68da67df304d 100644 --- a/arch/x86/include/asm/qspinlock.h +++ b/arch/x86/include/asm/qspinlock.h @@ -66,13 +66,15 @@ static inline bool vcpu_is_preempted(long cpu) =20 #ifdef CONFIG_PARAVIRT /* - * virt_spin_lock_key - enables (by default) the virt_spin_lock() hijack. + * virt_spin_lock_key - disables by default the virt_spin_lock() hijack. * - * Native (and PV wanting native due to vCPU pinning) should disable this ke= y. - * It is done in this backwards fashion to only have a single direction chan= ge, - * which removes ordering between native_pv_spin_init() and HV setup. + * Native (and PV wanting native due to vCPU pinning) should keep this key + * disabled. Native does not touch the key. + * + * When in a guest then native_pv_lock_init() enables the key first and + * KVM/XEN might conditionally disable it later in the boot process again. */ -DECLARE_STATIC_KEY_TRUE(virt_spin_lock_key); +DECLARE_STATIC_KEY_FALSE(virt_spin_lock_key); =20 /* * Shortcut for the queued_spin_lock_slowpath() function that allows diff --git a/arch/x86/kernel/acpi/madt_wakeup.c b/arch/x86/kernel/acpi/madt_w= akeup.c index 6cfe762be28b..d5ef6215583b 100644 --- a/arch/x86/kernel/acpi/madt_wakeup.c +++ b/arch/x86/kernel/acpi/madt_wakeup.c @@ -19,7 +19,7 @@ static u64 acpi_mp_wake_mailbox_paddr __ro_after_init; =20 /* Virtual address of the Multiprocessor Wakeup Structure mailbox */ -static struct acpi_madt_multiproc_wakeup_mailbox *acpi_mp_wake_mailbox __ro_= after_init; +static struct acpi_madt_multiproc_wakeup_mailbox *acpi_mp_wake_mailbox; =20 static u64 acpi_mp_pgd __ro_after_init; static u64 acpi_mp_reset_vector_paddr __ro_after_init; diff --git a/arch/x86/kernel/cpu/mtrr/mtrr.c b/arch/x86/kernel/cpu/mtrr/mtrr.c index 767bf1c71aad..2a2fc14955cd 100644 --- a/arch/x86/kernel/cpu/mtrr/mtrr.c +++ b/arch/x86/kernel/cpu/mtrr/mtrr.c @@ -609,7 +609,7 @@ void mtrr_save_state(void) { int first_cpu; =20 - if (!mtrr_enabled()) + if (!mtrr_enabled() || !mtrr_state.have_fixed) return; =20 first_cpu =3D cpumask_first(cpu_online_mask); diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 5358d43886ad..fec381533555 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c @@ -51,13 +51,12 @@ DEFINE_ASM_FUNC(pv_native_irq_enable, "sti", .noinstr.tex= t); DEFINE_ASM_FUNC(pv_native_read_cr2, "mov %cr2, %rax", .noinstr.text); #endif =20 -DEFINE_STATIC_KEY_TRUE(virt_spin_lock_key); +DEFINE_STATIC_KEY_FALSE(virt_spin_lock_key); =20 void __init native_pv_lock_init(void) { - if (IS_ENABLED(CONFIG_PARAVIRT_SPINLOCKS) && - !boot_cpu_has(X86_FEATURE_HYPERVISOR)) - static_branch_disable(&virt_spin_lock_key); + if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) + static_branch_enable(&virt_spin_lock_key); } =20 static void native_tlb_remove_table(struct mmu_gather *tlb, void *table) diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c index bfdf5f45b137..851ec8f1363a 100644 --- a/arch/x86/mm/pti.c +++ b/arch/x86/mm/pti.c @@ -241,7 +241,7 @@ static pmd_t *pti_user_pagetable_walk_pmd(unsigned long a= ddress) * * Returns a pointer to a PTE on success, or NULL on failure. */ -static pte_t *pti_user_pagetable_walk_pte(unsigned long address) +static pte_t *pti_user_pagetable_walk_pte(unsigned long address, bool late_t= ext) { gfp_t gfp =3D (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO); pmd_t *pmd; @@ -251,10 +251,15 @@ static pte_t *pti_user_pagetable_walk_pte(unsigned long= address) if (!pmd) return NULL; =20 - /* We can't do anything sensible if we hit a large mapping. */ + /* Large PMD mapping found */ if (pmd_leaf(*pmd)) { - WARN_ON(1); - return NULL; + /* Clear the PMD if we hit a large mapping from the first round */ + if (late_text) { + set_pmd(pmd, __pmd(0)); + } else { + WARN_ON_ONCE(1); + return NULL; + } } =20 if (pmd_none(*pmd)) { @@ -283,7 +288,7 @@ static void __init pti_setup_vsyscall(void) if (!pte || WARN_ON(level !=3D PG_LEVEL_4K) || pte_none(*pte)) return; =20 - target_pte =3D pti_user_pagetable_walk_pte(VSYSCALL_ADDR); + target_pte =3D pti_user_pagetable_walk_pte(VSYSCALL_ADDR, false); if (WARN_ON(!target_pte)) return; =20 @@ -301,7 +306,7 @@ enum pti_clone_level { =20 static void pti_clone_pgtable(unsigned long start, unsigned long end, - enum pti_clone_level level) + enum pti_clone_level level, bool late_text) { unsigned long addr; =20 @@ -390,7 +395,7 @@ pti_clone_pgtable(unsigned long start, unsigned long end, return; =20 /* Allocate PTE in the user page-table */ - target_pte =3D pti_user_pagetable_walk_pte(addr); + target_pte =3D pti_user_pagetable_walk_pte(addr, late_text); if (WARN_ON(!target_pte)) return; =20 @@ -452,7 +457,7 @@ static void __init pti_clone_user_shared(void) phys_addr_t pa =3D per_cpu_ptr_to_phys((void *)va); pte_t *target_pte; =20 - target_pte =3D pti_user_pagetable_walk_pte(va); + target_pte =3D pti_user_pagetable_walk_pte(va, false); if (WARN_ON(!target_pte)) return; =20 @@ -475,7 +480,7 @@ static void __init pti_clone_user_shared(void) start =3D CPU_ENTRY_AREA_BASE; end =3D start + (PAGE_SIZE * CPU_ENTRY_AREA_PAGES); =20 - pti_clone_pgtable(start, end, PTI_CLONE_PMD); + pti_clone_pgtable(start, end, PTI_CLONE_PMD, false); } #endif /* CONFIG_X86_64 */ =20 @@ -492,11 +497,11 @@ static void __init pti_setup_espfix64(void) /* * Clone the populated PMDs of the entry text and force it RO. */ -static void pti_clone_entry_text(void) +static void pti_clone_entry_text(bool late) { pti_clone_pgtable((unsigned long) __entry_text_start, (unsigned long) __entry_text_end, - PTI_LEVEL_KERNEL_IMAGE); + PTI_LEVEL_KERNEL_IMAGE, late); } =20 /* @@ -571,7 +576,7 @@ static void pti_clone_kernel_text(void) * pti_set_kernel_image_nonglobal() did to clear the * global bit. */ - pti_clone_pgtable(start, end_clone, PTI_LEVEL_KERNEL_IMAGE); + pti_clone_pgtable(start, end_clone, PTI_LEVEL_KERNEL_IMAGE, false); =20 /* * pti_clone_pgtable() will set the global bit in any PMDs @@ -638,8 +643,15 @@ void __init pti_init(void) =20 /* Undo all global bits from the init pagetables in head_64.S: */ pti_set_kernel_image_nonglobal(); + /* Replace some of the global bits just for shared entry text: */ - pti_clone_entry_text(); + /* + * This is very early in boot. Device and Late initcalls can do + * modprobe before free_initmem() and mark_readonly(). This + * pti_clone_entry_text() allows those user-mode-helpers to function, + * but notably the text is still RW. + */ + pti_clone_entry_text(false); pti_setup_espfix64(); pti_setup_vsyscall(); } @@ -656,10 +668,11 @@ void pti_finalize(void) if (!boot_cpu_has(X86_FEATURE_PTI)) return; /* - * We need to clone everything (again) that maps parts of the - * kernel image. + * This is after free_initmem() (all initcalls are done) and we've done + * mark_readonly(). Text is now NX which might've split some PMDs + * relative to the early clone. */ - pti_clone_entry_text(); + pti_clone_entry_text(true); pti_clone_kernel_text(); =20 debug_checkwx_user(); .