public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Linux: add ST_NOSYMFOLLOW
@ 2023-09-22  0:14 Kir Kolyshkin
  2023-09-22 19:55 ` DJ Delorie
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kir Kolyshkin @ 2023-09-22  0:14 UTC (permalink / raw)
  To: libc-alpha; +Cc: Kir Kolyshkin

Linux v5.10 added a mount option MS_NOSYMFOLLOW, which was added to
glibc in commit 0ca21427d950755b.

Add the corresponding statfs/statvfs flag bit, ST_NOSYMFOLLOW.
---
 sysdeps/unix/sysv/linux/bits/statvfs.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sysdeps/unix/sysv/linux/bits/statvfs.h b/sysdeps/unix/sysv/linux/bits/statvfs.h
index cf98460e00..7195fdf874 100644
--- a/sysdeps/unix/sysv/linux/bits/statvfs.h
+++ b/sysdeps/unix/sysv/linux/bits/statvfs.h
@@ -105,7 +105,9 @@ enum
 # define ST_NOATIME	ST_NOATIME
   ST_NODIRATIME = 2048,		/* Do not update directory access times.  */
 # define ST_NODIRATIME	ST_NODIRATIME
-  ST_RELATIME = 4096		/* Update atime relative to mtime/ctime.  */
+  ST_RELATIME = 4096,		/* Update atime relative to mtime/ctime.  */
 # define ST_RELATIME	ST_RELATIME
+  ST_NOSYMFOLLOW = 8192,	/* Do not follow symlinks.  */
+# define ST_NOSYMFOLLOW	ST_NOSYMFOLLOW
 #endif	/* Use GNU.  */
 };
-- 
2.41.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Linux: add ST_NOSYMFOLLOW
  2023-09-22  0:14 [PATCH] Linux: add ST_NOSYMFOLLOW Kir Kolyshkin
@ 2023-09-22 19:55 ` DJ Delorie
  2023-09-24 11:52   ` Alexander Monakov
  2023-09-27 22:00 ` [PATCH v2] " Kir Kolyshkin
  2023-09-27 22:37 ` [PATCH v3] " Kir Kolyshkin
  2 siblings, 1 reply; 6+ messages in thread
From: DJ Delorie @ 2023-09-22 19:55 UTC (permalink / raw)
  To: Kir Kolyshkin; +Cc: libc-alpha

Kir Kolyshkin <kolyshkin@gmail.com> writes:
> -  ST_RELATIME = 4096		/* Update atime relative to mtime/ctime.  */
> +  ST_RELATIME = 4096,		/* Update atime relative to mtime/ctime.  */

Comma, ok.

>  # define ST_RELATIME	ST_RELATIME
> +  ST_NOSYMFOLLOW = 8192,	/* Do not follow symlinks.  */
> +# define ST_NOSYMFOLLOW	ST_NOSYMFOLLOW

Matches the kernel, Ok.

LGTM
Reviewed-by: DJ Delorie <dj@redhat.com>

Do you need someone to commit this for you?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Linux: add ST_NOSYMFOLLOW
  2023-09-22 19:55 ` DJ Delorie
@ 2023-09-24 11:52   ` Alexander Monakov
  0 siblings, 0 replies; 6+ messages in thread
From: Alexander Monakov @ 2023-09-24 11:52 UTC (permalink / raw)
  To: DJ Delorie; +Cc: Kir Kolyshkin, libc-alpha


On Fri, 22 Sep 2023, DJ Delorie wrote:

> Kir Kolyshkin <kolyshkin@gmail.com> writes:
> > -  ST_RELATIME = 4096		/* Update atime relative to mtime/ctime.  */
> > +  ST_RELATIME = 4096,		/* Update atime relative to mtime/ctime.  */
> 
> Comma, ok.
> 
> >  # define ST_RELATIME	ST_RELATIME
> > +  ST_NOSYMFOLLOW = 8192,	/* Do not follow symlinks.  */
> > +# define ST_NOSYMFOLLOW	ST_NOSYMFOLLOW
> 
> Matches the kernel, Ok.

It adds a trailing enum comma (invalid in C prior to C99 and C++ prior to C++11)
while it was correctly omitted before.

Alexander

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] Linux: add ST_NOSYMFOLLOW
  2023-09-22  0:14 [PATCH] Linux: add ST_NOSYMFOLLOW Kir Kolyshkin
  2023-09-22 19:55 ` DJ Delorie
@ 2023-09-27 22:00 ` Kir Kolyshkin
  2023-09-27 22:37 ` [PATCH v3] " Kir Kolyshkin
  2 siblings, 0 replies; 6+ messages in thread
From: Kir Kolyshkin @ 2023-09-27 22:00 UTC (permalink / raw)
  To: libc-alpha; +Cc: dj, amonakov, Kir Kolyshkin

Linux v5.10 added a mount option MS_NOSYMFOLLOW, which was added to
glibc in commit 0ca21427d950755b.

Add the corresponding statfs/statvfs flag bit, ST_NOSYMFOLLOW.
---
 sysdeps/unix/sysv/linux/bits/statvfs.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sysdeps/unix/sysv/linux/bits/statvfs.h b/sysdeps/unix/sysv/linux/bits/statvfs.h
index cf98460e00..7195fdf874 100644
--- a/sysdeps/unix/sysv/linux/bits/statvfs.h
+++ b/sysdeps/unix/sysv/linux/bits/statvfs.h
@@ -105,7 +105,9 @@ enum
 # define ST_NOATIME	ST_NOATIME
   ST_NODIRATIME = 2048,		/* Do not update directory access times.  */
 # define ST_NODIRATIME	ST_NODIRATIME
-  ST_RELATIME = 4096		/* Update atime relative to mtime/ctime.  */
+  ST_RELATIME = 4096,		/* Update atime relative to mtime/ctime.  */
 # define ST_RELATIME	ST_RELATIME
+  ST_NOSYMFOLLOW = 8192,	/* Do not follow symlinks.  */
+# define ST_NOSYMFOLLOW	ST_NOSYMFOLLOW
 #endif	/* Use GNU.  */
 };
-- 
2.41.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3] Linux: add ST_NOSYMFOLLOW
  2023-09-22  0:14 [PATCH] Linux: add ST_NOSYMFOLLOW Kir Kolyshkin
  2023-09-22 19:55 ` DJ Delorie
  2023-09-27 22:00 ` [PATCH v2] " Kir Kolyshkin
@ 2023-09-27 22:37 ` Kir Kolyshkin
  2023-09-28 12:51   ` Adhemerval Zanella Netto
  2 siblings, 1 reply; 6+ messages in thread
From: Kir Kolyshkin @ 2023-09-27 22:37 UTC (permalink / raw)
  To: libc-alpha; +Cc: dj, amonakov, Kir Kolyshkin

Linux v5.10 added a mount option MS_NOSYMFOLLOW, which was added to
glibc in commit 0ca21427d950755b.

Add the corresponding statfs/statvfs flag bit, ST_NOSYMFOLLOW.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
---
 sysdeps/unix/sysv/linux/bits/statvfs.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sysdeps/unix/sysv/linux/bits/statvfs.h b/sysdeps/unix/sysv/linux/bits/statvfs.h
index cf98460e00..ed965f287f 100644
--- a/sysdeps/unix/sysv/linux/bits/statvfs.h
+++ b/sysdeps/unix/sysv/linux/bits/statvfs.h
@@ -105,7 +105,9 @@ enum
 # define ST_NOATIME	ST_NOATIME
   ST_NODIRATIME = 2048,		/* Do not update directory access times.  */
 # define ST_NODIRATIME	ST_NODIRATIME
-  ST_RELATIME = 4096		/* Update atime relative to mtime/ctime.  */
+  ST_RELATIME = 4096,		/* Update atime relative to mtime/ctime.  */
 # define ST_RELATIME	ST_RELATIME
+  ST_NOSYMFOLLOW = 8192		/* Do not follow symlinks.  */
+# define ST_NOSYMFOLLOW	ST_NOSYMFOLLOW
 #endif	/* Use GNU.  */
 };
-- 
2.41.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] Linux: add ST_NOSYMFOLLOW
  2023-09-27 22:37 ` [PATCH v3] " Kir Kolyshkin
@ 2023-09-28 12:51   ` Adhemerval Zanella Netto
  0 siblings, 0 replies; 6+ messages in thread
From: Adhemerval Zanella Netto @ 2023-09-28 12:51 UTC (permalink / raw)
  To: Kir Kolyshkin, libc-alpha; +Cc: dj, amonakov



On 27/09/23 19:37, Kir Kolyshkin wrote:
> Linux v5.10 added a mount option MS_NOSYMFOLLOW, which was added to
> glibc in commit 0ca21427d950755b.
> 
> Add the corresponding statfs/statvfs flag bit, ST_NOSYMFOLLOW.
> 
> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  sysdeps/unix/sysv/linux/bits/statvfs.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/sysdeps/unix/sysv/linux/bits/statvfs.h b/sysdeps/unix/sysv/linux/bits/statvfs.h
> index cf98460e00..ed965f287f 100644
> --- a/sysdeps/unix/sysv/linux/bits/statvfs.h
> +++ b/sysdeps/unix/sysv/linux/bits/statvfs.h
> @@ -105,7 +105,9 @@ enum
>  # define ST_NOATIME	ST_NOATIME
>    ST_NODIRATIME = 2048,		/* Do not update directory access times.  */
>  # define ST_NODIRATIME	ST_NODIRATIME
> -  ST_RELATIME = 4096		/* Update atime relative to mtime/ctime.  */
> +  ST_RELATIME = 4096,		/* Update atime relative to mtime/ctime.  */
>  # define ST_RELATIME	ST_RELATIME
> +  ST_NOSYMFOLLOW = 8192		/* Do not follow symlinks.  */
> +# define ST_NOSYMFOLLOW	ST_NOSYMFOLLOW
>  #endif	/* Use GNU.  */
>  };

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-28 12:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-22  0:14 [PATCH] Linux: add ST_NOSYMFOLLOW Kir Kolyshkin
2023-09-22 19:55 ` DJ Delorie
2023-09-24 11:52   ` Alexander Monakov
2023-09-27 22:00 ` [PATCH v2] " Kir Kolyshkin
2023-09-27 22:37 ` [PATCH v3] " Kir Kolyshkin
2023-09-28 12:51   ` Adhemerval Zanella Netto

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 read-only IMAP folder(s) and NNTP newsgroup(s).