From: Kris Van Hees <kris.van.hees@oracle.com>
To: eugene.loh@oracle.com
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [DTrace-devel] [PATCH 2/4] test: Use syscall in case of no execveat() wrapper
Date: Tue, 7 Oct 2025 11:38:52 -0400 [thread overview]
Message-ID: <aOU0DIiPaRiTpG5D@oracle.com> (raw)
In-Reply-To: <20251006215726.8893-2-eugene.loh@oracle.com>
On Mon, Oct 06, 2025 at 05:57:24PM -0400, eugene.loh--- via DTrace-devel wrote:
> From: Eugene Loh <eugene.loh@oracle.com>
>
> While execveat() appeared in kernel 3.19, GNU C library support
> came later. We are still testing on some systems with older libc.
Wow, we do? I am curious where...
> Do not assume libc has an execveat() wrapper: use syscall().
>
> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
> ---
> test/unittest/proc/tst.exec-execveat.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/test/unittest/proc/tst.exec-execveat.sh b/test/unittest/proc/tst.exec-execveat.sh
> index db68a5043..e4b9dfa5e 100755
> --- a/test/unittest/proc/tst.exec-execveat.sh
> +++ b/test/unittest/proc/tst.exec-execveat.sh
> @@ -17,7 +17,7 @@ cd $DIRNAME
> cat << EOF > parent.c
> #include <stdio.h>
> #include <linux/fcntl.h> /* Definition of AT_* constants */
> -#define __USE_GNU /* so unistd.h will find execveat */
> +#include <sys/syscall.h> /* Definition of SYS_* constants */
> #include <unistd.h>
>
> int main(int c, char **v) {
> @@ -26,7 +26,7 @@ int main(int c, char **v) {
> int rc;
>
> printf("exec\n");
> - rc = execveat(AT_FDCWD, "bogus_direc/bogus_exec", argv, envp, 0);
> + rc = syscall(__NR_execveat, AT_FDCWD, "bogus_direc/bogus_exec", argv, envp, 0);
>
> return 0;
> }
> --
> 2.47.3
>
>
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel@oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel
next prev parent reply other threads:[~2025-10-07 15:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-06 21:57 [PATCH 1/4] test: Turn char[16] into string to ignore garbage bytes eugene.loh
2025-10-06 21:57 ` [PATCH 2/4] test: Use syscall in case of no execveat() wrapper eugene.loh
2025-10-07 15:38 ` Kris Van Hees [this message]
2025-10-07 17:44 ` [DTrace-devel] " Eugene Loh
2025-10-06 21:57 ` [PATCH 3/4] test: Supply XFAIL for tests that use vtimestamp eugene.loh
2025-10-07 15:41 ` [DTrace-devel] " Kris Van Hees
2025-10-07 22:54 ` Eugene Loh
2025-10-06 21:57 ` [PATCH 4/4] test: Skip D return() action if kernel not configured right eugene.loh
2025-10-06 22:14 ` Kris Van Hees
2025-10-07 15:37 ` [PATCH 1/4] test: Turn char[16] into string to ignore garbage bytes Kris Van Hees
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aOU0DIiPaRiTpG5D@oracle.com \
--to=kris.van.hees@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
--cc=eugene.loh@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox