* [PATCH 6.1 018/119] platform/x86/intel/ifs: Annotate work queue on stack so object debug does not complain
2023-05-28 19:10 [PATCH 6.1 000/119] 6.1.31-rc1 review Greg Kroah-Hartman
@ 2023-05-28 19:10 ` Greg Kroah-Hartman
2023-05-29 5:11 ` [PATCH 6.1 000/119] 6.1.31-rc1 review Bagas Sanjaya
` (11 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2023-05-28 19:10 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, David Arcari, Jithu Joseph,
Ashok Raj, Tony Luck, Hans de Goede, Mark Gross, Thomas Gleixner,
Dan Williams, linux-kernel
From: David Arcari <darcari@redhat.com>
commit 3279decb2c3c8d58cb0b70ed5235c480735a36ee upstream.
Object Debug results in the following warning while attempting to load
ifs firmware:
[ 220.007422] ODEBUG: object 000000003bf952db is on stack 00000000e843994b, but NOT annotated.
[ 220.007459] ------------[ cut here ]------------
[ 220.007461] WARNING: CPU: 0 PID: 11774 at lib/debugobjects.c:548 __debug_object_init.cold+0x22e/0x2d5
[ 220.137476] RIP: 0010:__debug_object_init.cold+0x22e/0x2d5
[ 220.254774] Call Trace:
[ 220.257641] <TASK>
[ 220.265606] scan_chunks_sanity_check+0x368/0x5f0 [intel_ifs]
[ 220.288292] ifs_load_firmware+0x2a3/0x400 [intel_ifs]
[ 220.332793] current_batch_store+0xea/0x160 [intel_ifs]
[ 220.357947] kernfs_fop_write_iter+0x355/0x530
[ 220.363048] new_sync_write+0x28e/0x4a0
[ 220.381226] vfs_write+0x62a/0x920
[ 220.385160] ksys_write+0xf9/0x1d0
[ 220.399421] do_syscall_64+0x59/0x90
[ 220.440635] entry_SYSCALL_64_after_hwframe+0x63/0xcd
[ 220.566845] ---[ end trace 3a01b299db142b41 ]---
Correct this by calling INIT_WORK_ONSTACK instead of INIT_WORK.
Fixes: 684ec215706d ("platform/x86/intel/ifs: Authenticate and copy to secured memory")
Signed-off-by: David Arcari <darcari@redhat.com>
Cc: Jithu Joseph <jithu.joseph@intel.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Mark Gross <markgross@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230523105400.674152-1-darcari@redhat.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/platform/x86/intel/ifs/load.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/platform/x86/intel/ifs/load.c
+++ b/drivers/platform/x86/intel/ifs/load.c
@@ -154,7 +154,7 @@ static int scan_chunks_sanity_check(stru
continue;
reinit_completion(&ifs_done);
local_work.dev = dev;
- INIT_WORK(&local_work.w, copy_hashes_authenticate_chunks);
+ INIT_WORK_ONSTACK(&local_work.w, copy_hashes_authenticate_chunks);
schedule_work_on(cpu, &local_work.w);
wait_for_completion(&ifs_done);
if (ifsd->loading_error)
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-28 19:10 [PATCH 6.1 000/119] 6.1.31-rc1 review Greg Kroah-Hartman
2023-05-28 19:10 ` [PATCH 6.1 018/119] platform/x86/intel/ifs: Annotate work queue on stack so object debug does not complain Greg Kroah-Hartman
@ 2023-05-29 5:11 ` Bagas Sanjaya
2023-05-29 10:09 ` ogasawara takeshi
` (10 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Bagas Sanjaya @ 2023-05-29 5:11 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable
Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
rwarsow
[-- Attachment #1: Type: text/plain, Size: 559 bytes --]
On Sun, May 28, 2023 at 08:10:00PM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.1.31 release.
> There are 119 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
Successfully compiled and installed bindeb-pkgs on my computer (Acer
Aspire E15, Intel Core i3 Haswell). No noticeable regressions.
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-28 19:10 [PATCH 6.1 000/119] 6.1.31-rc1 review Greg Kroah-Hartman
2023-05-28 19:10 ` [PATCH 6.1 018/119] platform/x86/intel/ifs: Annotate work queue on stack so object debug does not complain Greg Kroah-Hartman
2023-05-29 5:11 ` [PATCH 6.1 000/119] 6.1.31-rc1 review Bagas Sanjaya
@ 2023-05-29 10:09 ` ogasawara takeshi
2023-05-29 12:03 ` Conor Dooley
` (9 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: ogasawara takeshi @ 2023-05-29 10:09 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow
Hi Greg
On Mon, May 29, 2023 at 4:34 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 6.1.31 release.
> There are 119 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Tue, 30 May 2023 19:08:13 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.31-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
6.1.31-rc1 tested.
Build successfully completed.
Boot successfully completed.
No dmesg regressions.
Video output normal.
Sound output normal.
Lenovo ThinkPad X1 Carbon Gen10(Intel i7-1260P(x86_64), arch linux)
Thanks
Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-28 19:10 [PATCH 6.1 000/119] 6.1.31-rc1 review Greg Kroah-Hartman
` (2 preceding siblings ...)
2023-05-29 10:09 ` ogasawara takeshi
@ 2023-05-29 12:03 ` Conor Dooley
2023-05-29 13:12 ` Markus Reichelt
` (8 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Conor Dooley @ 2023-05-29 12:03 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow
[-- Attachment #1: Type: text/plain, Size: 370 bytes --]
On Sun, May 28, 2023 at 08:10:00PM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.1.31 release.
> There are 119 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Thanks,
Conor
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-28 19:10 [PATCH 6.1 000/119] 6.1.31-rc1 review Greg Kroah-Hartman
` (3 preceding siblings ...)
2023-05-29 12:03 ` Conor Dooley
@ 2023-05-29 13:12 ` Markus Reichelt
2023-05-29 13:28 ` Naresh Kamboju
` (7 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Markus Reichelt @ 2023-05-29 13:12 UTC (permalink / raw)
To: stable, linux-kernel
* Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> This is the start of the stable review cycle for the 6.1.31 release.
> There are 119 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Tue, 30 May 2023 19:08:13 +0000.
> Anything received after that time might be too late.
Hi Greg
6.1.31-rc1
compiles, boots and runs here on x86_64
(AMD Ryzen 5 PRO 4650G, Slackware64-15.0)
Tested-by: Markus Reichelt <lkt+2023@mareichelt.com>
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-28 19:10 [PATCH 6.1 000/119] 6.1.31-rc1 review Greg Kroah-Hartman
` (4 preceding siblings ...)
2023-05-29 13:12 ` Markus Reichelt
@ 2023-05-29 13:28 ` Naresh Kamboju
2023-05-29 16:07 ` Guenter Roeck
` (6 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Naresh Kamboju @ 2023-05-29 13:28 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow
On Mon, 29 May 2023 at 01:04, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 6.1.31 release.
> There are 119 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Tue, 30 May 2023 19:08:13 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.31-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
## Build
* kernel: 6.1.31-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.1.y
* git commit: 8482df0ff7e727d4244b8bf8537cce39a474eefc
* git describe: v6.1.29-413-g8482df0ff7e7
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.29-413-g8482df0ff7e7
## Test Regressions (compared to v6.1.29-293-ge00a3d96f756)
## Metric Regressions (compared to v6.1.29-293-ge00a3d96f756)
## Test Fixes (compared to v6.1.29-293-ge00a3d96f756)
## Metric Fixes (compared to v6.1.29-293-ge00a3d96f756)
## Test result summary
total: 170063, pass: 146595, fail: 3956, skip: 19237, xfail: 275
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 151 total, 150 passed, 1 failed
* arm64: 54 total, 53 passed, 1 failed
* i386: 41 total, 38 passed, 3 failed
* mips: 30 total, 28 passed, 2 failed
* parisc: 8 total, 8 passed, 0 failed
* powerpc: 38 total, 36 passed, 2 failed
* riscv: 16 total, 15 passed, 1 failed
* s390: 16 total, 16 passed, 0 failed
* sh: 14 total, 12 passed, 2 failed
* sparc: 8 total, 8 passed, 0 failed
* x86_64: 46 total, 46 passed, 0 failed
## Test suites summary
* boot
* fwts
* igt-gpu-tools
* kselftest-android
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-exec
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-firmware
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-user_events
* kselftest-vDSO
* kselftest-watchdog
* kselftest-x86
* kselftest-zram
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* network-basic-tests
* perf
* rcutorture
* v4l2-compliance
* vdso
--
Linaro LKFT
https://lkft.linaro.org
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-28 19:10 [PATCH 6.1 000/119] 6.1.31-rc1 review Greg Kroah-Hartman
` (5 preceding siblings ...)
2023-05-29 13:28 ` Naresh Kamboju
@ 2023-05-29 16:07 ` Guenter Roeck
2023-05-29 21:49 ` Ron Economos
` (5 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Guenter Roeck @ 2023-05-29 16:07 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
rwarsow
On Sun, May 28, 2023 at 08:10:00PM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.1.31 release.
> There are 119 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Tue, 30 May 2023 19:08:13 +0000.
> Anything received after that time might be too late.
>
Build results:
total: 155 pass: 155 fail: 0
Qemu test results:
total: 519 pass: 519 fail: 0
Tested-by: Guenter Roeck <linux@roeck-us.net>
Guenter
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-28 19:10 [PATCH 6.1 000/119] 6.1.31-rc1 review Greg Kroah-Hartman
` (6 preceding siblings ...)
2023-05-29 16:07 ` Guenter Roeck
@ 2023-05-29 21:49 ` Ron Economos
2023-05-30 9:19 ` Jon Hunter
` (4 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Ron Economos @ 2023-05-29 21:49 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable
Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
rwarsow
On 5/28/23 12:10 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.1.31 release.
> There are 119 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Tue, 30 May 2023 19:08:13 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.31-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Tested-by: Ron Economos <re@w6rz.net>
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-28 19:10 [PATCH 6.1 000/119] 6.1.31-rc1 review Greg Kroah-Hartman
` (7 preceding siblings ...)
2023-05-29 21:49 ` Ron Economos
@ 2023-05-30 9:19 ` Jon Hunter
2023-05-30 10:46 ` Wrong/strange TPM patches was " Pavel Machek
` (3 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Jon Hunter @ 2023-05-30 9:19 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Greg Kroah-Hartman, patches, linux-kernel, torvalds, akpm, linux,
shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, linux-tegra, stable
On Sun, 28 May 2023 20:10:00 +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.1.31 release.
> There are 119 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Tue, 30 May 2023 19:08:13 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.31-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
All tests passing for Tegra ...
Test results for stable-v6.1:
11 builds: 11 pass, 0 fail
28 boots: 28 pass, 0 fail
130 tests: 130 pass, 0 fail
Linux version: 6.1.31-rc1-g8482df0ff7e7
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Jon
^ permalink raw reply [flat|nested] 17+ messages in thread* Wrong/strange TPM patches was Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-28 19:10 [PATCH 6.1 000/119] 6.1.31-rc1 review Greg Kroah-Hartman
` (8 preceding siblings ...)
2023-05-30 9:19 ` Jon Hunter
@ 2023-05-30 10:46 ` Pavel Machek
2023-05-30 11:50 ` Linus Torvalds
2023-05-30 13:02 ` Greg Kroah-Hartman
2023-05-30 11:52 ` Chris Paterson
` (2 subsequent siblings)
12 siblings, 2 replies; 17+ messages in thread
From: Pavel Machek @ 2023-05-30 10:46 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, l.sanfilippo, jarkko
[-- Attachment #1: Type: text/plain, Size: 1927 bytes --]
Hi!
> This is the start of the stable review cycle for the 6.1.31 release.
> There are 119 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
> Lino Sanfilippo <l.sanfilippo@kunbus.com>
> tpm, tpm_tis: Avoid cache incoherency in test for interrupts
Description on this one is wrong/confused. There's no cache problem in
the code. Plus test_bit and friend already use bit number, so
- bool itpm = priv->flags & TPM_TIS_ITPM_WORKAROUND;
+ bool itpm = test_bit(TPM_TIS_ITPM_WORKAROUND, &priv->flags);
@@ -87,6 +87,7 @@ enum tpm_tis_flags {
TPM_TIS_ITPM_WORKAROUND = BIT(0),
TPM_TIS_INVALID_STATUS = BIT(1),
TPM_TIS_DEFAULT_CANCELLATION = BIT(2),
+ TPM_TIS_IRQ_TESTED = BIT(3),
};
this enum needs to go from BIT() to raw numbers.
You can just do return tpm_pm_resume();
> Jarkko Sakkinen <jarkko@kernel.org>
> tpm: Prevent hwrng from activating during resume
@@ -429,6 +431,14 @@ int tpm_pm_resume(struct device *dev)
if (chip == NULL)
return -ENODEV;
+ chip->flags &= ~TPM_CHIP_FLAG_SUSPENDED;
+
+ /*
+ * Guarantee that SUSPENDED is written last, so that hwrng does not
+ * activate before the chip has been fully resumed.
+ */
+ wmb();
+
return 0;
}
EXPORT_SYMBOL_GPL(tpm_pm_resume);
This code is confused. First, either you don't need memory barriers
here, or you need real locking. Second, if you want to guarantee flags
are written last, you need to put the barrier before the
assignment. (But ... get rid of that confusion, first).
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: Wrong/strange TPM patches was Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-30 10:46 ` Wrong/strange TPM patches was " Pavel Machek
@ 2023-05-30 11:50 ` Linus Torvalds
2023-05-30 13:02 ` Greg Kroah-Hartman
1 sibling, 0 replies; 17+ messages in thread
From: Linus Torvalds @ 2023-05-30 11:50 UTC (permalink / raw)
To: Pavel Machek
Cc: Greg Kroah-Hartman, stable, patches, linux-kernel, akpm, linux,
shuah, patches, lkft-triage, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, l.sanfilippo, jarkko
On Tue, May 30, 2023 at 6:46 AM Pavel Machek <pavel@denx.de> wrote:
>
> > Lino Sanfilippo <l.sanfilippo@kunbus.com>
> > tpm, tpm_tis: Avoid cache incoherency in test for interrupts
>
> Description on this one is wrong/confused.
Yes. Commit 858e8b792d06 ("tpm, tpm_tis: Avoid cache incoherency in
test for interrupts") in mainline.
The change to test_bit/set_bit may be a good one (and adding the
IRQ_TESTED case to the bit flags), but that commit wasn't it.
As you say, the enum should now enumerate bits, not bitmasks.
Linus
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: Wrong/strange TPM patches was Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-30 10:46 ` Wrong/strange TPM patches was " Pavel Machek
2023-05-30 11:50 ` Linus Torvalds
@ 2023-05-30 13:02 ` Greg Kroah-Hartman
2023-05-30 13:58 ` Lino Sanfilippo
1 sibling, 1 reply; 17+ messages in thread
From: Greg Kroah-Hartman @ 2023-05-30 13:02 UTC (permalink / raw)
To: Pavel Machek
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, jonathanh, f.fainelli, sudipm.mukherjee,
srw, rwarsow, l.sanfilippo, jarkko
On Tue, May 30, 2023 at 12:46:49PM +0200, Pavel Machek wrote:
> Hi!
>
> > This is the start of the stable review cycle for the 6.1.31 release.
> > There are 119 patches in this series, all will be posted as a response
> > to this one. If anyone has any issues with these being applied, please
> > let me know.
>
> > Lino Sanfilippo <l.sanfilippo@kunbus.com>
> > tpm, tpm_tis: Avoid cache incoherency in test for interrupts
>
> Description on this one is wrong/confused. There's no cache problem in
> the code. Plus test_bit and friend already use bit number, so
>
> - bool itpm = priv->flags & TPM_TIS_ITPM_WORKAROUND;
> + bool itpm = test_bit(TPM_TIS_ITPM_WORKAROUND, &priv->flags);
>
> @@ -87,6 +87,7 @@ enum tpm_tis_flags {
> TPM_TIS_ITPM_WORKAROUND = BIT(0),
> TPM_TIS_INVALID_STATUS = BIT(1),
> TPM_TIS_DEFAULT_CANCELLATION = BIT(2),
> + TPM_TIS_IRQ_TESTED = BIT(3),
> };
>
> this enum needs to go from BIT() to raw numbers.
>
> You can just do return tpm_pm_resume();
>
> > Jarkko Sakkinen <jarkko@kernel.org>
> > tpm: Prevent hwrng from activating during resume
>
> @@ -429,6 +431,14 @@ int tpm_pm_resume(struct device *dev)
> if (chip == NULL)
> return -ENODEV;
>
> + chip->flags &= ~TPM_CHIP_FLAG_SUSPENDED;
> +
> + /*
> + * Guarantee that SUSPENDED is written last, so that hwrng does not
> + * activate before the chip has been fully resumed.
> + */
> + wmb();
> +
> return 0;
> }
> EXPORT_SYMBOL_GPL(tpm_pm_resume);
>
> This code is confused. First, either you don't need memory barriers
> here, or you need real locking. Second, if you want to guarantee flags
> are written last, you need to put the barrier before the
> assignment. (But ... get rid of that confusion, first).
Care to submit patches to resolve this? It's this way in Linus's tree
now from what I can tell, and these changes were needed for another
stable-marked change, so I'll leave them in for now.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: Wrong/strange TPM patches was Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-30 13:02 ` Greg Kroah-Hartman
@ 2023-05-30 13:58 ` Lino Sanfilippo
0 siblings, 0 replies; 17+ messages in thread
From: Lino Sanfilippo @ 2023-05-30 13:58 UTC (permalink / raw)
To: Greg Kroah-Hartman, Pavel Machek
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, jonathanh, f.fainelli, sudipm.mukherjee,
srw, rwarsow, jarkko, Lukas Wunner, Philipp Rosenberger
Hi,
On 30.05.23 15:02, Greg Kroah-Hartman wrote:
> ATTENTION: This e-mail is from an external sender. Please check attachments and links before opening e.g. with mouseover.
>
>
> On Tue, May 30, 2023 at 12:46:49PM +0200, Pavel Machek wrote:
>> Hi!
>>
>>> This is the start of the stable review cycle for the 6.1.31 release.
>>> There are 119 patches in this series, all will be posted as a response
>>> to this one. If anyone has any issues with these being applied, please
>>> let me know.
>>
>>> Lino Sanfilippo <l.sanfilippo@kunbus.com>
>>> tpm, tpm_tis: Avoid cache incoherency in test for interrupts
>>
>> Description on this one is wrong/confused. There's no cache problem in
>> the code. Plus test_bit and friend already use bit number, so
>>
>> - bool itpm = priv->flags & TPM_TIS_ITPM_WORKAROUND;
>> + bool itpm = test_bit(TPM_TIS_ITPM_WORKAROUND, &priv->flags);
>>
>> @@ -87,6 +87,7 @@ enum tpm_tis_flags {
>> TPM_TIS_ITPM_WORKAROUND = BIT(0),
>> TPM_TIS_INVALID_STATUS = BIT(1),
>> TPM_TIS_DEFAULT_CANCELLATION = BIT(2),
>> + TPM_TIS_IRQ_TESTED = BIT(3),
>> };
>>
>> this enum needs to go from BIT() to raw numbers.
>>
>> You can just do return tpm_pm_resume();
>>
>>> Jarkko Sakkinen <jarkko@kernel.org>
>>> tpm: Prevent hwrng from activating during resume
>>
>> @@ -429,6 +431,14 @@ int tpm_pm_resume(struct device *dev)
>> if (chip == NULL)
>> return -ENODEV;
>>
>> + chip->flags &= ~TPM_CHIP_FLAG_SUSPENDED;
>> +
>> + /*
>> + * Guarantee that SUSPENDED is written last, so that hwrng does not
>> + * activate before the chip has been fully resumed.
>> + */
>> + wmb();
>> +
>> return 0;
>> }
>> EXPORT_SYMBOL_GPL(tpm_pm_resume);
>>
>> This code is confused. First, either you don't need memory barriers
>> here, or you need real locking. Second, if you want to guarantee flags
>> are written last, you need to put the barrier before the
>> assignment. (But ... get rid of that confusion, first).
>
> Care to submit patches to resolve this? It's this way in Linus's tree
> now from what I can tell, and these changes were needed for another
> stable-marked change, so I'll leave them in for now.
>
First, thanks for the review Pavel and for spotting this.
I will send a patch to fix the enums.
Regards,
Lino
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-28 19:10 [PATCH 6.1 000/119] 6.1.31-rc1 review Greg Kroah-Hartman
` (9 preceding siblings ...)
2023-05-30 10:46 ` Wrong/strange TPM patches was " Pavel Machek
@ 2023-05-30 11:52 ` Chris Paterson
2023-05-30 17:02 ` Allen Pais
2023-05-30 19:29 ` Florian Fainelli
12 siblings, 0 replies; 17+ messages in thread
From: Chris Paterson @ 2023-05-30 11:52 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable@vger.kernel.org
Cc: patches@lists.linux.dev, linux-kernel@vger.kernel.org,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
linux@roeck-us.net, shuah@kernel.org, patches@kernelci.org,
lkft-triage@lists.linaro.org, pavel@denx.de, jonathanh@nvidia.com,
f.fainelli@gmail.com, sudipm.mukherjee@gmail.com,
srw@sladewatkins.net, rwarsow@gmx.de
Hello Greg,
> From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Sent: Sunday, May 28, 2023 8:10 PM
>
> This is the start of the stable review cycle for the 6.1.31 release.
> There are 119 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Tue, 30 May 2023 19:08:13 +0000.
> Anything received after that time might be too late.
CIP configurations built and booted with Linux 6.1.31-rc1 (8482df0ff7e7):
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/pipelines/881425030
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/commits/linux-6.1.y
Tested-by: Chris Paterson (CIP) <chris.paterson2@renesas.com>
Kind regards, Chris
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-28 19:10 [PATCH 6.1 000/119] 6.1.31-rc1 review Greg Kroah-Hartman
` (10 preceding siblings ...)
2023-05-30 11:52 ` Chris Paterson
@ 2023-05-30 17:02 ` Allen Pais
2023-05-30 19:29 ` Florian Fainelli
12 siblings, 0 replies; 17+ messages in thread
From: Allen Pais @ 2023-05-30 17:02 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow
> This is the start of the stable review cycle for the 6.1.31 release.
> There are 119 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Tue, 30 May 2023 19:08:13 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.31-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
Compiled and booted on my x86_64 and ARM64 test systems. No errors or
regressions.
Tested-by: Allen Pais <apais@linux.microsoft.com>
Thanks.
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 6.1 000/119] 6.1.31-rc1 review
2023-05-28 19:10 [PATCH 6.1 000/119] 6.1.31-rc1 review Greg Kroah-Hartman
` (11 preceding siblings ...)
2023-05-30 17:02 ` Allen Pais
@ 2023-05-30 19:29 ` Florian Fainelli
12 siblings, 0 replies; 17+ messages in thread
From: Florian Fainelli @ 2023-05-30 19:29 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable
Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
lkft-triage, pavel, jonathanh, sudipm.mukherjee, srw, rwarsow
On 5/28/23 12:10, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.1.31 release.
> There are 119 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Tue, 30 May 2023 19:08:13 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.31-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on
BMIPS_GENERIC:
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
^ permalink raw reply [flat|nested] 17+ messages in thread