Thread (43 messages) 43 messages, 4 authors, 2022-02-01

Re: [PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support

From: Arnd Bergmann <arnd@arndb.de>
Date: 2022-02-01 09:36:26
Also in: linux-arch, linux-arm-kernel, linux-mips, linux-riscv, linux-s390, lkml, sparclinux

On Tue, Feb 1, 2022 at 10:13 AM Guo Ren [off-list ref] wrote:
On Tue, Feb 1, 2022 at 3:45 PM Christoph Hellwig [off-list ref] wrote:
quoted
On Mon, Jan 31, 2022 at 09:50:58PM +0800, Guo Ren wrote:
quoted
On Mon, Jan 31, 2022 at 8:26 PM Christoph Hellwig [off-list ref] wrote:
quoted
Given that most rv64 implementations can't run in rv32 mode, what is the
failure mode if someone tries it with the compat mode enabled?
A static linked simple hello_world could still run on a non-compat
support hardware. But most rv32 apps would meet different userspace
segment faults.

Current code would let the machine try the rv32 apps without detecting
whether hw support or not.
Hmm, we probably want some kind of check for not even offer running
rv32 binaries.  I guess trying to write UXL some time during early
boot and catching the resulting exception would be the way to go?
Emm... I think it's unnecessary. Free rv32 app running won't cause
system problem, just as a wrong elf running. They are U-mode
privileged.
While it's not a security issue, I think it would be helpful to get a
user-readable error message and a machine-readable /proc/cpuinfo
flag to see if a particular system can run rv32 binaries rather than
relying on SIGILL to kill a process.

        Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help