From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by sourceware.org (Postfix) with ESMTPS id 3A41E3858D1E for ; Tue, 3 Jan 2023 19:17:37 +0000 (GMT) Received: by mail-pj1-x102a.google.com with SMTP id v13-20020a17090a6b0d00b00219c3be9830so32085424pjj.4 for ; Tue, 03 Jan 2023 11:17:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=44MCRsfSlf8X7n1ikk4FRz2Ch0iMvVbVLnOQnQq+m3I=; b=yXu+WY1oAieZXe1MesFKX1vAlnVi1J5FF3W3I71h/XoFYJxBN2jWJecq8nVY693Q4d HVfgNK368w9mOEu/ZunHt22vwq1dD5/SHhG0It3ZlFsXry25Lgh3LNGicMISwbWGoFXP mqz0ZM8UtXV31qw2RvfIVIRyXyQsG1MuLwbyVMpXyKo0GtqnSFH3h/bdKJsZ8boLEIJb ULWJSAt/Kg3UGQwgffBfTKuHgYK2tRxAA/z5vxR9PAwmyDrY8zr7PeIgTrFHt3qPWsi0 3Ic3b17XVxycSrTgySkXgAf6GoDLjMz+BRheTIP2cWW70d6AK20gIcYyXlgfSgMXKaLW Tnow== 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:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=44MCRsfSlf8X7n1ikk4FRz2Ch0iMvVbVLnOQnQq+m3I=; b=zD0332xyoZ/sH73QHM+tQ++lblIaaj78YBts5e/fg++fiQw6C/d6PgN/PIow/rrKZl z9z3OLUldAZ0ez/a/CnR5lwboCKhNGAMCbNgXbc0q0D/17mYZjmt5+P+EYOK1s4UhbGj klbPQZ7ZaiAjvlFkaMtz3FYQ27Zp/t9DtuHsdTK32yst6kTvpaTRIsVCrZxtBSp4lytN O5sUzUEv84KTGdnZdpZ93lhZ+rEMdfG7cwi6D9LFX+s3kT9sa5IgKmrnnGQjYMj4QDrh BurgH/IaDwKAJfDZ6l5gF0UdxA46ntSWQiI4gkU6IgE5R0A2pQrumT6JZj/ibRhaPP3C 00+g== X-Gm-Message-State: AFqh2ko/jyU9LtYQxx2vm1w3DrDEsMY9XtuvYYZyv9haevxmYEPS03ym kZZzz5Wn4OE1BocF3lnfHNJ6FA== X-Google-Smtp-Source: AMrXdXsOhHF6I/k5JAYq2fwOQpPCxJckCAhexdm9tEppu2R+Lw85p7j3vdx0Or6H4LOznOyQ1NvFww== X-Received: by 2002:a17:90a:1008:b0:226:18ca:b53d with SMTP id b8-20020a17090a100800b0022618cab53dmr26479388pja.41.1672773456282; Tue, 03 Jan 2023 11:17:36 -0800 (PST) Received: from [192.168.50.116] (c-24-4-73-83.hsd1.ca.comcast.net. [24.4.73.83]) by smtp.gmail.com with ESMTPSA id oe5-20020a17090b394500b00223ea04b3fdsm12586045pjb.45.2023.01.03.11.17.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Jan 2023 11:17:35 -0800 (PST) Message-ID: <18465ca3-934f-5b3e-170c-1ff0edea3a89@rivosinc.com> Date: Tue, 3 Jan 2023 11:17:33 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Adding V-ext regs to signal context w/o expanding kernel struct sigcontext to avoid glibc ABI break To: Andy Chiu Cc: Richard Henderson , Vincent Chen , Florian Weimer , Rich Felker , Andrew Waterman , Palmer Dabbelt , Kito Cheng , =?UTF-8?Q?Christoph_M=c3=bcllner?= , davidlt@rivosinc.com, Arnd Bergmann , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Philipp Tomsich , 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> <1631497278-29829-3-git-send-email-vincent.chen@sifive.com> <871r5sd1zq.fsf@oldenburg.str.redhat.com> <20210913135247.GL13220@brightrain.aerifal.cx> <87sfy5ndid.fsf@oldenburg.str.redhat.com> <73c0124c-4794-6e40-460c-b26df407f322@rivosinc.com> <50c598a6-e3b3-3062-abe7-23a406067533@rivosinc.com> <7430f494-9b43-5e03-c1e9-6b83e2611a11@rivosinc.com> <91ef3c45-165f-d2b3-7c77-322c01802c41@rivosinc.com> Content-Language: en-US From: Vineet Gupta In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,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: Hi Andy, On 12/28/22 02:53, Andy Chiu wrote: > On Fri, Dec 23, 2022 at 4:28 AM Vineet Gupta wrote: >> This approach looks perfect. Lets productize it to fold this patch into >> the respective patch(es). >> We would then need fixups to not unconditionally enable V on fork/execve >> and hook that up to a prctl. >> Let me work on that and provide something on top of your series. > Hi Vineet, I have included the approach into the Vector series > according to suggestions, which makes it formaler than the PoC one. > Additionally, I picked up your prctl patch and added a kconfig to > compile a kernel that won't unconditionally enable V. Please tell me > if this does not seem right to you. The prctl support in there is really rudimentary and incomplete. There's more work needed to use the dynamic state of enablement - for say signal frame etc. The new Kconfig CONFIG_RISCV_VSTATE_INIT_ALL seems like a hack bolted on top. It would be best to drop it in the current state and rework properly based on your patches. > I will submit the series if this > seems well to you and let's discuss some more details further in that > thread. Here is the tree, thanks: > > https://github.com/sifive/riscv-linux/tree/dev/andyc/for-next-v13.1-newapi-prctl I would also suggesting dropping the 2 patches for in-kernel enablement for your submission as it might require some more thinking/design and builds naturally on top of the baseline patches. Thx, -Vineet