public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Stafford Horne <shorne@gmail.com>
Cc: GLIBC patches <libc-alpha@sourceware.org>
Subject: Re: [PATCH] linux: Use stat_overflow to check overflow in fstatat
Date: Mon, 1 Feb 2021 10:18:12 -0300	[thread overview]
Message-ID: <0ef7ea76-b7c1-c638-77a7-45cd928a8860@linaro.org> (raw)
In-Reply-To: <20210129222552.GA2002709@lianli.shorne-pla.net>



On 29/01/2021 19:25, Stafford Horne wrote:
> On Wed, Jan 27, 2021 at 10:28:58AM -0300, Adhemerval Zanella wrote:
>>
>>
>> On 27/01/2021 09:40, Stafford Horne wrote:
>>> Ping Adhemerval on this one.
>>>
>>> I still thing the below is needed for the STAT_IS_KERNEL_STAT
>>> cases.
>>>
>>
>> Why OpenRISC is not setting XSTAT_IS_XSTAT64 ? As a possible newer
>> ABI, I see no pointing in support old non-LFS ABI.
> 
> I got it all working without this patch after:
> 
>   - Setting XSTAT_IS_XSTAT64 and a few other kernel_stats.h
>   - Updating my shlib-version to 2.33
> 
> Note to myself in glibc LFS stands for Large File System. I see that in many
> parts of the stats code but couldn't find the actual acronym explained, I found
> it in the manual, it was hard to search for on the internet.
> 
> Thanks.
> 
> -Stafford
> 

I think I will need to revise the internal stat defaults, the whole 
idea of my stat consolidation is to avoid this very of issue for 
newer ports.

Ideally newer ports should not have to support non-LFS calls, which
means that sysdeps/unix/sysv/linux/[f,l]stat[at].c should be empty
TU.

However it seems that the default XSTAT_IS_XSTAT64 is still 0 on
both the Linux and generic one (the generic defines it to 1 for
__WORDSIZE == 64 at least).

For 2.34 I will consolidate the kernel_stat.h, so the default values
will be:

  #define STAT_IS_KERNEL_STAT 1
  #define XSTAT_IS_XSTAT64    1
  #define STATFS_IS_STATFS64  1

The STAT_IS_KERNEL_STAT is only used for non-LFS call and old xstat
support so it wouldn't matter for newer ABIs.  The only important flag
here is XSTAT_IS_XSTAT64 (which is currently misleading since xstat
is the compat symbols now).

It would probably need to consolidate the statfs code, which is another
messy one.

      reply	other threads:[~2021-02-01 13:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14  8:13 Stafford Horne
2021-01-14  9:29 ` Andreas Schwab
2021-01-19 21:11   ` Stafford Horne
2021-01-27 12:40 ` Stafford Horne
2021-01-27 13:28   ` Adhemerval Zanella
2021-01-27 23:28     ` Stafford Horne
2021-01-29 22:25     ` Stafford Horne
2021-02-01 13:18       ` Adhemerval Zanella [this message]

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=0ef7ea76-b7c1-c638-77a7-45cd928a8860@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=shorne@gmail.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).