From: Willy Tarreau <w@1wt.eu>
To: David Laight <David.Laight@ACULAB.COM>
Cc: Arnd Bergmann <arnd@arndb.de>,
"chris.chenfeiyang" <chris.chenfeiyang@gmail.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
Feiyang Chen <chenfeiyang@loongson.cn>,
Huacai Chen <chenhuacai@kernel.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
"loongarch@lists.linux.dev" <loongarch@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] nolibc: Add statx() support to implement sys_stat()
Date: Wed, 8 Feb 2023 15:07:35 +0100 [thread overview]
Message-ID: <Y+Osp43OQOlllIVl@1wt.eu> (raw)
In-Reply-To: <d0df35466db74097b8e70e28d35a4776@AcuMS.aculab.com>
On Wed, Feb 08, 2023 at 01:01:48PM +0000, David Laight wrote:
> From: Willy Tarreau
> > Sent: 08 February 2023 08:20
> ....
> > Also looking at the man page I see that statx() only appeared in 4.11,
> > and here we're targetting userland so I'd rather keep a bit of margin
> > when it comes to backwards compatibility, thus not dropping stat() and
> > friends too early when not necessary. However using statx() by default
> > when available sounds fine to me!
>
> Does that really matter?
> Isn't 'nolibc' really just used for programs built in the
> kernel source tree to be release/run with the current kernel?
Not just that even if mostly related, and even in such a case
we'd rather maintain a low level of breakage when it doesn't
require any effort (and moving the ifdef __NR_statx up 20 lines
is perfectly within what I consider low effort).
> I also wonder if building a 'mini_libc.a' that the programs
> can be linked against might be easier than having to
> generate inline versions of everything?
It's another option but a different approach. There are pros and cons
to different approaches. For this, better not reinvent the wheel,
there's already klibc that does this well. A few of us do value the
simplicity of not having to pre-build anything before the test program,
especially when running tests that cover multiple architectures and/or
versions. I'm not saying it's a solution to everything at all, far from
this (and the level of coverage of that code should be self-explanatory
to remind anyone that it's not the goal). But when working on some small
test programs it's quite handy like this.
Regards,
Willy
next prev parent reply other threads:[~2023-02-08 14:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 2:09 [PATCH 0/3] Add LoongArch support to nolibc chris.chenfeiyang
2023-02-07 2:09 ` [PATCH 1/3] nolibc: Add statx() support to implement sys_stat() chris.chenfeiyang
2023-02-07 14:30 ` Arnd Bergmann
2023-02-08 2:09 ` Feiyang Chen
2023-02-08 3:31 ` Willy Tarreau
2023-02-08 7:29 ` Arnd Bergmann
2023-02-08 7:42 ` Feiyang Chen
2023-02-08 8:06 ` Arnd Bergmann
2023-02-08 8:19 ` Willy Tarreau
2023-02-08 9:20 ` Feiyang Chen
[not found] ` <d0df35466db74097b8e70e28d35a4776@AcuMS.aculab.com>
2023-02-08 14:07 ` Willy Tarreau [this message]
2023-02-08 8:07 ` Willy Tarreau
2023-02-07 2:09 ` [PATCH 2/3] nolibc: Add support for LoongArch chris.chenfeiyang
2023-02-07 14:25 ` Arnd Bergmann
2023-02-07 2:09 ` [PATCH 3/3] selftests/nolibc: " chris.chenfeiyang
2023-02-08 3:54 ` Willy Tarreau
2023-02-08 4:34 ` Paul E. McKenney
2023-02-08 6:39 ` Feiyang Chen
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=Y+Osp43OQOlllIVl@1wt.eu \
--to=w@1wt.eu \
--cc=David.Laight@ACULAB.COM \
--cc=arnd@arndb.de \
--cc=chenfeiyang@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=chris.chenfeiyang@gmail.com \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=paulmck@kernel.org \
/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