public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: Hans-Peter Nilsson <hp@bitrange.com>,
	Dimitrije Milosevic <Dimitrije.Milosevic@Syrmia.com>
Cc: Djordje Todorovic <Djordje.Todorovic@syrmia.com>,
	 "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: Mips: Fix kernel_stat structure size
Date: Sat, 09 Jul 2022 09:49:05 +0800	[thread overview]
Message-ID: <56af834718d603a4175a10df0a047d92b0b6d139.camel@xry111.site> (raw)
In-Reply-To: <alpine.BSF.2.20.16.2207082134410.89039@arjuna.pair.com>

On Fri, 2022-07-08 at 21:42 -0400, Hans-Peter Nilsson wrote:
> On Fri, 1 Jul 2022, Dimitrije Milosevic wrote:
> 
> > Fix kernel_stat structure size for non-Android 32-bit Mips.
> > LLVM currently has this value for the kernel_stat structure size,
> > as per compiler-rt/lib/sanitizer-
> > common/sanitizer_platform_limits_posix.h.
> > This also resolves one of the build issues for non-Android 32-bit
> > Mips.
> 
> I insist that PR105614 comment #7 is the way to go, i.e. fix
> the merge error, avoiding the faulty include that it
> reintroduced.  Was this tested on O32?

I'm pretty sure it is *not* the way to go.

Sanitizer does not really intercept system call.  It intercepts libc
stat() or lstat() etc. calls.  So you need to keep struct_kernel_stat_sz
same as the size of struct stat in libc, i. e. "the size of buffer which
*libc* stat()-like functions writing into".

The "kernel_" in the name is just misleading.

And, if you still think it should be the way to go, let's submit the
change to LLVM and get it reviewed properly.
-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2022-07-09  1:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01 12:40 Dimitrije Milosevic
2022-07-01 12:54 ` Xi Ruoyao
2022-07-01 14:25   ` Dimitrije Milosevic
2022-07-06 11:34     ` Dimitrije Milosevic
2022-07-09  1:42 ` Hans-Peter Nilsson
2022-07-09  1:49   ` Xi Ruoyao [this message]
2022-07-09 14:44     ` Hans-Peter Nilsson
2022-07-12  6:42       ` Dimitrije Milosevic
2022-07-12 16:44         ` Hans-Peter Nilsson
2022-07-13  1:21         ` Xi Ruoyao
2022-07-13  2:38         ` Xi Ruoyao
2022-07-14 11:04           ` Dimitrije Milosevic

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=56af834718d603a4175a10df0a047d92b0b6d139.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=Dimitrije.Milosevic@Syrmia.com \
    --cc=Djordje.Todorovic@syrmia.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hp@bitrange.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).