lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 1 Feb 2021 11:34:36 +0000 From: Russell King - ARM Linux admin <linux@...linux.org.uk> To: Giancarlo Ferrari <giancarlo.ferrari89@...il.com> Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org, akpm@...ux-foundation.org, rppt@...nel.org, penberg@...nel.org, geert@...ux-m68k.org, giancarlo.ferrari@...ia.com Subject: Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated I wish others who know this code would get involved, and such stuff wasn't left to me to research and work out whether a patch is correct or not. On Mon, Feb 01, 2021 at 12:44:56AM +0000, Giancarlo Ferrari wrote: > machine_kexec() need to set rw permission in text and rodata sections > to assign some variables (e.g. kexec_start_address). To do that at > the end (after flushing pdm in memory, etc.) it needs to invalidate > TLB [section] entries. > > If during the TLB invalidation an interrupt occours, which might cause > a context switch, there is the risk to inject invalid TLBs, with ro > permissions. > > When trying to assign .text labels, this lead to the following: > > Unable to handle kernel paging request at virtual address 80112f38 > pgd = fd7ef03e > [80112f38] *pgd=0001141e(bad) > Internal error: Oops: 80d [#1] PREEMPT SMP ARM > ... > > Signed-off-by: Giancarlo Ferrari <giancarlo.ferrari89@...il.com> I don't know this code very well, but I don't think this patch is correct. What happens if we have CRASH_DUMP enabled, and we enter this function with IRQs already disabled? Should we really be re-enabling IRQs? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists