Set the default release to that single value for all ISAs.
glibc has checks for the kernel version based on uname, and refuses
to start any syscall emulation programs if those checks don't pass with
error:
FATAL: kernel too old
The ideal solution to this problem is to actually implement all missing
system calls for the required kernel version and bumping the release
accordingly.
However, it is very hard to implement all missing syscalls and verify
compliance.
Previously, we have simply bumped the version manually from time to
time when major glibc versions started breaking.
This commit alleviates the problem in two ways.
Firstly, having a single kernel version for all versions means that it is
easier to bump all versions at once.
Secondly, it makes it is possible to set the release with a parameter,
which in turn can be set from the command line with:
se.py --param 'system.cpu[:].workload[:].release = "4.18.0"'
Change-Id: I9e3c31073bfe68735f7b0775c8e299aa62b98222
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17849
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
strcpy(name->sysname, "Linux");
strcpy(name->nodename, "sim.gem5.org");
- strcpy(name->release, "3.0.0");
+ strcpy(name->release, process->release.c_str());
strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
strcpy(name->machine, "alpha");
strcpy(name->sysname, "Linux");
strcpy(name->nodename, "m5.eecs.umich.edu");
- strcpy(name->release, "3.7.0+");
+ strcpy(name->release, process->release.c_str());
strcpy(name->version, "#1 SMP Sat Dec 1 00:00:00 GMT 2012");
strcpy(name->machine, "armv7l");
strcpy(name->sysname, "Linux");
strcpy(name->nodename, "gem5");
- strcpy(name->release, "4.10.8+");
+ strcpy(name->release, process->release.c_str());
strcpy(name->version, "#1 SMP Sat Dec 1 00:00:00 GMT 2012");
strcpy(name->machine, "armv8l");
strcpy(name->sysname, "Linux");
strcpy(name->nodename,"sim.gem5.org");
- strcpy(name->release, "3.0.0");
+ strcpy(name->release, process->release.c_str());
strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
strcpy(name->machine, "mips");
strcpy(name->sysname, "Linux");
strcpy(name->nodename, "sim.gem5.org");
- strcpy(name->release, "3.0.0");
+ strcpy(name->release, process->release.c_str());
strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
strcpy(name->machine, "power");
strcpy(name->sysname, "Linux");
strcpy(name->nodename,"sim.gem5.org");
- strcpy(name->release, "3.0.0");
+ strcpy(name->release, process->release.c_str());
strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
strcpy(name->machine, "riscv64");
strcpy(name->sysname, "Linux");
strcpy(name->nodename,"sim.gem5.org");
- strcpy(name->release, "3.0.0");
+ strcpy(name->release, process->release.c_str());
strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
strcpy(name->machine, "riscv32");
strcpy(name->sysname, "Linux");
strcpy(name->nodename, "sim.gem5.org");
- strcpy(name->release, "3.0.0-sparc64");
+ strcpy(name->release, process->release.c_str());
strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
strcpy(name->machine, "sparc");
strcpy(name->sysname, "SunOS");
strcpy(name->nodename, "m5.eecs.umich.edu");
- strcpy(name->release, "5.9"); //?? do we want this or something newer?
+ strcpy(name->release, process->release.c_str());
strcpy(name->version, "Generic_118558-21");
strcpy(name->machine, "sun4u");
strcpy(name->sysname, "Linux");
strcpy(name->nodename, "sim.gem5.org");
- strcpy(name->release, "3.2.0");
+ strcpy(name->release, process->release.c_str());
strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
strcpy(name->machine, "x86_64");
cwd = Param.String(getcwd(), "current working directory")
simpoint = Param.UInt64(0, 'simulation point at which to start simulation')
drivers = VectorParam.EmulatedDriver([], 'Available emulated drivers')
+ release = Param.String('5.1.0', "Linux kernel uname release")
@classmethod
def export_methods(cls, code):
executable(params->executable),
tgtCwd(normalize(params->cwd)),
hostCwd(checkPathRedirect(tgtCwd)),
+ release(params->release),
_uid(params->uid), _euid(params->euid),
_gid(params->gid), _egid(params->egid),
_pid(params->pid), _ppid(params->ppid),
std::string tgtCwd;
std::string hostCwd;
+ // Syscall emulation uname release.
+ std::string release;
+
// Id of the owner of the process
uint64_t _uid;
uint64_t _euid;