public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Andreas Schwab <schwab@suse.de>
Cc: libc-alpha@sourceware.org, Kabe <skabe@vega.pgw.jp>
Subject: Re: [PATCH v3] Linux: Add ppoll fortify symbol for 64 bit time_t (BZ# 29746)
Date: Tue, 8 Nov 2022 10:58:19 -0300	[thread overview]
Message-ID: <fc6db726-4a43-43ae-3a3f-7d35430d8882@linaro.org> (raw)
In-Reply-To: <mvm8rkld18v.fsf@suse.de>



On 08/11/22 10:28, Andreas Schwab wrote:
> On Nov 08 2022, Adhemerval Zanella wrote:
> 
>> diff --git a/include/sys/poll.h b/include/sys/poll.h
>> index f904e21f89..af032048e4 100644
>> --- a/include/sys/poll.h
>> +++ b/include/sys/poll.h
>> @@ -2,16 +2,22 @@
>>  # include <io/sys/poll.h>
>>  
>>  #ifndef _ISOMAC
>> +#include <include/struct___timespec64.h>
>> +
>>  extern int __poll (struct pollfd *__fds, unsigned long int __nfds,
>>  		   int __timeout);
>>  libc_hidden_proto (__poll)
>> +
>>  libc_hidden_proto (ppoll)
>>  
>>  # if __TIMESIZE == 64
>> -#  define __ppoll64 __ppoll
>> +#  define ppoll64 ppoll
>> +#  define __ppoll64 ppoll
>> +#  define __ppoll64_chk __ppoll_chk
>>  # else
>>  # include <time.h>
>>  # include <signal.h>
>> +# define ppoll64 __ppoll64
> 
> Why do you need that indirection through the ppoll64 macro?
> 

Indeed there is no need with the change below:

diff --git a/include/sys/poll.h b/include/sys/poll.h
index af032048e4..5555fa2cee 100644
--- a/include/sys/poll.h
+++ b/include/sys/poll.h
@@ -17,7 +17,6 @@ libc_hidden_proto (ppoll)
 # else
 # include <time.h>
 # include <signal.h>
-# define ppoll64 __ppoll64

 extern int __ppoll64 (struct pollfd *fds, nfds_t nfds,
                       const struct __timespec64 *timeout,
diff --git a/sysdeps/unix/sysv/linux/ppoll_chk.c b/sysdeps/unix/sysv/linux/ppoll_chk.c
index e8115623e6..65c4b56671 100644
--- a/sysdeps/unix/sysv/linux/ppoll_chk.c
+++ b/sysdeps/unix/sysv/linux/ppoll_chk.c
@@ -26,7 +26,7 @@ __ppoll64_chk (struct pollfd *fds, nfds_t nfds,
   if (fdslen / sizeof (*fds) < nfds)
     __chk_fail ();

-  return ppoll64 (fds, nfds, tmo, ss);
+  return __ppoll64 (fds, nfds, tmo, ss);
 }

 #if __TIMESIZE != 64

Do I need to send another version or are you ok with this one with the
above change?

  reply	other threads:[~2022-11-08 13:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 13:15 Adhemerval Zanella
2022-11-08 13:28 ` Andreas Schwab
2022-11-08 13:58   ` Adhemerval Zanella Netto [this message]
2022-11-08 14:03     ` Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2022-11-07 18:36 Adhemerval Zanella

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=fc6db726-4a43-43ae-3a3f-7d35430d8882@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@suse.de \
    --cc=skabe@vega.pgw.jp \
    /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.
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).