[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <54edae1f-0c1c-4beb-b6ac-fcd61fc81de8@app.fastmail.com>
Date: Sun, 04 Jun 2023 13:38:39 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Willy Tarreau" <w@....eu>
Cc: "Zhangjin Wu" <falcon@...ylab.org>,
Thomas Weißschuh <thomas@...ch.de>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-kselftest <linux-kselftest@...r.kernel.org>,
linux-riscv <linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH v3 11/12] selftests/nolibc: add new gettimeofday test cases
On Sun, Jun 4, 2023, at 13:27, Willy Tarreau wrote:
> On Sun, Jun 04, 2023 at 11:24:39AM +0200, Arnd Bergmann wrote:
>>
>> For user supplied non-normalized timeval values, it's not obvious
>> whether we need the full 64-bit division
>
> We don't have to care about these here for the microsecond part,
> because for decades these were exclusively 32-bit. Also the only
> one consuming this field would have been settimeofday() and it's
> already documented as returning EINVAL if tv_usec is not within
> the expected 0..999999 range.
Right
> Over time we managed
> to make simple code compile with both glibc and nolibc, but when it
> comes at the cost of adding size and burden for the developers, such
> as forcing them to add libgcc, I prefer that we slightly limit the
> domain of application instead.
Good point. This also reminds me that the compilers I build for
https://mirrors.edge.kernel.org/pub/tools/crosstool/ don't always
have every version of libgcc that may be needed, for instance
the mips compilers only provide a big-endian libgcc and the
arm compilers only provide a little-endian one, even though
the compilers can build code both ways with the right flags.
Arnd
Powered by blists - more mailing lists