From nobody Tue Nov 26 19:55:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1705796565; cv=none; d=zohomail.com; s=zohoarc; b=gLRU3awxlY7dHvcwi3VJg+sJe82b0LY3oejmn60oaZuec4HUVtxbL71EUaHfNa75MkJFlPKY0JV0vCaE6UqTBfVwY1LV5D5kMy1BvzwxNyJOOP/HftllnCYQDxnTGn/chmkPQjNYF5yJ54uCPjsUEKzM17PiXh8XUyaXgLoHdSY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705796565; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9Xu/nq6hQa8ZLXYCRSmO5dgODT19xrskc9XyMf3C3fg=; b=d0YlFobtLu5VpApsj+7XYKi6nuvihaZmGkmzZCEV2bniWI/GCtJwWI248hJUQBC4jQSO16q8k+N33EsixI8AnmQyzP5p+hgL591854poCSX1jh+U4SO7wAReRi+OAvkhqaxr4ND7Q4PEBllKzWNBU7lI4xxRL24xdkiP6HB+mhA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1705796565408120.31342946640666; Sat, 20 Jan 2024 16:22:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRLaO-0002YT-QF; Sat, 20 Jan 2024 19:21:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rRLaM-0002Xu-IV for qemu-devel@nongnu.org; Sat, 20 Jan 2024 19:21:15 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rRLaK-0007QS-Lc for qemu-devel@nongnu.org; Sat, 20 Jan 2024 19:21:14 -0500 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1d70c3c2212so13633335ad.1 for ; Sat, 20 Jan 2024 16:21:12 -0800 (PST) Received: from stoup.net ([2001:8004:5170:1e39:1361:3840:4873:7990]) by smtp.gmail.com with ESMTPSA id j4-20020a17090276c400b001d5af7fbda0sm5023546plt.122.2024.01.20.16.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 16:21:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705796471; x=1706401271; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9Xu/nq6hQa8ZLXYCRSmO5dgODT19xrskc9XyMf3C3fg=; b=Lh/EN2ESLax+74ILHQBcm1S3B7ftNg9aSWElRluOvgCpPyL0jmSSkr0uZtSzc01GnM dh1aOdgFEZ2JFWjalR0ZmknGa2HdhByJe1L2kEoU2Nl4VW9a4VBAB+EhOmOd3Nlp0s+3 5W37GqMe19udQ3/6v6nXCHms1pZMOAjTcXnb4F7tNxxWlkh7yLUvt9dT9YEHm5iXfz1k GA1yC8smVNHSRODsvjLzP85QSybcUbZCqpGbIFvAICkisymd96kXmiPknOi6jnoTELs0 EbOPpLwM+QdxIhIJijpO+64BCfzswFbtw+czPPVqX7RAGwAf48d4wTND4sWhm5xxG9AH J0jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705796471; x=1706401271; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9Xu/nq6hQa8ZLXYCRSmO5dgODT19xrskc9XyMf3C3fg=; b=OsT2Xw0zaa4v8oelyYwH/eTL1GqYXvUUl/irgutLhSUCNFzmxzVgkmbjFZvlCQOwfG C3wFMXnN5HN8M6/sDF17b8aaUmkZJe+4nbnQODczqI/+pUJWpqz7XU0EaqIJWsGRcLtl MIqthVA/bPvoPpONFK+wSHyTRaKfcO3w/0/Bo0tDjYnBvAyY9BOqnH/fxn5yqa0t7GAG 0lMazKZ7mMc/j4tps4jV6ewJKmc3zZFmnG01HSAFx/lidT+d+6eGaQ3mF9BC/wIyW8YM uBMSPGKjey4dTxNK2GUySZepRU/tsxYnaUvsARu+twTTAthO0A4I23MfKDKkcMAvK6t4 cUtA== X-Gm-Message-State: AOJu0Yw8Dzhqfb8kVoy8dF7r24+1UVtCArfOhsy3s62rWyJLVBRX/hip m7whCbhbIVVfw17lmMI7G78VYa1BXF0UnnjWETfhUQvSqnhjr+vzC4a29RU1txBDXWQoKbZTkf9 FTzc= X-Google-Smtp-Source: AGHT+IEem+jvjzC524AtxbbSrrGHAFmH3lzMPvQARvb/yn1qdjdHqZwk8dSZ/oEGiBjL+Xozilqi5g== X-Received: by 2002:a17:903:2306:b0:1d3:f344:6b01 with SMTP id d6-20020a170903230600b001d3f3446b01mr2831284plh.3.1705796471153; Sat, 20 Jan 2024 16:21:11 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Vineet Gupta Subject: [PULL 6/8] linux-user/riscv: Adjust vdso signal frame cfa offsets Date: Sun, 21 Jan 2024 11:20:45 +1100 Message-Id: <20240121002047.89234-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240121002047.89234-1-richard.henderson@linaro.org> References: <20240121002047.89234-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1705796565684100003 Content-Type: text/plain; charset="utf-8" A typo in sizeof_reg put the registers at the wrong offset. Simplify the expressions to use positive addresses from the start of uc_mcontext instead of negative addresses from the end of uc_mcontext. Reported-by: Vineet Gupta Signed-off-by: Richard Henderson --- linux-user/riscv/vdso-32.so | Bin 2900 -> 2980 bytes linux-user/riscv/vdso-64.so | Bin 3856 -> 3944 bytes linux-user/riscv/vdso.S | 8 ++++---- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-user/riscv/vdso-32.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zGUeUrG%_8_LX0>9{X?YDUqp`qVpeCm%D6~@^8O6!(HS))fFn#xbF-%SEEbG?2`}67j2EFQ> zo3}9LFfy7BQ|eju4WV! zVPs&i0SYMq=3D>Q<@1Ed)yJF+U*UjQfLI5JPe5rP#V`Xz00DDVP%r~yjRT`J z57PlQR)-eG#s?tWjs-3YofbJbEw)=3D?v(##t#d5P1CM%6r8LZY@qqA0P zoyK~#4JsRzHYseD+aj}7YMaD%u^l2ig?0(-=3DG()wmunx#evpSj4qh<1k!|y419kyW za5-|gGn!0n6rMbX!-TP6@k;>oa*G zP}TuWFGF&2M1Z-gk@Mz*obD`4Zx|+X@#%5GYydif&z`YjawDHTFrX$M;kzXAEcnEna diff --git a/linux-user/riscv/vdso.S b/linux-user/riscv/vdso.S index a86d8fc488..c37275233a 100644 --- a/linux-user/riscv/vdso.S +++ b/linux-user/riscv/vdso.S @@ -101,12 +101,12 @@ endf __vdso_flush_icache .cfi_startproc simple .cfi_signal_frame =20 -#define sizeof_reg (__riscv_xlen / 4) +#define sizeof_reg (__riscv_xlen / 8) #define sizeof_freg 8 -#define B_GR (offsetof_uc_mcontext - sizeof_rt_sigframe) -#define B_FR (offsetof_uc_mcontext - sizeof_rt_sigframe + offsetof_freg0) +#define B_GR 0 +#define B_FR offsetof_freg0 =20 - .cfi_def_cfa 2, sizeof_rt_sigframe + .cfi_def_cfa 2, offsetof_uc_mcontext =20 /* Return address */ .cfi_return_column 64 --=20 2.34.1