unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto via Libc-alpha <libc-alpha@sourceware.org>
To: Arnd Bergmann <arnd@arndb.de>,
	Florian Weimer <fweimer@redhat.com>,
	Rich Felker <dalias@libc.org>
Cc: YunQiang Su <yunqiang.su@cipunited.com>,
	Xi Ruoyao <libc-alpha@sourceware.org>,
	aurelien@aurel32.net, Jiaxun Yang <jiaxun.yang@flygoat.com>,
	"Maciej W. Rozycki" <macro@orcam.me.uk>,
	YunQiang Su <syq@debian.org>
Subject: Re: [PATCH v3] Define in_int32_t_range to check if the 64 bit time_t syscall should be used
Date: Tue, 8 Nov 2022 16:47:06 -0300	[thread overview]
Message-ID: <225bd25f-ac61-4f59-67b5-63105a3a8ea6@linaro.org> (raw)
In-Reply-To: <3df612e6-d0d5-e2e3-aacf-53f73557c71d@linaro.org>



On 08/11/22 11:27, Adhemerval Zanella Netto wrote:
> 
> 
> On 08/11/22 11:07, Arnd Bergmann wrote:
>> On Tue, Nov 8, 2022, at 14:49, Adhemerval Zanella Netto wrote:
>>> On 08/11/22 10:27, Arnd Bergmann wrote:
>>>
>>> Yes, the 32 bit fallback assumes that you either use the default minimum
>>> kernel or configure with --enable-kernel with a value lower than 5.1.
>>> And the optimization such as ecf2661281c was added on the basis that for
>>> such configuration the 32 time_t is always present.  
>>>
>>> For __ASSUME_TIME64_SYSCALLS (default fro 64 bit time_t ABI and for 32
>>> bit time_t with --enable-kernel=5.1) the 32 bit syscall should not be
>>> issued.
>>
>> Ok, good. What is the amount of testing that this combination
>> (--enable-kernel=5.1, CONFIG_COMPAT_32_BIT_TIME=n) has seen? Is
>> this something that is already part of some regression test setup,
>> or rather something that is supposed to work but isn't in
>> widespread use?
> 
> I would say not much I am aware off, I usually check only against stock 
> kernels from usual distributions (ubuntu, fedora, etc) and our patchwork 
> instance also uses default kernels.
> 
>>
>>> There are still the issue for a default configured glibc when running
>>> on kernels with CONFIG_COMPAT_32BIT_TIME=y, this would require to remove
>>> the fallback optimizations for !__ASSUME_TIME64_SYSCALLS.
>>
>> You mean CONFIG_COMPAT_32BIT_TIME=n with !__ASSUME_TIME64_SYSCALLS,
>> right? As I said, I'm not too worried about this corner case, as
>> long as there is some kind of use feedback that tells users to
>> change either glibc or kernel configuration.
>>
>> My impression is that the optimizing for running on old kernels
>> is not overly helpful, and that changing the fallback logic
>> would be better, but this does not feel like a correctness
>> issue when general-purpose distros always enable
>> CONFIG_COMPAT_32BIT_TIME, and embedded users that want it
>> disabled always build a matching glibc as well.
> 
> I added the optimization mainly because to disable the use of 32 bit
> time_t support requires a configure switch.  It is worries me a bit
> the combination of CONFIG_COMPAT_32BIT_TIME=n with 
> !__ASSUME_TIME64_SYSCALLS as potential source of obscures bugs, but
> I think that it would be unlikely in future when newer kernels will
> be more present.

I am ccing Rich because he agrees that CONFIG_COMPAT_32BIT_TIME is a 
userspace breakage and it will most likely break musl tim64 support.
He suggested to move this option behind EXPERT [1] and fix the 
documentation.

[1] http://ix.io/4bse

  reply	other threads:[~2022-11-08 19:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04  1:39 [PATCH] Use in_int32_t_range to check need 64bit syscall YunQiang Su
2022-11-08  4:49 ` [PATCH v3] Define in_int32_t_range to check if the 64 bit time_t syscall should be used YunQiang Su
2022-11-08 10:39   ` Arnd Bergmann
2022-11-08 11:17     ` Florian Weimer via Libc-alpha
2022-11-08 11:33       ` Arnd Bergmann
2022-11-08 11:39         ` Florian Weimer via Libc-alpha
2022-11-08 11:55           ` Adhemerval Zanella Netto via Libc-alpha
2022-11-08 12:28           ` Arnd Bergmann
2022-11-08 12:51             ` Adhemerval Zanella Netto via Libc-alpha
2022-11-08 13:27               ` Arnd Bergmann
2022-11-08 13:49                 ` Adhemerval Zanella Netto via Libc-alpha
2022-11-08 14:07                   ` Arnd Bergmann
2022-11-08 14:27                     ` Adhemerval Zanella Netto via Libc-alpha
2022-11-08 19:47                       ` Adhemerval Zanella Netto via Libc-alpha [this message]
2022-11-08 23:29                         ` Rich Felker
2022-11-17 17:35   ` Adhemerval Zanella Netto via Libc-alpha

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=225bd25f-ac61-4f59-67b5-63105a3a8ea6@linaro.org \
    --to=libc-alpha@sourceware.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=arnd@arndb.de \
    --cc=aurelien@aurel32.net \
    --cc=dalias@libc.org \
    --cc=fweimer@redhat.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=macro@orcam.me.uk \
    --cc=syq@debian.org \
    --cc=yunqiang.su@cipunited.com \
    /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).