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: <cbbc32d4bb0f445197eb5d84d796595c@AcuMS.aculab.com>
Date:   Tue, 18 Oct 2022 07:48:04 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Huacai Chen' <chenhuacai@...nel.org>,
        WANG Xuerui <kernel@...0n.name>
CC:     Huacai Chen <chenhuacai@...ngson.cn>,
        "loongarch@...ts.linux.dev" <loongarch@...ts.linux.dev>,
        Xuefeng Li <lixuefeng@...ngson.cn>,
        Tiezhu Yang <yangtiezhu@...ngson.cn>,
        Guo Ren <guoren@...nel.org>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH V2] LoongArch: Add unaligned access support

From: Huacai Chen
> Sent: 18 October 2022 08:33
...
> > What about my more structured approach in another reply that avoids the
> > huge else-if conditions? Both the terrible line wraps and codegen could
> > be avoided.
...
> OK, let me try.

I suspect you can mask out some 'operand size' bits from the
instructions - instead of checking each opcode.

I'm also pretty sure you can't assume the FP register are live.
If a read from userspace faults then there can be a full
process switch - so by the time you try to write to the
FP registers they no longer belong to the current process.

It might be safer and simpler to just enforce the FP
registers be saved and then act on the save area.
I'd guess they get restored in the 'return to userspace'
code.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ