From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 841D01F852 for ; Wed, 21 Dec 2022 19:52:20 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=rivosinc-com.20210112.gappssmtp.com header.i=@rivosinc-com.20210112.gappssmtp.com header.b="RbtNwa7m"; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 77BD4385B536 for ; Wed, 21 Dec 2022 19:52:19 +0000 (GMT) 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 6F6A23858D1E for ; Wed, 21 Dec 2022 19:52:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6F6A23858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pj1-x102f.google.com with SMTP id n65-20020a17090a2cc700b0021bc5ef7a14so3160707pjd.0 for ; Wed, 21 Dec 2022 11:52:07 -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:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=kMuHxTFwv/l/rM5PVMCvKqbEDcuC1/cPLK8XmNLhCZM=; b=RbtNwa7mtjav08LE3o+xK2+2UDCr+m+yKCbPE1Bcf61xIqlkkbXlZyfPU5mlZpBc7P Fj6ZZsLgYmBQCHvojp1Kkwuh51+SFpGaX95KeIKz9c6uWO0b8XBPd/g9/NQ43pBD4zk5 4aOiDXSyQn1PSE1Ptw8FESUB158tHl3Y67LGPrAt9P6uov6p95kLaY3G/FOTHv9zoe9s qnsT+97Z+1pVaEKU6hLrc+HvGditARBlqKuekG/QMCMtg8qomf1Ua5PiXTFV4403vUhl 6Rk0qqc02rDU7q5barP+2cjQIQuOWs70h0Z9OZGifVfFBUXCiWzmSLaklklBkKU/poGs Naow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kMuHxTFwv/l/rM5PVMCvKqbEDcuC1/cPLK8XmNLhCZM=; b=NequsepKHdpm3nip5fZMs2APhjrFJB0Jj8b9XjBrOKhc6dXuCfhXvqHUsEvOzfu3M0 D9ny2h2iSRDsoRAsuxFPYnI+lt34a69wCti3nTOrlUdGRkb9HxmomiU3KgrsWeAlbPJy GBLVZpuV8cP6Rk3xmzguenIrm0OmoRkg6lOMx+I1zmjbWB4/usBY6gzWi4bXrte6Lgnn tuQOzAmLpCeXoDpiuYCESQlB6UqMhIz38jutzw7rrJ+8vzwTTJriY2DtRfKGzssm4wDJ NSwYRqUZmEnQl7aGEuVIlx8haMLG3+c9l8w4Nzel57Dp5bNp+Fvqy0WhebDBGHksU3AK EtEQ== X-Gm-Message-State: AFqh2kps3UPFQJmb6hlxPiCjojaqTsPsE0rtDITAXGFY5I+NCwJphBS3 jvdzht2u9rCl0iORuaaUUtAHGA== X-Google-Smtp-Source: AMrXdXsqUpkR20wHZpXEYj3aO9STkpIe+o/gcDsBOOOQSDMFZuIIJwQW0q7UFLMGvbTIJZWiHHGsWA== X-Received: by 2002:a17:90b:124b:b0:220:7147:c981 with SMTP id gx11-20020a17090b124b00b002207147c981mr18362863pjb.29.1671652326561; Wed, 21 Dec 2022 11:52:06 -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 cp20-20020a17090afb9400b00212e5fe09d7sm1801167pjb.10.2022.12.21.11.52.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Dec 2022 11:52:06 -0800 (PST) Message-ID: <7430f494-9b43-5e03-c1e9-6b83e2611a11@rivosinc.com> Date: Wed, 21 Dec 2022 11:52:04 -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 Content-Language: en-US From: Vineet Gupta To: Vincent Chen Cc: 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 , Andy Chiu , 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> In-Reply-To: <50c598a6-e3b3-3062-abe7-23a406067533@rivosinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 12/21/22 11:45, Vineet Gupta wrote: > > 4. Kernel with RVV support + user program using original Glibc sigcontext > In this case, the kernel needs to save vector registers context to > memory. The user program may encounter memory issues if the user space > does not reserve enough memory size for the kernel to create the > sigcontext. However, we can't seem to avoid this case since there is > no flexible memory area in struct sigcontext for future expansion. This is not an issue, if we don't change sigcontext (in kernel and glibc) - it is essentially the case of existing binaries. kernel still saves regs on user stack, in rt_sigframe, its just that  userspace is not able to access them in SA_SIGINFO signal handers. aarch64 have this implemented this approach and it is likely they can't do that either for SVE regs.