Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2701171rwb; Fri, 9 Dec 2022 05:28:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf68Bz50bFy2hV+D2u0skMZiiVfK0ClvJpafWghiWEywT16E2BlL+FmMKEM17qhlfJlUgvdY X-Received: by 2002:a17:906:647:b0:7ad:d7f9:38b8 with SMTP id t7-20020a170906064700b007add7f938b8mr5153204ejb.57.1670592528524; Fri, 09 Dec 2022 05:28:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670592528; cv=none; d=google.com; s=arc-20160816; b=y8UoMrTZEnbZlm+4tMVv79q7XSt5T+cTQWWxC6DZzTH7obYNwzBv0+j5Q2n8JVvi8O Iu4voQOaODg5PkwRDd/h0phColpTK9IFNhdBkwmVQv29dcTDo6HXmZK62R+Z9ohQhfJz 3PTnGUuLmDhhhQ5W5TL9K/9il010eQ1RkxpSta3hvs/FL8huKcZiNG+7+zAPVbTf+T7X WY7eiD25dwc2LFUqqdjacRs2WB5AJh7wMtKGyMAGzNEO3zRmxce62G9kK5eBQ8hndDlr RJxYOq09S/s4WKPeYeoOzbxO3nacUT/jrcdLfF53TOfS8kNijq5iJSxXsKPWNzW/6Zrw Qvlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=VqHr86p38/ahhMMntxCit7rBXX2FGTwoGGuYENfxfkw=; b=QROuqzJnNJE/BmZzPr7ZAubIzSf+AHQrwxNDHXwogba/7GNtzGWaIuVLi4CsNTVLi4 M3AbSPzo4kXjefcdSKInEQMZigj8YR8IkQfKwl1XPH9rP7G22RgqOD0VwdH1OdelYL/V Dl0UBdUEvcB6wf3HM9IIusO42WF2g7Yc0Vw0q0J6jzEsHq94DifHByZxOT3Tc/6Vu3jf qp9qYshexRF/abJWlPMPtRj2Ppr/NuvecbQChaMelATArJEvpAWUGvWuSym6S4yXk5/v LjyX4gq54v7JzKm0jKJKG4xZpJ/QCxsVNlV49QHxxJR0wCvjyL0ibzmOxB4qrokK/gAS N+jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bluespec-com.20210112.gappssmtp.com header.s=20210112 header.b=me7hH9eK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xh7-20020a170906da8700b00780837381d8si1183282ejb.591.2022.12.09.05.28.30; Fri, 09 Dec 2022 05:28:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bluespec-com.20210112.gappssmtp.com header.s=20210112 header.b=me7hH9eK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229735AbiLIMVX (ORCPT + 75 others); Fri, 9 Dec 2022 07:21:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiLIMVW (ORCPT ); Fri, 9 Dec 2022 07:21:22 -0500 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C2114219C for ; Fri, 9 Dec 2022 04:21:21 -0800 (PST) Received: by mail-qt1-x82b.google.com with SMTP id fz10so3409417qtb.3 for ; Fri, 09 Dec 2022 04:21:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bluespec-com.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=VqHr86p38/ahhMMntxCit7rBXX2FGTwoGGuYENfxfkw=; b=me7hH9eK8xEViajfD3/ge6xV9UYEwjUHb1cxDB5Zx4id5QpJ/ed7BO8baLZ2lHwYiK jo53vr8D2Qgda/300i18jmH4WkYm7aZwXv/qXnjpdMdr4+K/qofcUpAwVYgPQg0Ur2d7 xr/3JIowbb56/gQmJCl+ada34ziC65tLr4UiwX6OytOH9ra+oHiBHQ4C4X/1fRGc6wPW g8umbUjB//+sf9D4hhfXDAfZsYYK/vbAa7V0pbTlbjzCtSSkQ5nZEpWqntS/6pAz1pQf HceDH/nPI9hd3vzvZiR4NnzUeM/5FmrmTRKMJz1rD2okMA+LciMI7rBBS2MukNJ3fB+u hU+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VqHr86p38/ahhMMntxCit7rBXX2FGTwoGGuYENfxfkw=; b=qTpMg5rwvS5inYom7igzh4a261UsEOl2w/uRlVIZRZ/+CL9n+4e2JJqMTMZ934VXm5 +Cx/UoYD86osGViG52eWK72TdsB640mwWrA8oXIGYkWKwtcwEAjQ+4EG6o++M9QGRxLc uFCn164u8BXI9hsstuAbXr4ANf6pluv53HLcdFcCjSKPTzA5pVdRjaU3+GDp/ZuOZI2X XaE0ceRJrISJ92MPOe5k9yg8T36UPGCnpHnLcIDh+8JSKBNcEOfG39I2wzOseBK5A80T Sr8P4NEDCwCsCuqwCxqRysTK/bnv/LtfwQSgMswMpsZJEc7+dCs4CnLQLOTwBy7Xe8z5 z28g== X-Gm-Message-State: ANoB5pn/Ytc2nAz6XtSabk1ejxBEeJH4apxYsyga9w9OwWQOOfFXqmyC h/c5Nr5avqWNGS7j5BzoiQew X-Received: by 2002:a05:622a:4084:b0:3a7:ec9b:e00b with SMTP id cg4-20020a05622a408400b003a7ec9be00bmr8990106qtb.68.1670588480205; Fri, 09 Dec 2022 04:21:20 -0800 (PST) Received: from bruce.bluespec.com ([38.70.11.69]) by smtp.gmail.com with ESMTPSA id w4-20020ac843c4000000b003a606428a59sm737839qtn.91.2022.12.09.04.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 04:21:19 -0800 (PST) Date: Fri, 9 Dec 2022 07:21:17 -0500 From: Darius Rad To: Florian Weimer Cc: Andrew Waterman , Palmer Dabbelt , Vineet Gupta , stillson@rivosinc.com, Paul Walmsley , anup@brainfault.org, atishp@atishpatra.org, guoren@kernel.org, Conor Dooley , greentime.hu@sifive.com, vincent.chen@sifive.com, andy.chiu@sifive.com, arnd@kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, bjorn@kernel.org, libc-alpha@sourceware.org, christoph.muellner@vrull.eu, Aaron Durbin , linux@rivosinc.com Subject: Re: RISCV Vector unit disabled by default for new task (was Re: [PATCH v12 17/17] riscv: prctl to enable vector commands) Message-ID: Mail-Followup-To: Florian Weimer , Andrew Waterman , Palmer Dabbelt , Vineet Gupta , stillson@rivosinc.com, Paul Walmsley , anup@brainfault.org, atishp@atishpatra.org, guoren@kernel.org, Conor Dooley , greentime.hu@sifive.com, vincent.chen@sifive.com, andy.chiu@sifive.com, arnd@kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, bjorn@kernel.org, libc-alpha@sourceware.org, christoph.muellner@vrull.eu, Aaron Durbin , linux@rivosinc.com References: <877cz0nbce.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <877cz0nbce.fsf@oldenburg.str.redhat.com> X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NEUTRAL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 09, 2022 at 11:02:57AM +0100, Florian Weimer wrote: > * Andrew Waterman: > > > This suggests that ld.so, early-stage libc, or possibly both will need > > to make this prctl() call, perhaps by parsing the ELF headers of the > > binary and each library to determine if the V extension is used. > > If the string functions use the V extension, it will be enabled > unconditionally. So I don't see why it's okay for libc to trigger this > alleged UAPI change, when the kernel can't do it by default. > Because the call to enable can fail and userspace needs to deal with that. // darius