From: Tony Ambardar <tony.ambardar@gmail.com>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com
Subject: Re: [musl] [PATCH v2] add renameat2 linux syscall wrapper
Date: Mon, 6 May 2024 16:42:10 -0700 [thread overview]
Message-ID: <Zjlq0nlT6POMfWb8@kodidev-ubuntu> (raw)
In-Reply-To: <20240506145056.GG10433@brightrain.aerifal.cx>
On Mon, May 06, 2024 at 10:50:57AM -0400, Rich Felker wrote:
> On Tue, Apr 23, 2024 at 04:43:55PM -0700, Tony Ambardar wrote:
> > This syscall is available since Linux 3.15 and also implemented in glibc
> > from version 2.28. It is commonly used in filesystem or security contexts.
> >
[SNIP]
>
> If flags is 0, the SYS_renameat syscall is semantically equivalent to
> the SYS_renameat2 one, so it would be better to just unconditionally
> do that first rather than failing and falling back.
>
Do you mean rearranging and dropping the ENOSYS conditional, e.g. something
like below?
> int r;
> #ifdef SYS_renameat
> if (!flags) r = __syscall(SYS_renameat, oldfd, old, newfd, new);
> else
> #endif
> r = __syscall(SYS_renameat2, oldfd, old, newfd, new, flags);
> return __syscall_ret(r);
Please clarify and I'll update.
Thanks,
Tony
> Rich
next prev parent reply other threads:[~2024-05-06 23:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-21 15:36 [musl] [PATCH v1] " Tony Ambardar
2024-04-22 22:47 ` Rich Felker
2024-04-23 4:39 ` Tony Ambardar
2024-04-23 15:51 ` Rich Felker
2024-04-23 14:49 ` enh
2024-04-23 15:48 ` Rich Felker
2024-04-23 23:43 ` [musl] [PATCH v2] " Tony Ambardar
2024-05-06 14:50 ` Rich Felker
2024-05-06 23:42 ` Tony Ambardar [this message]
2024-05-07 0:01 ` Rich Felker
2024-05-07 3:28 ` [musl] [PATCH v3] " Tony Ambardar
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=Zjlq0nlT6POMfWb8@kodidev-ubuntu \
--to=tony.ambardar@gmail.com \
--cc=dalias@libc.org \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).