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] [day] [month] [year] [list]
Message-Id: <20231007140727.7399-1-falcon@tinylab.org>
Date:   Sat,  7 Oct 2023 22:07:27 +0800
From:   Zhangjin Wu <falcon@...ylab.org>
To:     linux@...ssschuh.net
Cc:     linux-kernel@...r.kernel.org, rodrigo@...g.com.ar, w@....eu
Subject: Re: [PATCH 1/1] tools/nolibc: Add workarounds for centos-7

Hi, Thomas

> On 2023-09-27 15:06:03+0200, Rodrigo Campos wrote:
> ...
> > For now we are work-arounding it by doing basically the same thing I'm doing
> > here:
> > 	https://github.com/opencontainers/runc/blob/96a61d3bf0dcc26343bfafe5112934d73d280dd3/libcontainer/dmz/xstat.h
> > 
> > We then include this file before nolibc.h, and then the type works as fine:
> > 	https://github.com/opencontainers/runc/blob/96a61d3bf0dcc26343bfafe5112934d73d280dd3/libcontainer/dmz/_dmz.c
> > 
> > Would it be acceptable for nolibc if I just define what we use:
> >  * struct statx
> >  * struct statx_timestamp (used inside struct statx)
> >  * STATX_BASIC_STATS (or STATX_* constants too, as you prefer)
> 
> Without __NR_statx this would still only result in dead code.
> 
> *IF* we want to fix/work around this in nolibc it would be more like
> 
>   #ifdef __NR_statx
>   
>   /* whatever was done before */
>   
>   #else
>   
>   int stat(const char *path, struct stat *buf)
>   {
>   	return __sysret(-ENOSYS);
>   }
>   
>   #endif
> 
> Or we drop the #else completely to make it obvious for applications that
> stat() will just not work.

This may worth a patch, sorry for my fault ;-(

And to avoid breaking the older kernel users or especially for some
older kernel books readers, and since this also has introduced some
inconvenience to Willy, perhaps it is valuable to restore original
'sys_stat' support, I will look into how or simply revert the commit but
need to add a new one for powerpc, I will learn how to avoid defining
the extra structure for the not required architectures, the
__ARCH_WANT_SYS_STAT macro may help. I'm also working on cleaning up the
old_select(), old_mmap() and sys_fork()/sys_clone() selection support,
they may be put in a series.

Willy, what about your suggestion?

Thanks,
Zhangjin Wu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ