From nobody Fri Apr 19 00:56:17 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=1642175668; cv=none; d=zohomail.com; s=zohoarc; b=Un93YB6BOmOqgL3N+7slYQjujzf/wsPEEoKBp9H0eoRA5SiJJi/NKwsD9nlaGpEPYBhTIJ/5V4IOhoXyiN7d0yd6oKVO7A7lFaHQo4OgTznkTCK35NrASsbPnn7sBWODvo5UGl59aoEOlwOAqnerHMETgi7LlutK1Wefpx7NJ1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642175668; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9oAiFDmRNiyFx5akgXGrz8fMLaOCHj0Qubxkn3ACL54=; b=Lq0E6CEGA64Zg6ek7O058lh6YY/FusvGkiYg4rpLZ5LuiBMVGhZuoUQs2Gbgasfjqz4JSU9/loIIxFpdQgCANWquqR0GKmfuIVpm2TeCiModCXqPIfKczKrYuVA1d3QFL4RuRdLOkU0JEgLmCo+Y7hpCbWySUgn1YaM9thV433A= 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 1642175668309297.19854853518166; Fri, 14 Jan 2022 07:54:28 -0800 (PST) Received: from localhost ([::1]:60380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8OuJ-0002jP-By for importer@patchew.org; Fri, 14 Jan 2022 10:54:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8Oe2-00087Z-P2 for qemu-devel@nongnu.org; Fri, 14 Jan 2022 10:37:38 -0500 Received: from [2a00:1450:4864:20::42c] (port=46007 helo=mail-wr1-x42c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8Oe0-0000c8-Fo for qemu-devel@nongnu.org; Fri, 14 Jan 2022 10:37:38 -0500 Received: by mail-wr1-x42c.google.com with SMTP id q8so16203933wra.12 for ; Fri, 14 Jan 2022 07:37:36 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id v13sm6464141wro.90.2022.01.14.07.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jan 2022 07:37:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9oAiFDmRNiyFx5akgXGrz8fMLaOCHj0Qubxkn3ACL54=; b=oUH52jypv1ZTywTRXYBzZXthG7h05bVSWQse2I+ONsHk68CDPDAV4KmveWP7RdNmDN iW+AOLXmgcTvBCTSM7X3xhPV8KAnOUdDi2NBei9Y4yfQj7p0aw+CbaPBgekhMsm6Vu6d CR6BEn+nWW/DYorm1P1HXu8+i1dUc6TPA54zICzM+1XSEvzjLYgmJoktIcgUj2NiBCoE ta3fdf7loBo00LyETyBNX2q91AIJFPl3gMX/r96qhCFZM14m15gpdfFkTYXiHqTi6Kgh Lh+IihBdJY2LBJibjmST5yp4m/ZiuDH8dWixB9AU4ejrT+BXUJ0YclCNxfIQG//Cogsp yCDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9oAiFDmRNiyFx5akgXGrz8fMLaOCHj0Qubxkn3ACL54=; b=EHZZ2xa0QdgYK6pCD5jCNX/muWjsEtJi6hR7SmO6rVJTyKIybCCiYIR13+8SiVHBfv zaJEWVCImuC8GkBS/pXFu67RDyB3QLn8HRr9nkGMOHDDEfGVayCyzpMg++hj9HCRumC3 0zXzLuscT1aaafcT1rgCWq+8M4F69Se5WPnxepmNH79sCJWhZ/HMf/NV4aC5b5c7C/H0 U8wCDIRZkChFkzvVakkHzud3ktDf4X0oJocPda8fOtXpOnrZuQORuO+BCDBBwPsYNNct rNC39TdY1Ck8clT/SVWxr8YrBsHVsWdqEC8YFZypOvn/QFv/T9NTmq+xo8adLb3wX24M KW2A== X-Gm-Message-State: AOAM53018GOa9wy0kd8umdtkVBq806V/81l+EpzKSLL9cZ3T9/ttw5C6 AbiP8BLJszLtGzCLjjUbaFyZuCNqj78z3Q== X-Google-Smtp-Source: ABdhPJy0hmMEQvr5EA3pDR1CMD+r7j5yBkTDlAqhHk9xyTkApRHTKNNs5SXPGMmolcG4nNfzyAvcZA== X-Received: by 2002:a05:6000:2cb:: with SMTP id o11mr3237552wry.187.1642174655246; Fri, 14 Jan 2022 07:37:35 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH 1/3] linux-user: Remove unnecessary 'aligned' attribute from TaskState Date: Fri, 14 Jan 2022 15:37:30 +0000 Message-Id: <20220114153732.3767229-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220114153732.3767229-1-peter.maydell@linaro.org> References: <20220114153732.3767229-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42c (failed) 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=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1642175670830100001 Content-Type: text/plain; charset="utf-8" The linux-user struct TaskState has an 'aligned(16)' attribute. When the struct was first added in commit 851e67a1b46f in 2003, there was a justification in a comment (still present in the source today): /* NOTE: we force a big alignment so that the stack stored after is aligned too */ because the final field in the struct was "uint8_t stack[0];" But that field was removed in commit 48e15fc2d in 2010 which switched us to allocating the stack and the TaskState separately. Because we allocate the structure with g_new0() rather than as a local variable, the attribute made no difference to the alignment of the structure anyway. Remove the unnecessary attribute, and the corresponding comment. Signed-off-by: Peter Maydell --- linux-user/qemu.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 5c713fa8ab2..bd0559759ae 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -96,10 +96,6 @@ struct emulated_sigtable { target_siginfo_t info; }; =20 -/* - * NOTE: we force a big alignment so that the stack stored after is - * aligned too - */ typedef struct TaskState { pid_t ts_tid; /* tid (or pid) of this task */ #ifdef TARGET_ARM @@ -160,7 +156,7 @@ typedef struct TaskState { =20 /* This thread's sigaltstack, if it has one */ struct target_sigaltstack sigaltstack_used; -} __attribute__((aligned(16))) TaskState; +} TaskState; =20 abi_long do_brk(abi_ulong new_brk); =20 --=20 2.25.1 From nobody Fri Apr 19 00:56:17 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=1642174998; cv=none; d=zohomail.com; s=zohoarc; b=Nj+44kqPbYz+vXYQSRTT3QBH96vEzoQASMxrqLpNMaALKsRv1J8/zIdwLNoAKMWS6SYG7RIU3lFsf4MTOp76SSCXwZ2mAOUeg60pWo7LKvKFAYdM6L3tXJC1iNX5IBQehzBGvuk+bsw1l/sH2i54/XpiqzqjbQhHwIFvVD1wTtE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642174998; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=J28a/NNVYEjFSLH7bw1vfwdi9VWF2J04rRZYQ11TvGw=; b=Wb6HTubeMe2PNEBx5uw3IRJOV8oPFzuhKO89B/2BN8GTACKuJerGwRafrfkXTP6vn9mnqDpAeHcvIFjsOXBxPkfunJKKE9LO5DOdohVLDrn4K2cyTC7F9b3Xg+w+hK7/mwVLD5f06Vt0FzURoBpHnqz39KKRFzaYQF/sXPl0wDo= 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 164217499847844.2169974262016; Fri, 14 Jan 2022 07:43:18 -0800 (PST) Received: from localhost ([::1]:40884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8OjV-0005gW-Ei for importer@patchew.org; Fri, 14 Jan 2022 10:43:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8Oe3-00088I-Bc for qemu-devel@nongnu.org; Fri, 14 Jan 2022 10:37:42 -0500 Received: from [2a00:1450:4864:20::329] (port=41781 helo=mail-wm1-x329.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8Oe2-0000cF-19 for qemu-devel@nongnu.org; Fri, 14 Jan 2022 10:37:39 -0500 Received: by mail-wm1-x329.google.com with SMTP id q141-20020a1ca793000000b00347b48dfb53so6451853wme.0 for ; Fri, 14 Jan 2022 07:37:36 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id v13sm6464141wro.90.2022.01.14.07.37.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jan 2022 07:37:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J28a/NNVYEjFSLH7bw1vfwdi9VWF2J04rRZYQ11TvGw=; b=EDH06yxH2Jus/t7A1iyNwmW8E4F7XIAxP/Ee8V+VS79LyGRi+7GrSdTrKwn8loi+xL G2VdGhIJyvr7CY958zwEpANfywEp5e0vuxW/ZiAPuN/zpyb0tNyZOfqm9Vl4m7ywuePI NbT0L37Mj3mbprsR/eeB3a95QAPwLL18G7UYYfVP3IHtc2NrNt8Vu3KFH2HWnCUxDIHo CdGj0FazrFiHwcI3u16VVunM9/7rlLbSCU+BxHa5f8tcUVLj7sRca8T6I63EnhSppUoD ErFT+Ss1NGjQE3lD204Ih0CfIkTRgwUEw8wF1lPoQenjqIi+BXwhCW46I5yJvpK/Z8fb 5hBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J28a/NNVYEjFSLH7bw1vfwdi9VWF2J04rRZYQ11TvGw=; b=O7A6W5FhjEYYCyESQ0+2VotOzIrVUc81MfeO6eg7ROBk1wxMzMD719pf7eqJDlzFSC JVP58AZA6jxymoZcgIMpFPaGlgpDDtT/sjJTtnMo5twNxaUOufDikysGEKCgo3J/jHc/ uyA6enQcoB73cpKsvG6C/jNamRHFUzYWW353bU+p34Djo5+PRurEYZlvyMu3bd/jPMfX iDgTg2eB5RtxnIq8zLubvfVxdA3XNh1m/zE5HOSO9NgzHvlslgHiixvXN7WUguwUdC0g cTrL1RAZkQIDjRd2DZikZxsSV151VXCMvuiIdVDuS7I/Ay5TXWnVXj5f2QGezZ6KQGh2 BZhQ== X-Gm-Message-State: AOAM532/kRmbflfB7F0d/+cTAWF6eIYI/JYz+tnjkViZYzkR0CAv4DfM WyLaj+ZQZxa46uXVlWaYDPAQrmcB6XHrrQ== X-Google-Smtp-Source: ABdhPJywL5jdzSQdJtsAlabqOlVFNjbhHaT8I6zNmWoyS7OMuBQgJBGfDfBvns1iJ/HGZgCWMuT+Ug== X-Received: by 2002:a7b:c413:: with SMTP id k19mr16264749wmi.25.1642174655929; Fri, 14 Jan 2022 07:37:35 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH 2/3] linux-user: Rename user_force_sig tracepoint to match function name Date: Fri, 14 Jan 2022 15:37:31 +0000 Message-Id: <20220114153732.3767229-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220114153732.3767229-1-peter.maydell@linaro.org> References: <20220114153732.3767229-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::329 (failed) 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=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1642174999778100001 Content-Type: text/plain; charset="utf-8" In commit c599d4d6d6e9bfdb64 in 2016 we renamed the old force_sig() function to dump_core_and_abort(), but we forgot to rename the associated tracepoint. Rename the tracepoint to to match the function it's called from. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- linux-user/signal.c | 2 +- linux-user/trace-events | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index f813b4f18e4..bfbbeab9ad2 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -734,7 +734,7 @@ static void QEMU_NORETURN dump_core_and_abort(int targe= t_sig) struct sigaction act; =20 host_sig =3D target_to_host_signal(target_sig); - trace_user_force_sig(env, target_sig, host_sig); + trace_user_dump_core_and_abort(env, target_sig, host_sig); gdb_signalled(env, target_sig); =20 /* dump core if supported by target binary format */ diff --git a/linux-user/trace-events b/linux-user/trace-events index e7d2f54e940..f33717f248a 100644 --- a/linux-user/trace-events +++ b/linux-user/trace-events @@ -9,7 +9,7 @@ user_setup_frame(void *env, uint64_t frame_addr) "env=3D%p = frame_addr=3D0x%"PRIx64 user_setup_rt_frame(void *env, uint64_t frame_addr) "env=3D%p frame_addr= =3D0x%"PRIx64 user_do_rt_sigreturn(void *env, uint64_t frame_addr) "env=3D%p frame_addr= =3D0x%"PRIx64 user_do_sigreturn(void *env, uint64_t frame_addr) "env=3D%p frame_addr=3D0= x%"PRIx64 -user_force_sig(void *env, int target_sig, int host_sig) "env=3D%p signal %= d (host %d)" +user_dump_core_and_abort(void *env, int target_sig, int host_sig) "env=3D%= p signal %d (host %d)" user_handle_signal(void *env, int target_sig) "env=3D%p signal %d" user_host_signal(void *env, int host_sig, int target_sig) "env=3D%p signal= %d (target %d)" user_queue_signal(void *env, int target_sig) "env=3D%p signal %d" --=20 2.25.1 From nobody Fri Apr 19 00:56:17 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=1642175892; cv=none; d=zohomail.com; s=zohoarc; b=YrEHU9mRyl1qYDwoL43n9/4BThYAErP2dQUQji3ZG7/iEKIu5hWFonLyBQ+px3HP8KQWOR10xBmlNURRCM+E4TUQXCmpsMO4QxoYvqlegtnX2IRKJw33OnHpwY4bpY2qY2y97Zs7wChB+RJ07i1pxBk6ME/a6agOkmMDh0nfxlM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642175892; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fY4h9Zasl1T6lu5BwFhXAKfI2EvfJnF9sL2oRaoqTGk=; b=mR+h5prYcSWK/Batqenbvqhs4dIDwRpn8zffACChzm3Jl1Wf52co18p8xjRQf7XNv9qPiVMkS9Cjnx9ArbM5DLkB5rT8mwwClTfmyMCMNNuIaYswQs0ajR+XsGZvV0nvnhtwz8ncBCIW2PGbFABqQYjDMoNjn8jIFdlcKQj0xMY= 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 1642175892224180.50042912551237; Fri, 14 Jan 2022 07:58:12 -0800 (PST) Received: from localhost ([::1]:36720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8Oxv-0007ON-0B for importer@patchew.org; Fri, 14 Jan 2022 10:58:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8Oe4-00088K-NP for qemu-devel@nongnu.org; Fri, 14 Jan 2022 10:37:43 -0500 Received: from [2a00:1450:4864:20::433] (port=43650 helo=mail-wr1-x433.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8Oe3-0000cX-BU for qemu-devel@nongnu.org; Fri, 14 Jan 2022 10:37:40 -0500 Received: by mail-wr1-x433.google.com with SMTP id o3so16219461wrh.10 for ; Fri, 14 Jan 2022 07:37:39 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id v13sm6464141wro.90.2022.01.14.07.37.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jan 2022 07:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fY4h9Zasl1T6lu5BwFhXAKfI2EvfJnF9sL2oRaoqTGk=; b=cOIG5UujQAev1mHdAPGLcpBxYivOBceG9Xp9trVyRF86PWz0UwYY0da3XrdcNtZS6T YfFxLdhhKLgVjDYUh+RqlBp7mgexfeXEHVfTgOeF03nSyKdH46pL2ZqpbfVXF/P9CUqR 8OciWjlAArY9bN5iVWs9qjZ8WayhOMw/WM+sf9ya538NKpB4XdCDQMNtC0uy4XTFqRMc IXgSoQOfqwX41uW4XWLfgJrVZj772p1VL8y7MMLMjTYC4l0EvWCeCAMLnA2IVO+frGtf gPob52sRl/ujjFBsTnw1biS6ECnML5oxtYdtSS5hjqe19jEYPmGuxG7e32qKpCLGzeQr 0Y3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fY4h9Zasl1T6lu5BwFhXAKfI2EvfJnF9sL2oRaoqTGk=; b=DASYAMFA4384MGnrICj1rQgB8XOzr7mqowoMBhY5eXUdP1Jt0WB/fDapSw7cRGeVq5 DQ+NKAdtPUsM6hBrcvoUBoSdEKN984ZGeqyRR/Qjg1AcXqLnTP8UCnazsjm4gP1Vy61R /iUo521JhNjLdhMAahEJFBSHDTacXHg5rMw0oy3a3wyNW1XaTSXSFfoWMKNjFfXPrZm/ URcM65PJzvVeFXhAtW8Hv39Fgfxwfqhwt0Q67ywr8JE5F5NbJv7xvjCPUFBHmgZlPBn/ jY7OoDXEWGM+KRuagX/2nC2ZbItk1R0b7G2voFTSZ3t5IqBXRCr+yQz9Ddb/b2DYXRyZ 0iBw== X-Gm-Message-State: AOAM530P+yn6ABXo29F3Ob+54XwKfil6klD4dkDpDGAtKOVX7mSK5Urg qQWPq37iPUjUjzTvv9XkmmyN2ZTsd9NLLw== X-Google-Smtp-Source: ABdhPJwIPjppWJBN4Gd1epyRqGIKY84Cufx5qSX/3CGs8AnrppyD/UKhTuymz8j6Z3lQQF12nHRjQw== X-Received: by 2002:a5d:6c6a:: with SMTP id r10mr5118704wrz.489.1642174658177; Fri, 14 Jan 2022 07:37:38 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH 3/3] linux-user: Return void from queue_signal() Date: Fri, 14 Jan 2022 15:37:32 +0000 Message-Id: <20220114153732.3767229-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220114153732.3767229-1-peter.maydell@linaro.org> References: <20220114153732.3767229-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::433 (failed) 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=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1642175893581100001 Content-Type: text/plain; charset="utf-8" The linux-user queue_signal() function always returns 1, and none of its callers check the return value. Give it a void return type instead. The return value is a leftover from the old pre-2016 linux-user signal handling code, which really did have a queue of signals and so might return a failure indication if too many signals were queued at once. The current design avoids having to ever have more than one signal queued via queue_signal() at once, so it can never fail. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- linux-user/signal-common.h | 4 ++-- linux-user/signal.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/linux-user/signal-common.h b/linux-user/signal-common.h index 42aa479080b..2113165a758 100644 --- a/linux-user/signal-common.h +++ b/linux-user/signal-common.h @@ -59,8 +59,8 @@ void setup_rt_frame(int sig, struct target_sigaction *ka, =20 void process_pending_signals(CPUArchState *cpu_env); void signal_init(void); -int queue_signal(CPUArchState *env, int sig, int si_type, - target_siginfo_t *info); +void queue_signal(CPUArchState *env, int sig, int si_type, + target_siginfo_t *info); void host_to_target_siginfo(target_siginfo_t *tinfo, const siginfo_t *info= ); void target_to_host_siginfo(siginfo_t *info, const target_siginfo_t *tinfo= ); int target_to_host_signal(int sig); diff --git a/linux-user/signal.c b/linux-user/signal.c index bfbbeab9ad2..32854bb3752 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -780,8 +780,8 @@ static void QEMU_NORETURN dump_core_and_abort(int targe= t_sig) =20 /* queue a signal so that it will be send to the virtual CPU as soon as possible */ -int queue_signal(CPUArchState *env, int sig, int si_type, - target_siginfo_t *info) +void queue_signal(CPUArchState *env, int sig, int si_type, + target_siginfo_t *info) { CPUState *cpu =3D env_cpu(env); TaskState *ts =3D cpu->opaque; @@ -794,7 +794,6 @@ int queue_signal(CPUArchState *env, int sig, int si_typ= e, ts->sync_signal.pending =3D sig; /* signal that a new signal is pending */ qatomic_set(&ts->signal_pending, 1); - return 1; /* indicates that the signal was queued */ } =20 =20 --=20 2.25.1