Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4583735rwd; Tue, 30 May 2023 07:21:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Pc4SqqcoYcwRmcsIECkvCRl2MhE650WwjLNU5VC50Qp4+qvGNOcdsiCssY+NmQ7voGrCL X-Received: by 2002:a17:90a:df09:b0:256:5634:9cab with SMTP id gp9-20020a17090adf0900b0025656349cabmr2845840pjb.4.1685456466925; Tue, 30 May 2023 07:21:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685456466; cv=none; d=google.com; s=arc-20160816; b=rsepwbJQfYbn5xrwmS/dqi5G7KpZ/izZTRj/LhQf2Rf0MwZQRRvgIKUfAu2P581787 +9Lu/ivujtvSHDtRIiziAgF3LPoNGzSh8VOex5/S94Ed9TFOKK0PkwamtP0n+yOFA5JE qwHalbbrT5YWdmM4pXbUF6Ughy6SCI/+F0D9+mvhkvR2Y3u7gzG+HwON9Qjl6LQrIx1O BxRQ2Nhio4BNE6Pl+yIBUakGBfBlo+qw4kkxg1bKioKJntylDZRDRE6Y7IHKVi9KPMza d/6+jJ+pQK6mYHUJoeVBgL9RnND+BKtqQbBmHAg1dUSJse+s4ixIPmmS5i4gjDDHfNP8 Dymg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=SYxgvTgmLTiwEy0syweRb4z2Wkk8dETXQo0MhrTGxn0=; b=hzRZq5m38qRyGvjq5+6NyTFPa741lW/o8rHorOOvT8T54vkJp5NVlmXoq2Qz973qXj MW8Qbi5WrgxjI0jlwvCmgF63aZ8sUdqh06Lpl1j6d3PsXU5EPnB4EZdT0AaWxsDOvD6Y fueCBxlGmty4N4h+PUJbHlsU9rKRS+Yxh3j8zYbLamFxwrQ1LzJ2aPEwlN6QR3v0df8k HjCBMAuI5njmbr1HIfHJtZ7xeaiOtqx+oqaeoj3wgxLeW6k14TkWbzzvmE8UMtTbsZu0 MXb3kZX9xX+L95LNaikkv6tWdaNxjV7nFZ2oNJ5PcVtIdfbW9z2+eaWg4G7GHMARJIhW kBUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=kIpkGI4Z; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m16-20020a637d50000000b0053f01e23c47si10649567pgn.607.2023.05.30.07.20.54; Tue, 30 May 2023 07:21:06 -0700 (PDT) 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=@sifive.com header.s=google header.b=kIpkGI4Z; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229997AbjE3OPE (ORCPT + 99 others); Tue, 30 May 2023 10:15:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233053AbjE3OPC (ORCPT ); Tue, 30 May 2023 10:15:02 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0C9BE53 for ; Tue, 30 May 2023 07:14:38 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2af98eb6ef0so49025191fa.3 for ; Tue, 30 May 2023 07:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1685456069; x=1688048069; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SYxgvTgmLTiwEy0syweRb4z2Wkk8dETXQo0MhrTGxn0=; b=kIpkGI4ZNZ0nH7PFH1QiZ30yrckiIkIv8R03VbUtOObUkZp3udHzY7xRjqvUgLbzv4 qvWEllpP4gpMZGoM5YECSa0GZDe1/Nb8Q6X2dZha5M9fnIl6oNrozACSqzBPCOV6mql+ UjV/unhhcFii5eKQ8b5fmuozsqZlsfsHdDd7x723q5sbjPddY6/VLuC2DaXicdoIYftM ixY7eJgIDOPDIyDlZm2xvnpnOXqQcVo7kNp3ikI16CwfNzpH/XTDdJA9lLTLCFHnrks7 hS28483dExR54SdyAzZExFXUIjC2QePnOliAuDeUM7aRuO3d8c86ru22t55YKklvk3Fx ePZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685456069; x=1688048069; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SYxgvTgmLTiwEy0syweRb4z2Wkk8dETXQo0MhrTGxn0=; b=eejRC5ysIx3oPx0PtcFMaCMYRNspCEW+/JDrD2fVbwZfv/ukkUvusRsP8NUlo8fpv0 JShbR0Or3BE1IKzeVKtODvig5kNO3m0B1IPSrIqExW2gHO9uAWRBndCeUgSVZYq9zypH xV1MYhjnWg9QqX4ZdzPpRrDNZ27bEJwpQgfRXmK/WyTBICITIs7I5n4q8VT7LYO2DBg7 It8J9vwTX9suHu4H86TlXJOnWlmDmkymPK/G0b5ZtfjG0auYPVO6sw0BECesIEeVWjn2 xV5Ets310puj644j4FDdl+KHM9alIsRqhYrVFx2yCkfjxPu2Xo+C2790ae7B/F4g2Ayu gAfg== X-Gm-Message-State: AC+VfDytLEY5jPcDsjClKUPUQgPKfkdgRIXMJ6pkuvn1aj0zTwruhg5I ygM9P9CUXaPlgrD8uvq/wutrZj3rCCxjYT7H+HxxLhL4iwGiwyIqNiw= X-Received: by 2002:ac2:518f:0:b0:4f4:4cd4:2586 with SMTP id u15-20020ac2518f000000b004f44cd42586mr726914lfi.20.1685456069005; Tue, 30 May 2023 07:14:29 -0700 (PDT) MIME-Version: 1.0 References: <20230524092530.7773-1-andy.chiu@sifive.com> <3656227.v5FYL8H6MN@basile.remlab.net> In-Reply-To: <3656227.v5FYL8H6MN@basile.remlab.net> From: Andy Chiu Date: Tue, 30 May 2023 22:14:16 +0800 Message-ID: Subject: Re: [PATCH -next v20 20/26] riscv: Add prctl controls for userspace vector management To: =?UTF-8?Q?R=C3=A9mi_Denis=2DCourmont?= Cc: palmer@dabbelt.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 Thu, May 25, 2023 at 12:16=E2=80=AFAM R=C3=A9mi Denis-Courmont wrote: > > Le keskiviikkona 24. toukokuuta 2023, 12.25.30 EEST Andy Chiu a =C3=A9cri= t : > > How about adding the following 2 patches to deal with the problem. > > However, I am concerned if this makes ELF_HWCAP too complicated. e.g. > > Future extensions may as well want to do something here after we create > > an entry here. > > Fine with me but I feel that we are missing the bigger picture here, as t= o > what the usage pattern/guideline for the prctl() on userspace side should= be? Yes, I agree the use of this prctl is only meaningful for the init system, or some ansenstor processes that make policy decisions. And with ELF_HWCAP reflecting per-process's availability of V, which is decided by either the prctl/sysctl, programs/libraries do not really need to call this prctl unless they are doing aforementioned stuffs. I am going to document these when rolling out the next revision. > > Maybe it was already discussed, and I just missed it, but I couldn't find= it in > the documentation. We had discussed the potential theoretical abi breakage[1], and came out with a need of a prctl/sysctl interface for distro's early userspace programs. > > -- > R=C3=A9mi Denis-Courmont > http://www.remlab.net/ > > > [1]:https://lore.kernel.org/all/mhng-47aa965a-2b25-4ac0-984a-c2e6f3a051ee@p= almer-ri-x1c9/ Thanks, Andy