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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240217115926.GA1564615@ravnborg.org>
Date: Sat, 17 Feb 2024 12:59:26 +0100
From: Sam Ravnborg <sam@...nborg.org>
To: Andreas Larsson <andreas@...sler.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Arnd Bergmann <arnd@...nel.org>, Helge Deller <deller@....de>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Alan Stern <stern@...land.harvard.edu>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
	sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-usb@...r.kernel.org, linux-fbdev@...r.kernel.org,
	dri-devel@...ts.freedesktop.org, linux-sound@...r.kernel.org
Subject: Re: [PATCH 17/27] sparc32: Drop run-time patching of ASI instructions

Hi Andreas,

> > diff --git a/arch/sparc/include/asm/winmacro.h b/arch/sparc/include/asm/winmacro.h
> > index b6e911f5d93c..c496b04cdfaf 100644
> > --- a/arch/sparc/include/asm/winmacro.h
> > +++ b/arch/sparc/include/asm/winmacro.h
> > @@ -108,18 +108,11 @@
> >  661:	rd	%tbr, %idreg;				\
> >  	srl	%idreg, 10, %idreg;			\
> >  	and	%idreg, 0xc, %idreg;			\
> 
> These three lines, including the label, should also be removed as they
> are not for LEON. Additionally, I think it would be best to split out
> removing the cpuid instruction fixups to one patch and the MMU ASI
> instruction fixups to another patch.

Nice catch!
I will fix this and split up in two patches in v2.
It will take some days before I have v2 ready, and I will base it on top
of your for-next branch in the sparc.git tree.

	Sam

> 
> > -	.section	.cpuid_patch, "ax";		\
> > -	/* Instruction location. */			\
> > -	.word		661b;				\
> > -	/* SUN4D implementation. */			\
> > -	lda	 [%g0] ASI_M_VIKING_TMP1, %idreg;	\
> > -	sll	 %idreg, 2, %idreg;			\
> > -	nop;						\
> > -	/* LEON implementation. */			\
> > +							\
> >  	rd 	%asr17, %idreg;				\
> >  	srl	%idreg, 0x1c, %idreg;			\
> >  	sll	%idreg, 0x02, %idreg;			\
> > -	.previous;					\
> > +							\
> >  	sethi    %hi(current_set), %dest_reg; 		\
> >  	or       %dest_reg, %lo(current_set), %dest_reg;\
> >  	ld       [%idreg + %dest_reg], %dest_reg;
> > diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
> > index 0f2417ee3f95..9cf8f87e8c42 100644
> > --- a/arch/sparc/kernel/entry.S
> > +++ b/arch/sparc/kernel/entry.S
> 
> The hard_smp_processor_id function also needs to be reduced to just the
> LEON code. With the patching removed, SMP otherwise breaks with CPUs
> other than CPU 0 getting stuck.
> 
> Thanks,
> Andreas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ