|
osdir.com mailing list archive F.A.Q. -since 2001! |
|
|
|
Subject: mlock(2) man page modifications - msg#00033List: linux.man
by Date: Prev Next Date Index by Thread: Prev Next Thread Index
Dear Michael,
As per the mlock(2) implementation bugfix which is present in Linux 2.6.27-rc2 git commit, (http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a477097d9c37c1cf289c7f0257dffcfa42d50197), the mlock(2) man page should be modified to reflect the latest changes in the kernel. See the LKML thread regarding this commit : http://www.nabble.com/mlock()-return-value-issue-in-kernel-2.6.23.17-td18751601.html This patch modifies the mlock(2) behaviour as per the SUSv3 specification. [ENOMEM] Some or all of the address range specified by the addr and len arguments does not correspond to valid mapped pages in the address space of the process. [EAGAIN] Some or all of the memory identified by the operation could not be locked when the call was made. Patch for the mlock.2 to include information about EAGAIN. ========================================================== diff -uNr man-pages-3.10/man2/mlock.2 man-pages-3.10_mlock/man2/mlock.2 --- man-pages-3.10/man2/mlock.2 2008-09-23 19:22:25.000000000 +0530 +++ man-pages-3.10_mlock/man2/mlock.2 2008-09-24 19:38:27.786315672 +0530 @@ -175,6 +175,10 @@ .B ENOMEM Some of the specified address range does not correspond to mapped pages in the address space of the process. +.TP +.B EAGAIN +Some of the memory identified by the operation could not be locked when +the function call was made. .LP For .BR mlockall (): ================================================================= Signed-off-by: Maxin B. John <maxin.john-qujY0cBTTHtBDgjK7y7TUQ@xxxxxxxxxxxxxxxx> Kindly let me know if there are any issues with respect to this modification. Thanks and Regards, Maxin B. John Sony India Software Center Bangalore, India -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@xxxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
Thread at a glance:
Previous Message by Date:Re: [LTP] ltp getdents syscalls testcases and 2.6.27-rcXOn Wednesday 24 September 2008 14:48:00 Subrata Modak wrote: > On Tue, 2008-09-16 at 14:27 +0200, Daniel Gollub wrote: > > Hi, > > > > with 2.6.27-rc1(?) linux/dirent.h got removed Kbuild headers_install > > targe and dirent struct got removed: > > > > > > commit cf6ae8b50e0ee3f764392dadd1970e3f03c40773 > > Author: Adrian Bunk <bunk-DgEjT+Ai2ygdnm+yROfE0A@xxxxxxxxxxxxxxxx> > > Date:  Fri Jul 25 01:46:46 2008 -0700 > > > >   remove the in-kernel struct dirent{,64} > >   > >   The kernel struct dirent{,64} were different from the ones in > >   userspace. > >   > >   Even worse, we exported the kernel ones to userspace. > >   > >   But after the fat usages are fixed we can remove the conflicting > >   kernel versions. > > > > > > This broke the build of some LTP syscalls testcases for "getdents", since > > the <linux/dirent.h> include is missing and the "internal" dirent struct > > get/got used in: > > > > testcases/kernel/syscalls/getdents/getdents01.c  > > testcases/kernel/syscalls/getdents/getdents03.c > > testcases/kernel/syscalls/getdents/getdents02.c  > > testcases/kernel/syscalls/getdents/getdents04.c > > > > http://ltp.cvs.sourceforge.net/ltp/ltp/testcases/kernel/syscalls/getdents > >/ > > > > Is it safe to use the userspace dirent struct from <dirent.h> to fix the > > build of this? Or what should be used for testing the getdents interface > > instead? > > Yes, it is. There are numerous test cases in LTP which use: > ÂÂÂÂÂÂÂÂstruct dirent, > by including /usr/include/dirent.h. The interesting part is, this guy > (/usr/include/dirent.h) in turn includes /usr/include/bits/dirent.h, > where the definition of struct resides. Following is the patch which > solves this issue along with page.h header file removal from 2.6.25 > onwards, reported by Garret earlier. Tried the patch - ltp build with 2.6.27-rc linux headers sucessfully. Thanks for the info and the patch! Btw. man pages need to get also updated ... there are some pages which still mention <linux/dirent.h>. Garret, with 2.6.25 <asm/page.h> got removed - right? If so swapon(2) man page needs also get fixed: dgollub@marvin:~/projects/man-pages> grep -r "asm\/page.h" * man2/swapon.2:.B #include <asm/page.h> /* to find PAGE_SIZE */ best regards, Daniel --- diff --git a/man2/getdents.2 b/man2/getdents.2 index bd9d261..eb13258 100644 --- a/man2/getdents.2 +++ b/man2/getdents.2 @@ -30,8 +30,8 @@ getdents \- get directory entries .SH SYNOPSIS .nf .B #include <unistd.h> +.B #include <dirent.h> .B #include <linux/types.h> -.B #include <linux/dirent.h> .B #include <linux/unistd.h> .B #include <errno.h> diff --git a/man2/readdir.2 b/man2/readdir.2 index a757da1..b831320 100644 --- a/man2/readdir.2 +++ b/man2/readdir.2 @@ -30,8 +30,8 @@ readdir \- read directory entry .SH SYNOPSIS .nf +.B #include <dirent.h> .B #include <linux/types.h> -.B #include <linux/dirent.h> .sp .BI "int readdir(unsigned int " fd ", struct dirent *" dirp "," .BI " unsigned int " count ); -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@xxxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Next Message by Date:[patch] hsearch.3: Call hdestroy() after using hash table created by hcreate(), for the sake of completenessFrom dc0f26d3112519229671c621832f87a48e972642 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Andr=C3=A9=20Goddard=20Rosa?= <andre.goddard@xxxxxxxxx> Date: Wed, 24 Sep 2008 10:59:37 -0300 Subject: [PATCH] Call hdestroy() after using hash table created by hcreate(), for the sake of completeness. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andrà Goddard Rosa <andre.goddard@xxxxxxxxx> --- man3/hsearch.3 | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/man3/hsearch.3 b/man3/hsearch.3 index 16e3b6b..d5ae21c 100644 --- a/man3/hsearch.3 +++ b/man3/hsearch.3 @@ -325,6 +325,7 @@ main(void) printf("%9.9s \-> %9.9s:%d\\n", e.key, ep ? ep\->key : "NULL", ep ? (int)(ep\->data) : 0); } + hdestroy(); exit(EXIT_SUCCESS); } .fi -- 1.6.0.2.508.g24593 0001-Call-hdestroy-after-using-hash-table-created-by-hc.patch Description: Text Data Previous Message by Thread:Re: [LTP] ltp getdents syscalls testcases and 2.6.27-rcXOn Wednesday 24 September 2008 14:48:00 Subrata Modak wrote: > On Tue, 2008-09-16 at 14:27 +0200, Daniel Gollub wrote: > > Hi, > > > > with 2.6.27-rc1(?) linux/dirent.h got removed Kbuild headers_install > > targe and dirent struct got removed: > > > > > > commit cf6ae8b50e0ee3f764392dadd1970e3f03c40773 > > Author: Adrian Bunk <bunk-DgEjT+Ai2ygdnm+yROfE0A@xxxxxxxxxxxxxxxx> > > Date:  Fri Jul 25 01:46:46 2008 -0700 > > > >   remove the in-kernel struct dirent{,64} > >   > >   The kernel struct dirent{,64} were different from the ones in > >   userspace. > >   > >   Even worse, we exported the kernel ones to userspace. > >   > >   But after the fat usages are fixed we can remove the conflicting > >   kernel versions. > > > > > > This broke the build of some LTP syscalls testcases for "getdents", since > > the <linux/dirent.h> include is missing and the "internal" dirent struct > > get/got used in: > > > > testcases/kernel/syscalls/getdents/getdents01.c  > > testcases/kernel/syscalls/getdents/getdents03.c > > testcases/kernel/syscalls/getdents/getdents02.c  > > testcases/kernel/syscalls/getdents/getdents04.c > > > > http://ltp.cvs.sourceforge.net/ltp/ltp/testcases/kernel/syscalls/getdents > >/ > > > > Is it safe to use the userspace dirent struct from <dirent.h> to fix the > > build of this? Or what should be used for testing the getdents interface > > instead? > > Yes, it is. There are numerous test cases in LTP which use: > ÂÂÂÂÂÂÂÂstruct dirent, > by including /usr/include/dirent.h. The interesting part is, this guy > (/usr/include/dirent.h) in turn includes /usr/include/bits/dirent.h, > where the definition of struct resides. Following is the patch which > solves this issue along with page.h header file removal from 2.6.25 > onwards, reported by Garret earlier. Tried the patch - ltp build with 2.6.27-rc linux headers sucessfully. Thanks for the info and the patch! Btw. man pages need to get also updated ... there are some pages which still mention <linux/dirent.h>. Garret, with 2.6.25 <asm/page.h> got removed - right? If so swapon(2) man page needs also get fixed: dgollub@marvin:~/projects/man-pages> grep -r "asm\/page.h" * man2/swapon.2:.B #include <asm/page.h> /* to find PAGE_SIZE */ best regards, Daniel --- diff --git a/man2/getdents.2 b/man2/getdents.2 index bd9d261..eb13258 100644 --- a/man2/getdents.2 +++ b/man2/getdents.2 @@ -30,8 +30,8 @@ getdents \- get directory entries .SH SYNOPSIS .nf .B #include <unistd.h> +.B #include <dirent.h> .B #include <linux/types.h> -.B #include <linux/dirent.h> .B #include <linux/unistd.h> .B #include <errno.h> diff --git a/man2/readdir.2 b/man2/readdir.2 index a757da1..b831320 100644 --- a/man2/readdir.2 +++ b/man2/readdir.2 @@ -30,8 +30,8 @@ readdir \- read directory entry .SH SYNOPSIS .nf +.B #include <dirent.h> .B #include <linux/types.h> -.B #include <linux/dirent.h> .sp .BI "int readdir(unsigned int " fd ", struct dirent *" dirp "," .BI " unsigned int " count ); -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@xxxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Next Message by Thread:Re: mlock(2) man page modificationsHi Maxin, Kosaki, > As per the mlock(2) implementation bugfix which is present in > Linux 2.6.27-rc2 git commit, > (http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a477097d9c37c1cf289c7f0257dffcfa42d50197), > the mlock(2) man page should be modified to reflect the latest changes > in the kernel. > > See the LKML thread regarding this commit : > http://www.nabble.com/mlock()-return-value-issue-in-kernel-2.6.23.17-td18751601.html > > This patch modifies the mlock(2) behaviour as per the SUSv3 specification. > > [ENOMEM] > Some or all of the address range specified by the addr and > len arguments does not correspond to valid mapped pages > in the address space of the process. > > [EAGAIN] > Some or all of the memory identified by the operation could not > be locked when the call was made. Thanks for your patch! (Kosaki, thanks for your additional comments.) A few pointers for future patches: * Your subject line was good, but could have been even more descriptive. I changed the patch title to: mlock.2: Add EAGAIN error. * It's best to make the patch the very last piece of the message: put the Signed-off-by and other text above the patch. This makes the mail easier for me to read, and to process in git. I've applied your patch for 3.11. Cheers, Michael > Patch for the mlock.2 to include information about EAGAIN. > ========================================================== > > diff -uNr man-pages-3.10/man2/mlock.2 man-pages-3.10_mlock/man2/mlock.2 > --- man-pages-3.10/man2/mlock.2 2008-09-23 19:22:25.000000000 +0530 > +++ man-pages-3.10_mlock/man2/mlock.2 2008-09-24 19:38:27.786315672 +0530 > @@ -175,6 +175,10 @@ > .B ENOMEM > Some of the specified address range does not correspond to mapped > pages in the address space of the process. > +.TP > +.B EAGAIN > +Some of the memory identified by the operation could not be locked when > +the function call was made. > .LP > For > .BR mlockall (): > > ================================================================= > > Signed-off-by: Maxin B. John > <maxin.john-qujY0cBTTHtBDgjK7y7TUQ@xxxxxxxxxxxxxxxx> > > Kindly let me know if there are any issues with respect to this modification. > > Thanks and Regards, > > Maxin B. John > Sony India Software Center > Bangalore, India > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@xxxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
blog comments powered by Disqus
|
|