summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorSamuel Holland <samuel.holland@sifive.com>2024-08-14 12:09:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-29 18:30:33 +0300
commiteb44e1c52ee83ea46c7d83f2c8867fc9d9c5c332 (patch)
treef2845afc994538450f8370a038687003e4d97d73 /block
parent83d0dcbb3d2063d85b95e026da90bc09fd1419ea (diff)
downloadlinux-eb44e1c52ee83ea46c7d83f2c8867fc9d9c5c332.tar.xz
arm64: Fix KASAN random tag seed initialization
[ Upstream commit f75c235565f90c4a17b125e47f1c68ef6b8c2bce ] Currently, kasan_init_sw_tags() is called before setup_per_cpu_areas(), so per_cpu(prng_state, cpu) accesses the same address regardless of the value of "cpu", and the same seed value gets copied to the percpu area for every CPU. Fix this by moving the call to smp_prepare_boot_cpu(), which is the first architecture hook after setup_per_cpu_areas(). Fixes: 3c9e3aa11094 ("kasan: add tag related helper functions") Fixes: 3f41b6093823 ("kasan: fix random seed generation for tag-based mode") Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com> Link: https://lore.kernel.org/r/20240814091005.969756-1-samuel.holland@sifive.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions