From patchwork Tue Dec 21 02:50:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 526591 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp4677689imb; Mon, 20 Dec 2021 18:59:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGkZux+U9jruV/Gaca2S4j8yFMslgzlCCSigUqtw1oTPFd6Zj4wHPerIcOOvbzRJdds+G6 X-Received: by 2002:a25:8505:: with SMTP id w5mr1838847ybk.570.1640055544764; Mon, 20 Dec 2021 18:59:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640055544; cv=none; d=google.com; s=arc-20160816; b=SgXgkV2tM95Zd4WIJu5w6Z8RL05FLjejcNGXtiS1LSwBC+m0VQc4FVnBhkkID6iPFW uJA52sCKzo/57hFS1uckZXA3H5IPr3gfbf9iv32ByjXMX+JYcpsvG2JBD1ody83W2Xjr S7i1M4EJRnOwntAPwfgAqDSy/JRzF2Ss4VZ6SUJVGVeyTk2cqETCt6FHBUBYlqyJvifl 0fUhEA2PUHXoevCHWrYC7xUQSlyLHBJUVX1uePw8PZvJmvq/M3sVQCRSlXeD7m9TUX1x +0IOSdI6NiOwMgz7a4Bx0Fp2wKwfYisyw+ztIAvsP3Sc39fEZ28UV4ogFldm91/5f7Ja KaYw== 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=iHsxRB8KyaG7WhuzCtkZtRVF4Ccf8PekyBx+hSykVAQ=; b=ByyAF/KOK7ul/T3Cx7H+tCpEqYyD0aI2HkFkYpGqyOQchaI0Lx0ETMkuP//LKRRXyt 9HNqv1TibUNPh7LsM6aU2FSdH0YgDeFdg4TkeAeYGOT+JUbdhxkyR+S8sKXI2pihGVg9 GRjjOnvZpgOzL6GXkDW7G7jxL25sCNYm2vIdALhdmmDirGgvYxE3l50VbQWPhEZn6//W CBlABcJYrXzEoYd/xhC4KsQX2cly5s0Ot/+mWCB2Ef9HKxMqPcreyoKCFOiDwRhSxVD5 NRp6/nbVSnVm+rm2ctX+8B8wc8mD7R9pnPA61edo59W5WFZFADrbXK4QGEjwLvVqSKw+ whcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rqalFPFk; 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=pass (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 x6si32865365ybt.119.2021.12.20.18.59.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Dec 2021 18:59:04 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=rqalFPFk; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzVMm-00067e-BE for patch@linaro.org; Mon, 20 Dec 2021 21:59:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzVEM-0003j6-Mf for qemu-devel@nongnu.org; Mon, 20 Dec 2021 21:50:22 -0500 Received: from [2607:f8b0:4864:20::1029] (port=43565 helo=mail-pj1-x1029.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzVEL-0000Cd-0z for qemu-devel@nongnu.org; Mon, 20 Dec 2021 21:50:22 -0500 Received: by mail-pj1-x1029.google.com with SMTP id a11-20020a17090a854b00b001b11aae38d6so1817611pjw.2 for ; Mon, 20 Dec 2021 18:50:20 -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=iHsxRB8KyaG7WhuzCtkZtRVF4Ccf8PekyBx+hSykVAQ=; b=rqalFPFkC7D6+9XeYByvlxdC413CYAZRlevg4Jbw3i3urdreKeqZwN4TWMEcQyTZfa ulvpXxBwyi2aJHbZsK1kE5f3VNrVVac2x6tVI6kCBA85drwa7aRxI8M4kWwbSQZ8KRHZ a2aKvrOZbzG7mhwLeWdhv1bK6khOydQJYuX8CWg9oUGUWAmwErt6ytQTRDmDeYRRJH7V Qx14bXB+q/YPVw7uZsEeHTxKGNyLfaQ9Q7tSZ+QLVb2O1NYqwG8p5HaI7cw9/HeN+/fr DgVLi5/WXMW519wM0cSl2dFX9GAmfNw3DzCr3ueehTcZ04y/pf/Qk4EF5ih2nFatTz7k UZjQ== 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=iHsxRB8KyaG7WhuzCtkZtRVF4Ccf8PekyBx+hSykVAQ=; b=N5aij3X96hWGrWCjZmK3BpEJhFuQ6w4F8zUl7TLGBSZNA7UsCYODyh3orPlLTYwYNI BAuLuEqBuAKBPgzBXsdE1fr85LutBYJhyLG/kb8BbjbIEqY1iDGulUOmexXW9k7Fyw74 0sjvgI9wm6MlP2yf4JK3IJeK3TpCbST7WipKPNnz8bOrYQcn2Tcj/acI0TMoZj2IuyJ6 8Y+Pv3IZofRs9+UsIRvd/dV3pl/XeLm1j5oInsfQ+5HFqMH1unEZHcr8VuHQSs03BTW9 o+54NcecHY8kNwZyUcx2nswLxN6yq0raocALAZL+GmySA/7lQ3Lxs2eC/IXD+zpRy90t PHTw== X-Gm-Message-State: AOAM5323iALJNlRYgpYqbICia4i7ytnmQPvuo0+fx3qr7z85Xaf04Az/ CPNGy+/aqBoKLjc+Q4zOv8XH8IhppmUJ0Q== X-Received: by 2002:a17:90b:1c0b:: with SMTP id oc11mr1349168pjb.174.1640055019680; Mon, 20 Dec 2021 18:50:19 -0800 (PST) Received: from localhost.localdomain ([156.19.246.20]) by smtp.gmail.com with ESMTPSA id bg23sm694025pjb.24.2021.12.20.18.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Dec 2021 18:50:19 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 6/7] linux-user/nios2: Fix sigmask in setup_rt_frame Date: Mon, 20 Dec 2021 18:50:11 -0800 Message-Id: <20211221025012.1057923-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211221025012.1057923-1-richard.henderson@linaro.org> References: <20211221025012.1057923-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1029 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1029.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, 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.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Do not cast the signal mask elements; trust __put_user. Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/nios2/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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