linux-user: set minimum uname for RISC-V
PATCH 1/1 linux-user: set minimum uname for RISC-V
As support was merged into the mainline kernel at 4.15 it is unlikely 3.8.0 is the correct value. Indeed when I testing binaries created by the current Debian SID compiler the tests failed with:
FATAL: kernel too old
--- linux-user/riscv/target_syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/riscv/target_syscall.h +1 -1
@@ -45,7 +45,7 @@ struct target_pt_regs {#else #define UNAME_MACHINE "riscv64"#endif -#define UNAME_MINIMUM_RELEASE "3.8.0" +#define UNAME_MINIMUM_RELEASE "4.15.0"#define TARGET_MINSIGSTKSZ 2048#define TARGET_MLOCKALL_MCL_CURRENT 1
Signature · 1 line
2.17.0
Quoted 16 lines · On Tue, 24 Apr 2018 09:03:29 PDT (-0700), [email protected] wrote:
As support was merged into the mainline kernel at 4.15 it is unlikely 3.8.0 is the correct value. Indeed when I testing binaries created by the current Debian SID compiler the tests failed with:
FATAL: kernel too old
Signed-off-by Alex Bennée <[email protected]>--- linux-user/riscv/target_syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)linux-user/riscv/target_syscall.h +0
-0
linux-user/riscv/target_syscall.h struct target_pt_regs { · line 51
Quoted 8 lines
linux-user/riscv/target_syscall.h +1
-1@@ -45,7 +45,7 @@ struct target_pt_regs {#else #define UNAME_MACHINE "riscv64"#endif -#define UNAME_MINIMUM_RELEASE "3.8.0" +#define UNAME_MINIMUM_RELEASE "4.15.0"#define TARGET_MINSIGSTKSZ 2048#define TARGET_MLOCKALL_MCL_CURRENT 1
If I understand this correctly, this will make host kernels older than 4.15.0 look like 4.15.0 when a program running in user-mode emulation on a RISC-V system? I think that's the correct thing to do, so if that's the case then feel free to add a
if that helps any.
Thanks!
Quoted 25 lines · Palmer Dabbelt
Quoted 24 lines · On Tue, 24 Apr 2018 09:03:29 PDT (-0700), [email protected] wrote:
As support was merged into the mainline kernel at 4.15 it is unlikely 3.8.0 is the correct value. Indeed when I testing binaries created by the current Debian SID compiler the tests failed with:
FATAL: kernel too old
Signed-off-by Alex Bennée <[email protected]>--- linux-user/riscv/target_syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)linux-user/riscv/target_syscall.h +1
-1@@ -45,7 +45,7 @@ struct target_pt_regs {#else #define UNAME_MACHINE "riscv64"#endif -#define UNAME_MINIMUM_RELEASE "3.8.0" +#define UNAME_MINIMUM_RELEASE "4.15.0"
Quoted 7 lines
linux-user/riscv/target_syscall.h struct target_pt_regs { · line 51
Quoted 2 lines
linux-user/riscv/target_syscall.h +0
-0#define TARGET_MINSIGSTKSZ 2048#define TARGET_MLOCKALL_MCL_CURRENT 1If I understand this correctly, this will make host kernels older than 4.15.0 look like 4.15.0 when a program running in user-mode emulation on a RISC-V system?
Yes. Typically you want to set this to whatever glibc has baked in as its arch_minimum_kernel, which in this case does seem to be 4.15.0:
thanks
-- PMM
Quoted 34 lines · On Tue, 24 Apr 2018 12:07:43 PDT (-0700), [email protected] wrote:
Quoted 25 lines · Palmer Dabbelt
Quoted 24 lines · On Tue, 24 Apr 2018 09:03:29 PDT (-0700), [email protected] wrote:
As support was merged into the mainline kernel at 4.15 it is unlikely 3.8.0 is the correct value. Indeed when I testing binaries created by the current Debian SID compiler the tests failed with:
FATAL: kernel too old
Signed-off-by Alex Bennée <[email protected]>--- linux-user/riscv/target_syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)linux-user/riscv/target_syscall.h +1
-1@@ -45,7 +45,7 @@ struct target_pt_regs {#else #define UNAME_MACHINE "riscv64"#endif -#define UNAME_MINIMUM_RELEASE "3.8.0" +#define UNAME_MINIMUM_RELEASE "4.15.0"Quoted 7 lines
linux-user/riscv/target_syscall.h struct target_pt_regs { · line 51
Quoted 2 lines
linux-user/riscv/target_syscall.h +0
-0#define TARGET_MINSIGSTKSZ 2048#define TARGET_MLOCKALL_MCL_CURRENT 1If I understand this correctly, this will make host kernels older than 4.15.0 look like 4.15.0 when a program running in user-mode emulation on a RISC-V system?
Quoted 5 lines
Yes. Typically you want to set this to whatever glibc has baked in as its
arch_minimum_kernel, which in this case does seem to be 4.15.0:
Sounds good, thanks!
Quoted 10 lines · Alex Bennée
As support was merged into the mainline kernel at 4.15 it is unlikely 3.8.0 is the correct value. Indeed when I testing binaries created by the current Debian SID compiler the tests failed with:
FATAL: kernel too old
Signed-off-by Alex Bennée <[email protected]>--- linux-user/riscv/target_syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
r~