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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 17 Aug 2021 14:55:09 +0200
From:   Ralf Baechle <ralf@...ux-mips.org>
To:     Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:     "Maciej W. Rozycki" <macro@...ux-mips.org>,
        Paul Burton <paulburton@...nel.org>,
        James Hogan <jhogan@...nel.org>, linux-mips@...r.kernel.org,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: build failure of mips decstation_r4k_defconfig with binutils-2_37

On Tue, Aug 17, 2021 at 12:54:32PM +0100, Sudip Mukherjee wrote:

> While I was testing v5.4.142-rc2 I noticed mips build of
> decstation_r4k_defconfig fails with binutils-2_37. The error is:
> 
> arch/mips/dec/prom/locore.S: Assembler messages:
> arch/mips/dec/prom/locore.S:29: Error: opcode not supported on this
> processor: r4600 (mips3) `rfe'
> 
> I have also reported this at https://sourceware.org/bugzilla/show_bug.cgi?id=28241

It would appear gas got more anal about ISA checking for the RFE instructions
which did only exist in MIPS I and II; MIPS III and later use ERET for
returning from an exception.

The older gas I've got installed here happily accepts RFE in MIPS III/R4000
mode:

$ cat s.s
	rfe
	eret
$ mips-linux-as -o s.o s.s
s.s: Assembler messages:
s.s:2: Error: opcode not supported on this processor: mips1 (mips1) `eret'
$ mips-linux-as -march=r4000 -o s.o s.s
$ mips-linux-objdump -d s.o 

s.o:     file format elf32-tradbigmips


Disassembly of section .text:

00000000 <.text>:
   0:	42000010 	c0	0x10		# <- RFE
   4:	42000018 	eret
	...
$

It's easy to find arguments for why this gas change is the right thing to
do - and not the right thing to do.

It should be fixable by simply putting gas into mips1 mode.  Can you test
below patch?

  Ralf

Signed-off-by: Ralf Baechle <ralf@...ux-mips.org>

diff --git a/arch/mips/dec/prom/locore.S b/arch/mips/dec/prom/locore.S
index 0eb8fab62ab0..8d00ca8872f9 100644
--- a/arch/mips/dec/prom/locore.S
+++ b/arch/mips/dec/prom/locore.S
@@ -16,6 +16,7 @@
 NESTED(genexcept_early, 0, sp)
 	.set	noat
 	.set	noreorder
+	.set	mips1
 
 	mfc0	k0, CP0_STATUS
 	la	k1, mem_err

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ