From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 3BA083858406 for ; Sat, 9 Jul 2022 01:49:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3BA083858406 Received: from [IPv6:240e:358:11f2:1600:dc73:854d:832e:4] (unknown [IPv6:240e:358:11f2:1600:dc73:854d:832e:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 30400668FF; Fri, 8 Jul 2022 21:49:19 -0400 (EDT) Message-ID: <56af834718d603a4175a10df0a047d92b0b6d139.camel@xry111.site> Subject: Re: Mips: Fix kernel_stat structure size From: Xi Ruoyao To: Hans-Peter Nilsson , Dimitrije Milosevic Cc: Djordje Todorovic , "gcc-patches@gcc.gnu.org" Date: Sat, 09 Jul 2022 09:49:05 +0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 MIME-Version: 1.0 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, LIKELY_SPAM_FROM, PDS_OTHER_BAD_TLD, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jul 2022 01:49:26 -0000 On Fri, 2022-07-08 at 21:42 -0400, Hans-Peter Nilsson wrote: > On Fri, 1 Jul 2022, Dimitrije Milosevic wrote: >=20 > > 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. >=20 > I insist that PR105614 comment #7 is the way to go, i.e. fix > the merge error, avoiding the faulty include that it > reintroduced.=C2=A0 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. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University