From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from uggla.sjd.se (uggla.sjd.se [IPv6:2001:9b1:8633::107]) by sourceware.org (Postfix) with ESMTPS id 6B5393858C31 for ; Tue, 30 Apr 2024 08:42:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6B5393858C31 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=josefsson.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=josefsson.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6B5393858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:9b1:8633::107 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714466529; cv=none; b=RzvI6drk7qDXY4g/jaRu8U6Blk9HLLmtCSUWK4r3RFFxy5cvPVm21tym5Mta/0FI47LsxiMi5lHVgkjNYYaJbto2iRKMRsCPGyf3n1dgNRN7hIgM/zIWwOtJPZluHARrSZI7ko0PCCNf9VW4tgbA8d96aXbgu90vmt2xxhEJT/M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714466529; c=relaxed/simple; bh=hwpQrj19qI+LGja/6yDBnaX7Ei9j3m6VY18k2GEtj+0=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=BhtMP+B49g/rCaYUqFsiij+frd6+Re3pz1zK1tMEF+yNrtP7AYBgNq3V+IKnP7PSJTCatdgWJ5MUpJAd/3cB9xlZrr330BWahXqaJCoyq1HS2zeiNfJ87/5bP8r0S0YZjBOsAw6eZiHNWazqKmmFWbj9Efwjs+5VBXdtgHvEQ7c= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=josefsson.org; s=ed2303; h=Content-Type:MIME-Version:Message-ID:In-Reply-To :Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description; bh=dmeJzdrEEtOAB5PTLUthUSTeRBUh98caHFT22NuuTnw=; t=1714466525; x=1715676125; b=k5pdK9OlsvmRVu38I6R6BObLRxKhhSLBygymyx2shzWqVCMV/XmstPWsMy0Vjw5H8MJuZ8EVIn+ AiN+G4U4lDA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=josefsson.org; s=rsa2303; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=dmeJzdrEEtOAB5PTLUthUSTeRBUh98caHFT22NuuTnw=; t=1714466525; x=1715676125; b=X+s9e6IW9v/7FQStrc0g7A7iBIB1mmOL5QbECB9Y3Qvi66QUToZj92GbdtkScNaLu43GKYczfFS Z16kGb+JDtQpmCYkZxt1MIHonRZzDzs1d3Kzf7gHFWEpeO3cp763felDSQSCjWHGIFEpllY4sJLdH tiyV3M0iEdyrNA4bIUAEzK0JV6+ZhfdoXFSg1tg8oGQNUOdqxRe2c8+NUDWezf/pNRgBWrksYjaG9 gzexcham3u7Xa8EUKfgVomCYJSo7JwJRl2xZ8023eP6JsewR3+2TxWz+QMiSOavWcq29ZRXamMB35 gYpCjlMfRkBlXLsVwjVpyrxDJQcUHIwhfMy+VRQT/pju0gnpzg+ljFROJ25PFj4pmxwf3HgTVLXCS o20l99e6vLp/mTl4c2CtycU/AS1ZSeX/nz5GtGXdJK2XjjdxUMoMzWsITwImbiAu4NsCe9Vj3; Received: from [2001:9b1:41ac:ff00:823f:5dff:fe09:16ac] (port=46688 helo=kaka) by uggla.sjd.se with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1s1j3q-006RsN-EI; Tue, 30 Apr 2024 08:42:02 +0000 From: Simon Josefsson To: "Zack Weinberg" Cc: Subject: Re: Maybe we should get rid of ifuncs References: OpenPGP: id=B1D2BD1375BECB784CF4F8C4D73CF638C53C06BE; url=https://josefsson.org/key-20190320.txt X-Hashcash: 1:23:240430:libc-alpha@sourceware.org::M5ie6rMlDL3DXpi6:40kM X-Hashcash: 1:23:240430:zack@owlfolio.org::619ov+pfmYasuoQc:CsRC Date: Tue, 30 Apr 2024 10:42:03 +0200 In-Reply-To: (Zack Weinberg's message of "Tue, 23 Apr 2024 14:14:23 -0400") Message-ID: <87edanw8bo.fsf@kaka.sjd.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP 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: --=-=-= Content-Type: text/plain "Zack Weinberg" writes: > To figure out if this is a workable idea, questions for you all: > (1) Are there other use cases for ifuncs that I don't know about? > (2) Are there existing ifuncs that perform CPU-capability-based > function selection that *could not* be replaced with an array of bit > vectors like what I sketched in the previous paragraph? Interesting take. I have recently looked at lib25519 and libmceliece which uses ifuncs to select crypto primitives. While I think it may be possible to rewrite it for something you suggest, I think libraries like this suggests that some developer find the ifunc interface useful and that rewriting things will require some discussion. Take this as a +0.9. https://salsa.debian.org/debian/lib25519 https://salsa.debian.org/debian/libmceliece Some relevant selector logic code: https://salsa.debian.org/debian/libmceliece/-/blob/main/scripts-build/dispatch https://salsa.debian.org/debian/libmceliece/-/blob/main/cpuid/amd64.c /Simon --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIoEARYIADIWIQSjzJyHC50xCrrUzy9RcisI/kdFogUCZjCu2xQcc2ltb25Aam9z ZWZzc29uLm9yZwAKCRBRcisI/kdFolQ5AP9N1+izx+aN2HfE/kXc6k3r64j/tAL9 majnJ60fEbUpfgEA34V7VJNqtq8LBAWwLr5tx5ijt1448pt5MqGNrMyjfAY= =woic -----END PGP SIGNATURE----- --=-=-=--