From patchwork Fri Oct 1 15:33:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 515046 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp918677jaf; Fri, 1 Oct 2021 08:45:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1SpKri9wQCXbekosuXur7RNPkhq5QZHF2oZFHNBzDV4jAqYksXQnQFzwSQdO7llhg51Gv X-Received: by 2002:adf:fa0d:: with SMTP id m13mr13515238wrr.418.1633103125696; Fri, 01 Oct 2021 08:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633103125; cv=none; d=google.com; s=arc-20160816; b=c/lNmM3jK1MiCKRcGOxo1uqRd809iTfA8r3iT81WCP68GzLk1L0PeoiE2uco4+yyN0 BASlsiuUpLs9ui+37Cx4OFcYlEKfQJsEoVjaLOMvZ1RdStndA7xHAi88xTaa+8Hda7Jl jok9wFqry8IuLrFMqe2pNxerb+RNHWiKu3zjt1mrNK+srOioaCoI/sRkxBp4fuKPLE+S qq2VIeAWAtIn8SaXK9HMCapi1HYOdY1X33VU1EE+PI8AEEVJ7eqjyphkoygU4/dviq9Q hjNlNPqU9f2SAV5+29GqMqOpngv4JIf7z3aJt1ohEXbbKwbFP/aYFuxMvXRDNwxp/Gjq /Qvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=k/SnMn3cz6aHPIbcUbwKN2ElGsSac37gMdkQcSMJ6WQ=; b=ntTl9834N1O7EqTIaEws4CJASnXIuD/M37Fe65OSoEJMAzAjA4jeyIp9DsvvjZVWTy rlaknNATzyPo7X8w/SqrpKRcnrlGegLkVuBQIigf3pTPjrfEUxhSb4bhX+a3c5OW3fX/ zt+qXmagH9XJJIDpKb25FqP3BVICnBxVyztFLi5aY965f14EW3OUmzyFco+wGDR8BxzR 188cmUnlaY7qe+EkIi1rkQ+zunZyMVlp+PDNigChvqPozzFj/dahL/QVewFnEv2pmFR4 AGwCdSrfqs8Bpg8Y3eUfuFn/hF8ndPbC4E6idW6OsOsVhBPU0kD8oCFkBsSDtU1Glhkk Ahew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Wn6xzyjB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n17si6188532wro.290.2021.10.01.08.45.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 08:45:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Wn6xzyjB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWKiy-0006At-M7 for patch@linaro.org; Fri, 01 Oct 2021 11:45:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWKY4-0006pv-N1 for qemu-devel@nongnu.org; Fri, 01 Oct 2021 11:34:08 -0400 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]:42888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWKXu-0007kZ-Kv for qemu-devel@nongnu.org; Fri, 01 Oct 2021 11:34:08 -0400 Received: by mail-qt1-x830.google.com with SMTP id f15so9302057qtv.9 for ; Fri, 01 Oct 2021 08:33:58 -0700 (PDT) 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=k/SnMn3cz6aHPIbcUbwKN2ElGsSac37gMdkQcSMJ6WQ=; b=Wn6xzyjBTdCRQX4O4ZN+01a/+yBTD9I06VQ/C7SBr4Lb/pdaHgPbMkl/cT2EgaS1TJ uTMnwQIt7CGmRYN2oEiWQOHz7bCWIHDDvc8MMyUUGVBPYs3aIJv3TxHA0w4o80wTQLBG U+Wcbmm3L31gsLjGH/rdpFCAD/dKDcar2BAlMBY7ExNkOgwPjd+NB7Wk0/cb0hp1Uw6n rk8KiJvWwYmkl9NA66ya3/ghK6dzwY6pDaIHCVDZ1TrN9KH2WjeyIPs4Dd3xCUwUcP4R MHeoXdPN2w1uKvkTZfHa6tFBL74rneVAvVA9+HvaLlKgoM/jhrJBlUrgj+tDbd3YaroO bzMA== 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=k/SnMn3cz6aHPIbcUbwKN2ElGsSac37gMdkQcSMJ6WQ=; b=NqoCYUuX2qGmyHj1k7dx8z4vJswYRBP0u3IANskUPcPvfPK6pZxrxtzoicKMR3TrNg cUjRUbZdmQdB/EfcEVDKvon9Kix+RtfX2TJ8oA4wCiJvIqZei1AEWBZM7duz+LQi56W+ d34ITNJB91Ez99ZHVgjmZz+6yfDT9BV6M7gUoKjfoO8Yt3qreSrsL5gGmmcQmGLbxjgB SFY+PGiYdKT4CK5Rz+2Fy3E1hyYM7WeY3ElEZ1Ojj5TyaED9kTB9z2TOobhdzIwS1SWF VlkSoxajFIYJ2N1KHBsKn5P44dj3P3l85BJOrWudCjCB5+74dSwPnzfZYU55W++UjL1t MYoA== X-Gm-Message-State: AOAM532dFpGGj5mTZMaYFv2u/nTqQbpGi/v1xwi5B/EDTeHUx3v+O25A LiuJYifOG+5u19afccLNFt407KFtr52W0A== X-Received: by 2002:ac8:138c:: with SMTP id h12mr13236328qtj.357.1633102437778; Fri, 01 Oct 2021 08:33:57 -0700 (PDT) Received: from localhost.localdomain (c-67-174-166-185.hsd1.ga.comcast.net. [67.174.166.185]) by smtp.gmail.com with ESMTPSA id x8sm3484823qtv.5.2021.10.01.08.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 08:33:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 7/9] linux-user/nios2: Fix sigmask in setup_rt_frame Date: Fri, 1 Oct 2021 11:33:45 -0400 Message-Id: <20211001153347.1736014-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211001153347.1736014-1-richard.henderson@linaro.org> References: <20211001153347.1736014-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::830; envelope-from=richard.henderson@linaro.org; helo=mail-qt1-x830.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marex@denx.de, crwulff@gmail.com, alex.bennee@linaro.org, laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Do not cast the signal mask elements; trust __put_user. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier --- linux-user/nios2/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.25.1 diff --git a/linux-user/nios2/signal.c b/linux-user/nios2/signal.c index 20b65aa06e..80e3d42fc9 100644 --- a/linux-user/nios2/signal.c +++ b/linux-user/nios2/signal.c @@ -168,8 +168,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka, target_save_altstack(&frame->uc.tuc_stack, env); rt_setup_ucontext(&frame->uc, env); for (i = 0; i < TARGET_NSIG_WORDS; i++) { - __put_user((abi_ulong)set->sig[i], - (abi_ulong *)&frame->uc.tuc_sigmask.sig[i]); + __put_user(set->sig[i], &frame->uc.tuc_sigmask.sig[i]); } /* Set up to return from userspace; jump to fixed address sigreturn