From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id ADE1C3858D3C for ; Wed, 11 Jan 2023 04:28:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ADE1C3858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-pj1-x102f.google.com with SMTP id dw9so13188892pjb.5 for ; Tue, 10 Jan 2023 20:28:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=GXZjC/DmwQdIIlQ4/Z/0cbskvNfG/Ewj+78a1mwo7zE=; b=XxgAKHKEBxa3Ku8ewYBVzexUdjK+YpBXdQ9ViBLjXTIvhtQ0R9xNqAQOWYXmoTHoFz J5hCePf+G2g1Mrfc0nvIeYEOZ9ELB0OuzpICfuMWQcCUV/NnHS/jAldeKvnJZ1WYF5AW buEGJyUzNElyL99k3p9CbWFHmW7vKEKjWySoZAXXFCa/nHiGsoAxVXFk7xUHpkxkO5JK gYr8snxcM9tEzzu27zP86/nLXkXYb6+jhVWxUPJabCX8t4t+mLDcrmRjP805w6Ip40k8 puf2kEbWpw/poBuGYinDZSKr7hfFOLfG7PLKjLKZpqjHRhOMLRf1rWHUktbbfX9h4j98 evNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GXZjC/DmwQdIIlQ4/Z/0cbskvNfG/Ewj+78a1mwo7zE=; b=uG1T0qlGK+WwwmFYSqS6Z2XEtjoHblZx60URy2R/tbozVvEr8o3YjJKaSTD8Hm2PX4 Ib5uylAwATH12dIMso1aVDYORUjGLcXv7FYNBNDDoJNBCuXMst+XsDy9kTklcQeohlVp jJRSqOvKPMwIRN+JeowFDBNoQS/uUKzzg04OuzDeSi1yn/Qfqe2tBfQnVrjAaoErOoRl Zo1A7zGAVuRj678McDT/ViK02oyhgGp/DDuy0sjUFH+E1FkOwK2ApUcXR8MBLLvXh5Y7 7X37n0AAJuJtsH5TrZIdN4ZQ75q8PtnxJSxhFUiSwtQ5QHN5VQ+WUNf9Vb2ff5FDLyC/ 49ew== X-Gm-Message-State: AFqh2ko4ehcyUBXLdmn5vxclcQw1pckCk0SbJh8nJVlwY5xKfAbvd2Vb 547LZlkifElnlSyyqZEaT85TGQ== X-Google-Smtp-Source: AMrXdXvz//WNvmPcOjdnGix3EEbJUHoqRB5mxb0l9S+zAJsoPE02JWs6w26vSqZ3+p5fNA8wUq9bAQ== X-Received: by 2002:a17:90a:6281:b0:219:b1f3:2401 with SMTP id d1-20020a17090a628100b00219b1f32401mr71627006pjj.13.1673411298802; Tue, 10 Jan 2023 20:28:18 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id c7-20020a17090a1d0700b00228da96cfdbsm1054142pjd.20.2023.01.10.20.28.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Jan 2023 20:28:18 -0800 (PST) Message-ID: <119da65f-e976-f382-3fe1-1585be738352@ventanamicro.com> Date: Tue, 10 Jan 2023 21:28:16 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: Auto-enabling V unit and/or use of elf attributes (was Re: Adding V-ext regs to signal context w/o expanding kernel struct sigcontext to avoid glibc ABI break) Content-Language: en-US To: Richard Henderson , Vineet Gupta , Kito Cheng Cc: Philipp Tomsich , Andy Chiu , Vincent Chen , Florian Weimer , Rich Felker , Andrew Waterman , Palmer Dabbelt , =?UTF-8?Q?Christoph_M=c3=bcllner?= , davidlt@rivosinc.com, Arnd Bergmann , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Szabolcs Nagy , Greentime Hu , Aaron Durbin , Andrew de los Reyes , linux-riscv , GNU C Library References: <1631497278-29829-1-git-send-email-vincent.chen@sifive.com> <7430f494-9b43-5e03-c1e9-6b83e2611a11@rivosinc.com> <91ef3c45-165f-d2b3-7c77-322c01802c41@rivosinc.com> <18465ca3-934f-5b3e-170c-1ff0edea3a89@rivosinc.com> <1f8f1d21-4a19-54fe-8b29-bf9e2a8501d7@rivosinc.com> <3a838afe-974b-60bb-a0e5-83e366ec652e@rivosinc.com> <3923eeee-e4dc-0911-40bf-84c34aee962d@linaro.org> From: Jeff Law In-Reply-To: <3923eeee-e4dc-0911-40bf-84c34aee962d@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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: On 1/10/23 18:22, Richard Henderson wrote: > On 1/10/23 10:07, Vineet Gupta wrote: >> Yes bulk of glibc might not have vector code, but those V ifunc >> routines do and IMO this information needs to be recorded somewhere in >> the elf. Case in point being the current issue with how to enable V >> unit. Community wants a per-process enable, using an explicit prctl >> from userspace (since RV doesn't have fault-on-first use hardware >> mechanism unlike some of the other arches). But how does the glibc >> loader know to invoke prctl. We can't just rely on user env >> GLIBC_TUNABLE etc since that might not be accurate. It needs somethign >> concrete which IMO can come from elf attributes. If not, do you have >> suggestions on how to solve this issue ? > > Why not just fault on first use to enable?  That's vastly less > complicated than trying to plumb anything through elf resulting in a prctl. Well, the answer is in Vineet's paragraph -- the hardware apparently doesn't have fault-on-first-use which is mighty unfortunate. Jeff