linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] process_madvise.2: Document the glibc wrapper
@ 2024-02-25 12:23 Alejandro Colomar
  2024-02-25 12:23 ` [PATCH 2/2] process_madvise.2: Rename parameter, and use array syntax Alejandro Colomar
  2024-02-27 22:16 ` [PATCH 1/2] process_madvise.2: Document the glibc wrapper Guillem Jover
  0 siblings, 2 replies; 4+ messages in thread
From: Alejandro Colomar @ 2024-02-25 12:23 UTC (permalink / raw)
  To: linux-man; +Cc: Alejandro Colomar, Florian Weimer, Carlos O'Donell

[-- Attachment #1: Type: text/plain, Size: 1847 bytes --]

$ grepc -n process_madvise /usr/include/
/usr/include/x86_64-linux-gnu/bits/mman_ext.h:25:
extern __ssize_t process_madvise (int __pid_fd, const struct iovec *__iov,
				  size_t __count, int __advice,
				  unsigned __flags)
  __THROW;

Reported-by: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
 man2/process_madvise.2 | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/man2/process_madvise.2 b/man2/process_madvise.2
index 53fd57598..ed8739663 100644
--- a/man2/process_madvise.2
+++ b/man2/process_madvise.2
@@ -13,23 +13,12 @@ .SH LIBRARY
 .RI ( libc ", " \-lc )
 .SH SYNOPSIS
 .nf
-.BR "#include <sys/mman.h>" "      /* Definition of " MADV_* " constants */"
-.BR "#include <sys/syscall.h>" "   /* Definition of " SYS_* " constants */"
-.BR "#include <sys/uio.h>" "       /* Definition of " "struct iovec" " type */"
-.B #include <unistd.h>
+.B #include <sys/mman.h>
 .P
-.BI "ssize_t syscall(SYS_process_madvise, int " pidfd ,
-.BI "                const struct iovec *" iovec ", size_t " vlen \
-", int " advice ,
-.BI "                unsigned int " flags ");"
+.BI "ssize_t process_madvise(int " pidfd ", const struct iovec *" iovec ,
+.BI "                        size_t " vlen ", int " advice \
+", unsigned int " flags );
 .fi
-.P
-.IR Note :
-glibc provides no wrapper for
-.BR process_madvise (),
-necessitating the use of
-.BR syscall (2).
-.\" FIXME: See <https://sourceware.org/bugzilla/show_bug.cgi?id=27380>
 .SH DESCRIPTION
 The
 .BR process_madvise ()
@@ -187,6 +176,7 @@ .SH STANDARDS
 Linux.
 .SH HISTORY
 Linux 5.10.
+glibc 2.36.
 .\" commit ecb8ac8b1f146915aa6b96449b66dd48984caacc
 .P
 Support for this system call is optional,
-- 
2.43.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [PATCH 2/2] process_madvise.2: Rename parameter, and use array syntax
  2024-02-25 12:23 [PATCH 1/2] process_madvise.2: Document the glibc wrapper Alejandro Colomar
@ 2024-02-25 12:23 ` Alejandro Colomar
  2024-02-27 22:16 ` [PATCH 1/2] process_madvise.2: Document the glibc wrapper Guillem Jover
  1 sibling, 0 replies; 4+ messages in thread
From: Alejandro Colomar @ 2024-02-25 12:23 UTC (permalink / raw)
  To: linux-man; +Cc: Alejandro Colomar, Florian Weimer, Carlos O'Donell

[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]

Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
 man2/process_madvise.2 | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/man2/process_madvise.2 b/man2/process_madvise.2
index ed8739663..2d91924ca 100644
--- a/man2/process_madvise.2
+++ b/man2/process_madvise.2
@@ -15,8 +15,8 @@ .SH SYNOPSIS
 .nf
 .B #include <sys/mman.h>
 .P
-.BI "ssize_t process_madvise(int " pidfd ", const struct iovec *" iovec ,
-.BI "                        size_t " vlen ", int " advice \
+.BI "ssize_t process_madvise(int " pidfd ", const struct iovec " iovec [. n ],
+.BI "                        size_t " n ", int " advice \
 ", unsigned int " flags );
 .fi
 .SH DESCRIPTION
@@ -27,7 +27,7 @@ .SH DESCRIPTION
 It provides the advice for the address ranges described by
 .I iovec
 and
-.IR vlen .
+.IR n .
 The goal of such advice is to improve system or application performance.
 .P
 The
@@ -43,7 +43,7 @@ .SH DESCRIPTION
 structures, described in
 .BR iovec (3type).
 .P
-.I vlen
+.I n
 specifies the number of elements in the array of
 .I iovec
 structures.
@@ -80,12 +80,12 @@ .SH DESCRIPTION
 specified as 0.
 .P
 The
-.I vlen
+.I n
 and
 .I iovec
 arguments are checked before applying any advice.
 If
-.I vlen
+.I n
 is too big, or
 .I iovec
 is invalid,
@@ -152,7 +152,7 @@ .SH ERRORS
 value.
 .TP
 .B EINVAL
-.I vlen
+.I n
 is too large.
 .TP
 .B ENOMEM
-- 
2.43.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 1/2] process_madvise.2: Document the glibc wrapper
  2024-02-25 12:23 [PATCH 1/2] process_madvise.2: Document the glibc wrapper Alejandro Colomar
  2024-02-25 12:23 ` [PATCH 2/2] process_madvise.2: Rename parameter, and use array syntax Alejandro Colomar
@ 2024-02-27 22:16 ` Guillem Jover
  2024-02-27 23:14   ` Alejandro Colomar
  1 sibling, 1 reply; 4+ messages in thread
From: Guillem Jover @ 2024-02-27 22:16 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man, Florian Weimer, Carlos O'Donell

Hi!

On Sun, 2024-02-25 at 13:23:22 +0100, Alejandro Colomar wrote:
> diff --git a/man2/process_madvise.2 b/man2/process_madvise.2
> index 53fd57598..ed8739663 100644
> --- a/man2/process_madvise.2
> +++ b/man2/process_madvise.2
> @@ -187,6 +176,7 @@ .SH STANDARDS
>  Linux.
>  .SH HISTORY
>  Linux 5.10.
> +glibc 2.36.
>  .\" commit ecb8ac8b1f146915aa6b96449b66dd48984caacc

This commit id seems to belong to Linux, so perhaps keep it after the
Linux version reference?

Thanks,
Guillem

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

* Re: [PATCH 1/2] process_madvise.2: Document the glibc wrapper
  2024-02-27 22:16 ` [PATCH 1/2] process_madvise.2: Document the glibc wrapper Guillem Jover
@ 2024-02-27 23:14   ` Alejandro Colomar
  0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Colomar @ 2024-02-27 23:14 UTC (permalink / raw)
  To: Guillem Jover, linux-man, Florian Weimer, Carlos O'Donell

[-- Attachment #1: Type: text/plain, Size: 2091 bytes --]

Hi!

On Tue, Feb 27, 2024 at 11:16:16PM +0100, Guillem Jover wrote:
> Hi!
> 
> On Sun, 2024-02-25 at 13:23:22 +0100, Alejandro Colomar wrote:
> > diff --git a/man2/process_madvise.2 b/man2/process_madvise.2
> > index 53fd57598..ed8739663 100644
> > --- a/man2/process_madvise.2
> > +++ b/man2/process_madvise.2
> > @@ -187,6 +176,7 @@ .SH STANDARDS
> >  Linux.
> >  .SH HISTORY
> >  Linux 5.10.
> > +glibc 2.36.
> >  .\" commit ecb8ac8b1f146915aa6b96449b66dd48984caacc
> 
> This commit id seems to belong to Linux, so perhaps keep it after the
> Linux version reference?

Yup!  Thanks.  Since I already pushed that to master, I've written a
fix.  I'll push it tomorrow, if it looks good to you.

Havea lovely night!
Alex

---

commit 22c0efa9a291c666c0b44a74b9a7ff4a04a7f674 (HEAD -> contrib)
Author: Alejandro Colomar <alx@kernel.org>
Date:   Wed Feb 28 00:10:23 2024 +0100

    process_madvise.2: Fix comments about commit ids
    
    Move the comment about the Linux commit id, specify that it's a Linux
    commit, and add the glibc commit id too.
    
    Link: <https://sourceware.org/bugzilla/show_bug.cgi?id=27380>
    Link: <https://lore.kernel.org/linux-man/Zd5fMGvIlmhQyONs@thunder.hadrons.org/T/#m9129640e1293a94ff1606a2f973522f40c968306>
    Reported-by: Guillem Jover <guillem@hadrons.org>
    Cc: Florian Weimer <fweimer@redhat.com>
    Cc: Carlos O'Donell <carlos@redhat.com>
    Signed-off-by: Alejandro Colomar <alx@kernel.org>

diff --git a/man2/process_madvise.2 b/man2/process_madvise.2
index 2d91924ca..2c9f0b3f9 100644
--- a/man2/process_madvise.2
+++ b/man2/process_madvise.2
@@ -176,8 +176,9 @@ .SH STANDARDS
 Linux.
 .SH HISTORY
 Linux 5.10.
+.\" Linux commit ecb8ac8b1f146915aa6b96449b66dd48984caacc
 glibc 2.36.
-.\" commit ecb8ac8b1f146915aa6b96449b66dd48984caacc
+.\" glibc commit d19ee3473d68ca0e794f3a8b7677a0983ae1342e
 .P
 Support for this system call is optional,
 depending on the setting of the

-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2024-02-27 23:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-25 12:23 [PATCH 1/2] process_madvise.2: Document the glibc wrapper Alejandro Colomar
2024-02-25 12:23 ` [PATCH 2/2] process_madvise.2: Rename parameter, and use array syntax Alejandro Colomar
2024-02-27 22:16 ` [PATCH 1/2] process_madvise.2: Document the glibc wrapper Guillem Jover
2024-02-27 23:14   ` Alejandro Colomar

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).