lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACWXhKmmG799esYaEZZqWwNx-UwL74r6sr0qrxrF=Li4Ehckgg@mail.gmail.com>
Date:   Thu, 9 Feb 2023 10:02:56 +0800
From:   Feiyang Chen <chris.chenfeiyang@...il.com>
To:     Willy Tarreau <w@....eu>
Cc:     paulmck@...nel.org, Feiyang Chen <chenfeiyang@...ngson.cn>,
        arnd@...db.de, chenhuacai@...nel.org, jiaxun.yang@...goat.com,
        loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/5] tools/nolibc: Add statx() and make stat() rely on
 statx() when available

On Wed, 8 Feb 2023 at 18:39, Willy Tarreau <w@....eu> wrote:
>
> Hi Feiyang,
>
> On Wed, Feb 08, 2023 at 06:17:51PM +0800, chris.chenfeiyang@...il.com wrote:
> > From: Feiyang Chen <chenfeiyang@...ngson.cn>
> >
> > loongarch and riscv32 only have statx(). arc, hexagon, nios2 and
> > openrisc have statx() and stat64() but not stat() or newstat().
> > Add statx() and make stat() rely on statx() to make them happy.
>
> Thanks for this, that's way better. I'm just having one small request
> below:
>
> > +/*
> > + * int statx(int fd, const char *path, int flags, unsigned int mask, struct statx *buf);
> > + */
> > +
> > +static __attribute__((unused))
> > +int sys_statx(int fd, const char *path, int flags, unsigned int mask, struct statx *buf)
> > +{
> > +     return my_syscall5(__NR_statx, fd, path, flags, mask, buf);
> > +}
> > +
> > +static __attribute__((unused))
> > +int statx(int fd, const char *path, int flags, unsigned int mask, struct statx *buf)
> > +{
> > +     int ret = sys_statx(fd, path, flags, mask, buf);
> > +
> > +     if (ret < 0) {
> > +             SET_ERRNO(-ret);
> > +             ret = -1;
> > +     }
> > +     return ret;
> > +}
>
> Please guard these inside #if defined(__NR_statx) so that this can still
> be used as-is from slightly older toolchains that provide their own kernel
> includes.
>

Hi, Willy,

OK.

Thanks,
Feiyang

> The rest of the series looks pretty good to me.
>
> Thank you!
> Willy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ