From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32626 invoked by alias); 30 Aug 2013 17:49:55 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 32612 invoked by uid 89); 30 Aug 2013 17:49:55 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Aug 2013 17:49:55 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7UHnpga002721 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 30 Aug 2013 13:49:51 -0400 Received: from [10.3.113.180] (ovpn-113-180.phx2.redhat.com [10.3.113.180]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r7UHnol9001896; Fri, 30 Aug 2013 13:49:50 -0400 Message-ID: <5220DB3E.1040609@redhat.com> Date: Fri, 30 Aug 2013 17:49:00 -0000 From: "Carlos O'Donell" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: Mike Frysinger CC: libc-ports@sourceware.org, libc-alpha@sourceware.org Subject: Re: [PATCH v2] hppa: add fanotify_mark References: <1377100993-9438-1-git-send-email-vapier@gentoo.org> <1377728809-6729-1-git-send-email-vapier@gentoo.org> In-Reply-To: <1377728809-6729-1-git-send-email-vapier@gentoo.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-08/txt/msg00092.txt.bz2 On 08/28/2013 06:26 PM, Mike Frysinger wrote: > Another example of all the 64bit arches getting the definition via a > common file, but the 32bit ones all adding it by themselves and hppa > was missed. > > I'm not entirely sure about the usage of GLIBC_2.19 symbols here. > We'd like to backport this so people can use it, but it means we'd > be releasing a glibc-2.17/glibc-2.18 with a GLIBC_2.19 symbol in it. > But maybe it won't be a big deal since you'd only get that 2.19 ref > if you actually used the symbol ? That's going to be very hard to do without some intense hacking to get a 2.17 or 2.18 with a 2.19 symbol. The build system isn't designed to allow you to do that? If I had to do it I would just add the symbol *without* a version since that should work to upgrade to 2.19 eventually which provides a default symbol at @@2.19. You can test that quickly by building an application with the glibc that has the symbol without version, and then running it under the new ld. > There hasn't been a glibc release where hppa worked w/out a bunch of > patches, so in reality there's only two distros that matter -- Gentoo > and Debian. Yeah, that's my fault for not merging things :( > Reported-by: Jeroen Roovers > Signed-off-by: Mike Frysinger > --- > v2 > - add basic fanotify test > > Versions.def | 1 + > ports/sysdeps/unix/sysv/linux/hppa/Versions | 3 ++ > ports/sysdeps/unix/sysv/linux/hppa/syscalls.list | 1 + > sysdeps/unix/sysv/linux/Makefile | 2 +- > sysdeps/unix/sysv/linux/tst-fanotify.c | 56 ++++++++++++++++++++++++ > 5 files changed, 62 insertions(+), 1 deletion(-) > create mode 100644 sysdeps/unix/sysv/linux/tst-fanotify.c > > diff --git a/Versions.def b/Versions.def > index 0854e6e..bca4ff4 100644 > --- a/Versions.def > +++ b/Versions.def > @@ -35,6 +35,7 @@ libc { > GLIBC_2.16 > GLIBC_2.17 > GLIBC_2.18 > + GLIBC_2.19 OK. > HURD_CTHREADS_0.3 > %ifdef EXPORT_UNWIND_FIND_FDE > GCC_3.0 > diff --git a/ports/sysdeps/unix/sysv/linux/hppa/Versions b/ports/sysdeps/unix/sysv/linux/hppa/Versions > index a62ef19..a392fee 100644 > --- a/ports/sysdeps/unix/sysv/linux/hppa/Versions > +++ b/ports/sysdeps/unix/sysv/linux/hppa/Versions > @@ -32,6 +32,9 @@ libc { > _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; > prlimit64; > } > + GLIBC_2.19 { > + fanotify_mark; OK. > + } > } > librt { > GLIBC_2.3 { > diff --git a/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list b/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list > index ae36d46..ae462ed 100644 > --- a/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list > +++ b/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list > @@ -36,3 +36,4 @@ socketpair - socketpair i:iiif __socketpair socketpair > setrlimit - setrlimit i:ip __setrlimit setrlimit > getrlimit - getrlimit i:ip __getrlimit getrlimit > prlimit64 EXTRA prlimit64 i:iipp __prlimit64 prlimit64@@GLIBC_2.17 > +fanotify_mark EXTRA fanotify_mark i:iiiiis __fanotify_mark fanotify_mark@@GLIBC_2.19 OK. I followed the discussion around 5i's. > diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile > index 247cb9c..234d5a7 100644 The rest should be a distinct commit adding the test in the event we need to revert it or cherry pick just the test. > --- a/sysdeps/unix/sysv/linux/Makefile > +++ b/sysdeps/unix/sysv/linux/Makefile > @@ -38,7 +38,7 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ > bits/socket_type.h bits/syscall.h bits/sysctl.h \ > bits/mman-linux.h > > -tests += tst-clone > +tests += tst-clone tst-fanotify OK. > # Generate the list of SYS_* macros for the system calls (__NR_* macros). > > diff --git a/sysdeps/unix/sysv/linux/tst-fanotify.c b/sysdeps/unix/sysv/linux/tst-fanotify.c > new file mode 100644 > index 0000000..1d6c855 > --- /dev/null > +++ b/sysdeps/unix/sysv/linux/tst-fanotify.c > @@ -0,0 +1,56 @@ > +/* Basic fanotify test. > + Copyright (C) 2013 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ OK good header. > + > +#include > +#include > +#include > +#include > + > +static int > +do_test (void) > +{ > + int fd, ret; > + > + fd = fanotify_init (0, 0); > + if (fd < 0 && 0) We already talked about this bug. > + { > + if (errno == ENOSYS) > + { > + puts ("SKIP: missing support for fanotify (check CONFIG_FANOTIFY=y)"); > + return 0; OK. > + } > + > + perror ("fanotify_init (0, 0) failed"); > + return 1; > + } > + > + ret = fanotify_mark (fd, FAN_MARK_ADD | FAN_MARK_MOUNT, FAN_ACCESS > + | FAN_MODIFY | FAN_OPEN | FAN_CLOSE | FAN_ONDIR > + | FAN_EVENT_ON_CHILD, AT_FDCWD, "."); > + if (ret) > + { > + perror ("fanotify_mark (...) failed"); > + return 1; > + } > + > + puts ("All OK"); > + return 0; > +} > + > +#define TEST_FUNCTION do_test () > +#include "../test-skeleton.c" Looks good to me. Cheers, Carlos.