From: Josh Triplett <[email protected]>
To: Gabriel Krisman Bertazi <[email protected]>
Cc: [email protected], [email protected], [email protected]
Subject: Re: [PATCH RFC liburing 1/2] Add IORING_OP_CLONE/EXEC support
Date: Tue, 10 Dec 2024 13:06:02 -0800 [thread overview]
Message-ID: <Z1itOpICd4Lrz-36@localhost> (raw)
In-Reply-To: <[email protected]>
On Mon, Dec 09, 2024 at 06:44:20PM -0500, Gabriel Krisman Bertazi wrote:
> Signed-off-by: Gabriel Krisman Bertazi <[email protected]>
One issue noted below; with that fixed:
Reviewed-by: Josh Triplett <[email protected]>
> --- a/src/include/liburing.h
> +++ b/src/include/liburing.h
> @@ -1229,6 +1229,31 @@ IOURINGINLINE void io_uring_prep_socket_direct_alloc(struct io_uring_sqe *sqe,
> __io_uring_set_target_fixed_file(sqe, IORING_FILE_INDEX_ALLOC - 1);
> }
>
> +static inline void io_uring_prep_clone(struct io_uring_sqe *sqe)
> +{
> + io_uring_prep_rw(IORING_OP_CLONE, sqe, 0, NULL, 0, 0);
> +}
> +
> +static inline void io_uring_prep_execveat(struct io_uring_sqe *sqe, int dfd,
> + const char *filename, char *const *argv,
> + char *const *envp, int flags)
> +{
> + io_uring_prep_rw(IORING_OP_EXECVEAT, sqe, dfd, filename, 0, 0);
> + sqe->addr2 = (unsigned long)(void *)argv;
> + sqe->addr3 = (unsigned long)(void *)envp;
> + sqe->execve_flags = flags;
> +}
> +
> +static inline void io_uring_prep_exec(struct io_uring_sqe *sqe,
> + const char *filename, char *const *argv,
> + char *const *envp)
> +{
> + io_uring_prep_rw(IORING_OP_EXECVEAT, sqe, 0, filename, 0, 0);
Shouldn't this helper use AT_FDCWD, rather than 0?
next prev parent reply other threads:[~2024-12-10 21:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 23:44 [PATCH RFC liburing 0/2] IORING_OP_CLONE/EXEC support and tests Gabriel Krisman Bertazi
2024-12-09 23:44 ` [PATCH RFC liburing 1/2] Add IORING_OP_CLONE/EXEC support Gabriel Krisman Bertazi
2024-12-10 21:06 ` Josh Triplett [this message]
2024-12-09 23:44 ` [PATCH RFC liburing 2/2] tests: Add test for CLONE/EXEC operations Gabriel Krisman Bertazi
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=Z1itOpICd4Lrz-36@localhost \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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