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]
Message-Id: <7797a7b2-1bb2-4c45-b65d-678f685dfa3d@app.fastmail.com>
Date: Wed, 10 Jul 2024 13:34:41 +0800
From: "Jiaxun Yang" <jiaxun.yang@...goat.com>
To: "Thomas Bogendoerfer" <tsbogend@...ha.franken.de>
Cc: "Maciej W. Rozycki" <macro@...am.me.uk>,
 "Jonathan Corbet" <corbet@....net>, linux-doc@...r.kernel.org,
 linux-kernel@...r.kernel.org,
 "linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
 Philippe Mathieu-Daudé <philmd@...aro.org>
Subject: Re: [PATCH v3] MIPS: Implement ieee754 NAN2008 emulation mode



在2024年7月9日七月 下午4:55,Thomas Bogendoerfer写道:
> On Fri, Jun 28, 2024 at 01:33:06AM +0100, Jiaxun Yang wrote:
>> 
>> 
>> 在2024年6月27日六月 下午8:54,Maciej W. Rozycki写道:
>> > On Thu, 27 Jun 2024, Jiaxun Yang wrote:
>> >
>> >> >> @@ -318,6 +318,10 @@ void mips_set_personality_nan(struct arch_elf_state *state)
>> >> >>  	t->thread.fpu.fcr31 = c->fpu_csr31;
>> >> >>  	switch (state->nan_2008) {
>> >> >>  	case 0:
>> >> >> +		if (!(c->fpu_msk31 & FPU_CSR_NAN2008))
>> >> >> +			t->thread.fpu.fcr31 &= ~FPU_CSR_NAN2008;
>> >> >> +		if (!(c->fpu_msk31 & FPU_CSR_ABS2008))
>> >> >> +			t->thread.fpu.fcr31 &= ~FPU_CSR_ABS2008;
>> >> >
>> >> > why is this needed?
>> >> 
>> >> Because t->thread.fpu.fcr31 comes from c->fpu_csr31, in this case we the default
>> >> value of c->fpu_csr31 is read from hardware and we don't know what would that be.
>> >
>> >  But it has always been like this.  What has changed with your patch that 
>> > you need to mask the bit out now?
>> 
>> After this patch kernel's copy of t->thread.fpu.fcr31 can disagree with hardware.
>> When disagree happens, we trigger emulation.
>> 
>> Before that patch for nan legacy binary running on nan2008 CPU t->thread.fpu.fcr31
>> will still be nan2008 (for ieee754=relaxed) so that's not relevant.
>
> I'm considering to apply your patch, how much testing/verification did
> this patch see ? Do have some test binaries ?

It has been tested against Debian rootfs. There is no need to test againt special binary,
but you need NaN2008 hardware such as Loongson 3A4000.

Thanks
- Jiaxun
>
> Thomas.
>
> -- 
> Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
> good idea.                                                [ RFC1925, 2.3 ]

-- 
- Jiaxun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ