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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240828-wolf-expletive-f96cfc4e9c7a@wendy>
Date: Wed, 28 Aug 2024 07:45:30 +0100
From: Conor Dooley <conor.dooley@...rochip.com>
To: Alexandre Ghiti <alex@...ti.fr>
CC: Conor Dooley <conor@...nel.org>, Alexandre Ghiti <alexghiti@...osinc.com>,
	Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt
	<palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>, Guo Ren
	<guoren@...nel.org>, Heiko Stuebner <heiko@...ech.de>, Philipp Tomsich
	<philipp.tomsich@...ll.eu>, <linux-riscv@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -fixes] riscv: Fix RISCV_ALTERNATIVE_EARLY

On Tue, Aug 27, 2024 at 11:13:16AM +0200, Alexandre Ghiti wrote:
> Hi Conor,
> 
> On 27/08/2024 10:38, Conor Dooley wrote:
> > On Mon, Aug 26, 2024 at 12:57:37PM +0200, Alexandre Ghiti wrote:
> > > RISCV_ALTERNATIVE_EARLY will issue sbi_ecall() very early in the boot
> > > process, before the first memory mapping is setup so we can't have any
> > > instrumentation happening here.
> > > 
> > > In addition, when the kernel is relocatable, we must also not issue any
> > > relocation this early since they would have been patched virtually only.
> > > 
> > > So, instead of disabling instrumentation for the whole kernel/sbi.c file
> > > and compiling it with -fno-pie, simply move __sbi_ecall() and
> > > __sbi_base_ecall() into their own file where this is fixed.
> > IOW, this should fix the issue that we discussed here
> > https://lore.kernel.org/linux-riscv/abec162e-f3f2-488c-83d9-be17257a5df8@ghiti.fr/
> > also?
> 
> 
> Yes, as a side effect it also fixes TRACEPOINTS + [KASAN|RELOCATABLE] as I
> reported in this thread since I moved the tracepoints in a file where
> instrumentation is disabled and compiled with no-pie.

And it does, so
Closes: https://lore.kernel.org/linux-riscv/20240813-pony-truck-3e7a83e9759e@spud/
Reported-by: Conor Dooley <conor.dooley@...rochip.com>
Tested-by: Conor Dooley <conor.dooley@...rochip.com>

Cheers,
Conor.

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ