| Summary: | Add support for new syscall memfd_secret | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Di Chen <di.chen16> |
| Component: | general | Assignee: | Di Chen <di.chen16> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | mark |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
[patch] memfd test should be memfd_create test
[patch v1] Support new memfd_secret linux syscall (447) |
||
|
Description
Di Chen
2022-03-25 10:20:55 UTC
Created attachment 147839 [details]
[patch] memfd test should be memfd_create test
memfd test should be memfd_create test
Currently, syscall memfd_create was tested by this:
$ perl tests/vg_regtest memcheck/tests/linux/memfd.vgtest
Since memfd_secret introduced in kernel 5.14, valgrind should rename
the "memfd" test to "memfd_create" test to avoid the ambiguity, so that
user will not get confused with the "memfd_secret" test.
After this change, syscall memfd_create will be tested by:
$ perl tests/vg_regtest memcheck/tests/linux/memfd_create.vgtest
Looks like my email about this to your @outlook.com address bounced. So just in case you didn't see it: Thanks, that applied fine. And I admit having been confused by memfd_create vs memfd_secret before. I have pushed this. Hope that helps creating a separate memfd_secret. But we are very close to the 3.19.0 release. So that might have to wait till after the release. Created attachment 148223 [details] [patch v1] Support new memfd_secret linux syscall (447) This patch supports memfd_secret across these arches: arm64, amd64(x86_64), x86(i386) according to this link[1]. This patch does not contain a corresponding test case. [1] https://marcin.juszkiewicz.com.pl/download/tables/syscalls.html I can see how adding a testcase is somewhat tricky if it depends on whether it is enabled by a boot flag. But the code looks correct. Pushed as: commit fca4a3d8e59c29bc7d239ff4de72b1260c0c23ee Author: Di Chen <dichen@redhat.com> Date: Fri Apr 15 00:08:17 2022 +0800 Support new memfd_secret linux syscall (447) memfd_secret is a new syscall in linux 5.14. memfd_secret() is disabled by default and a command-line option needs to be added to enable it at boot time. $ cat /proc/cmdline [...] secretmem.enable=y https://bugs.kde.org/451878 https://lwn.net/Articles/865256/ Thanks |