From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id AD4E320DFF for ; Thu, 25 Jan 2024 20:10:22 +0100 (CET) Received: (qmail 5436 invoked by uid 550); 25 Jan 2024 19:08:09 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 5399 invoked from network); 25 Jan 2024 19:08:09 -0000 Date: Thu, 25 Jan 2024 14:10:25 -0500 From: Rich Felker To: "Ignotas \"gns\" WANG" Cc: "musl@lists.openwall.com" Message-ID: <20240125191025.GK4163@brightrain.aerifal.cx> References: <20240125190533.GJ4163@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240125190533.GJ4163@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH] riscv: correct symbol version of __vdso_flush_icache On Thu, Jan 25, 2024 at 02:05:34PM -0500, Rich Felker wrote: > On Thu, Jan 25, 2024 at 04:55:16PM +0000, Ignotas "gns" WANG wrote: > > Hi, > > > > I'm porting LuaJIT to RISC-V, our binary built with musl would > > occasionally SIGILL at patched JIT insns. It looks that musl's > > __riscv_flush_icache is faulty, which may be the cause of this cache > > coherency issue. > > > > For the patch, see the attachments. > > > > Since I'm not a subscriber to the musl list, CC me please. > > Just to be clear, this was always wrong, not a change on the kernel > side where either symbol version might be seen depending on kernel > version, right? OK, answering my own question. The original Linux commit introducing riscv vdso, e2c0cdfba7f69925afc92b20cd9835d81e11a4f1, has: +VERSION +{ + LINUX_4.15 { and 921ebd8f2c081b3cf6c3b29ef4103eef3ff26054 adds __riscv_flush_icache under that. So apparently the version was just miscopied/typo when added to musl. I'll apply this right away and it'll be in the upcoming release. Rich