From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by sourceware.org (Postfix) with ESMTPS id 27894385842B for ; Tue, 9 Jan 2024 18:30:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 27894385842B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=fastmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fastmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 27894385842B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=66.111.4.27 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704825014; cv=none; b=cEVrQwcFhg1zbJaB5BNf0D+e7dNWjpjtToAsYCN6uHkOb4IHgx2QV3tvvp1fuXEhPyNTEz17Z0bWEb/jHR4320DGDcLSBcb2TFBQjA/LcX0gYcBTfoQ5UKCGOWUoeGqIHLRuT1Wzvk7M/gZp7L5Lafvm/lSunyr1JNvs93F4FnU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704825014; c=relaxed/simple; bh=BOM3qlQrgCOLH6TenpF/W72kpJQuBoy87FlTnRzahYk=; h=DKIM-Signature:DKIM-Signature:MIME-Version:Message-Id:Date:From: To:Subject; b=WKZo1azpK/Ef3SwIIfXT5POVF1Mwctq/JN3pM/HdxKmvJT/ivdNtAhMu5TQgRx6DU5gWjDlai3OqRN8EX+Hm06bZJOf6W6FpLmoN96t2dq25fJy2fgAHMdxDL6AyI+pvd85OV7SInbKRFx2WiRGnTtYdw2BQOTEdn9+Qr7b8DRE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 103465C01C8; Tue, 9 Jan 2024 13:30:09 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute3.internal (MEProxy); Tue, 09 Jan 2024 13:30:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1704825009; x=1704911409; bh=tlGcXFo9013g824yire4wLDlhPNHQoQz8eBxZ4Bx/Fw=; b= xZ5/l7CLDrFyk1/uKS4m5ktZLZd6QL/YiwlwEXhJMKbNz5cF0HUpUUfU2cnivDWZ Tbx6uiTTRrR+4qyAVHvIHnI+iHX1iT+iQBUm9yJiiQj69va3Z0fFCyMLL38ty3Zw /DvZyDKOHRZuU/BZW5DBifXRps6IoRpkhyIQ4zVlZR9AVSFJVKvPSsZvTYvTyo18 2thVl+f4QHHGr7YuhkMymw/lOdcWDWrKfzVgQkjFsQdHDSL+1HrVZyBryeKlm9g2 26eKBlHVB8qoyKFC7OHsRXnoAVwphagSyZfv3mLzbsoS+0UM2codg/+GzgVOehGs 3V2zi60igXNo9msXYkp7bA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1704825009; x= 1704911409; bh=tlGcXFo9013g824yire4wLDlhPNHQoQz8eBxZ4Bx/Fw=; b=K 2Qr+EU3AogA3v+Gtar1LxpIlUmK22g5nMdv57gJpUqmyjc2Cp1x4/J64zp65f3ba p0F9PeZze7hP/Ia5f8BQLyxqZcIjNXpIfs7ptAf7ee7Cp8iIvSZnaKylmaILNQUo lBecBzaCyVqZUOOhtW4cJaYA2mEzfc4hJCEEN6/LDdPQ4gtzB9Ewi0j6S0BaHqM4 zh3IsxldnWKUYaIxECJlqyRfiDlj0/Y87nHRRG/RXs3p1/6OaiSMYGv+hXMsu/Ko usHb+A/N6KAA8F545OuCP9tx7OhXRnzheVC84b2j2VMRnm1SBepyVQwXpmptEm4j OhskA18Q/rrEtyVeI6aTw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehledgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedf ufhtvghfrghnucfqkdftvggrrhdfuceoshhorhgvrghrsehfrghsthhmrghilhdrtghomh eqnecuggftrfgrthhtvghrnhepgedvvdegveekteduhedvkeehveekhfeuveffkeethedv udekgeffhfeigeefveeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepshhorhgvrghrsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i84414492:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 972531700093; Tue, 9 Jan 2024 13:30:08 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1364-ga51d5fd3b7-fm-20231219.001-ga51d5fd3 MIME-Version: 1.0 Message-Id: <7f4ff036-cdd0-488d-a54c-1327e0ec0117@app.fastmail.com> In-Reply-To: References: <20231213211142.1543025-1-evan@rivosinc.com> Date: Tue, 09 Jan 2024 13:29:44 -0500 From: "Stefan O'Rear" To: "Evan Green" Cc: "Stefan O'Rear via Libc-alpha" , "Vineet Gupta" , "Sergei Lewis" , "Palmer Dabbelt" , "Florian Weimer" Subject: Re: [PATCH v10 0/7] RISC-V: ifunced memcpy using new kernel hwprobe interface Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Jan 9, 2024, at 12:10 PM, Evan Green wrote: > On Tue, Jan 9, 2024 at 4:06=E2=80=AFAM Stefan O'Rear wrote: >> >> On Mon, Jan 8, 2024, at 12:06 PM, Evan Green wrote: >> > Any last thoughts on this series? I think the plan is to land it sh= ortly. >> >> I am still wondering what the intended ABI is for the second paramete= r on >> non-Linux ELF systems which do not provide riscv_hwprobe as a system = call. >> Should it be passed as a null (or 1/-1) pointer in that case, or are = dynamic >> linkers expected to provide some emulation of riscv_hwprobe of some v= ariable >> fidelity? In the latter case, what features of riscv_hwprobe must be= emulated >> for the dynamic linker to claim ABI conformance? > > NULL would make the most sense IMO. Hwprobe is a Linuxism for sure, so > code that uses hwprobe (either inside or outside an ifunc selector) > won't by default be portable across OSes. If Linux is consistently > good at defining the hwprobe bits and not breaking our own ABI, other > OSes could in theory emulate the interface by exposing the same > keys/values. Though at least from our perspective that's not a goal. > > -Evan NULL was a mistake; we need to pass a non-NULL value in a1 to signal that a2 is defined, since the current implementations pass NULL in a1 and garbage in a2. If a dynamic linker does not provide a Linux-compatible riscv_hwprobe but does support features that are passed in a2..a7, would it be better to p= ass (long(*)())(-1) or a stub function that just returns 38 (+ENOSYS)? -s