From patchwork Tue May 18 05:31:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 441153 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1800716jac; Mon, 17 May 2021 23:17:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKevFPrpduZoJvtRXVJcl72Cbf0QjMO9DuKrK9bWAnkWK/NO2uc19AJ+vKPK4SPCAPPOTA X-Received: by 2002:a25:8543:: with SMTP id f3mr5207886ybn.80.1621318640062; Mon, 17 May 2021 23:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621318640; cv=none; d=google.com; s=arc-20160816; b=L0fum4XwY4lOKHC1ifmPSpbvZe2FVOYR++e5Jwpk1an15DpATHXrnhL8iYzwXGU6ak ti5x4kyujS+Q11Q50Ya0Y87aUW0Xr8Wb1Gw0waWsWw282taj4FTSrH/5M/1/3VGti6Wn kuiQzzSPvB9h48BYLxABlHWm2RsWtxeL2jM4R3DATDl4yoDONc5kQ2TW2C48yizfMuTF lWUs7/9KH6nYQWPxM8J3PMut1D9fXz6fmWBGhp0TGTskUojtlvCw+AjlXY6jya+y8gZH Ty6n0wrL2fUUxNb9qBZU/a0G2zmZn4N1haXqVdaAIkNBV21Nal0egWv3AkvUCzYAsBjP 9auw== 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; bh=njA1vIsCq4RtA6O2hMBIync3H+LHwCosZAH7cFlzsH0=; b=t5vaT3NINMXBc8e8uM9kPydc0v92bcF13XO+zqOMDc1TsOYXBPc2N2sSy/RkEqzzcI 7Fac17em/Wq5Ev8OxIdiijaSbnkUtddPDbvnvnR0okcTvA/kpQPDJIW7qOTt42HGhppC qTu+rq/TfWYzdEljSjzFYIpSOaLwfQliQ7O7a+IYkbsYgLWM7WwLcmZWa5xZhHbWYr4h Wu+iDh1ApCDTRwv2j0Q6OViB+rlkDPW+uRP7MnSn/WRMsc3VNekFJ5kneuw4Jy/KE81h 3Uc3duwpZjAxy/YrNvuC3YW9+XtuwuV6/kNxDVQN9L1/QS4hpO+G+BjRMisopNyUToa4 X/cQ== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 137si393090ybc.357.2021.05.17.23.17.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 23:17:20 -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; 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" Received: from localhost ([::1]:37492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lit2d-0006s0-IF for patch@linaro.org; Tue, 18 May 2021 02:17:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lisKs-0007oK-0G for qemu-devel@nongnu.org; Tue, 18 May 2021 01:32:06 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:48807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lisKn-0007Ad-2x for qemu-devel@nongnu.org; Tue, 18 May 2021 01:32:05 -0400 Received: from quad ([82.142.31.78]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MHEPI-1leUd21PzE-00DG9u; Tue, 18 May 2021 07:31:56 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 45/59] linux-user/s390x: Add build asserts for sigset sizes Date: Tue, 18 May 2021 07:31:17 +0200 Message-Id: <20210518053131.87212-46-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210518053131.87212-1-laurent@vivier.eu> References: <20210518053131.87212-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:67j5AqJGsbL04czHgkpz4p5+F0BEW+pTridcSZoViXMHLJcRnxS HG83q5NBR7IjB/8BWTmQSQRUMUkHMpMEKHyhcyXCYBBMivYv34alENyzlbZbUyZODMD0V4t ta0D/F94a+NH0jpoYXbJY+ksiEoPzOGieI1sYqNrv84cxKXU7aEQp0QgiQBCJ9/sqJzt7M5 lmhOo501069D7FYif0pLQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:ofUPTZ16NJ8=:FmQsXo5RtrB+NzZA/Cqqx9 abK6+2y8tJIMNyJ3bH/qwsB5f7B+ouN0KDvsGhNpq77ky7T/+p9B+MjghjlPLXRJ9kXAocRDT ZHoQDlJWx2uNyiI2seEC3V2Xzc+583IP3hQAIZgNjG8o8dfTq/KSCPC657+02rRBEFcHdb8CE r28D4U32vUXkQ6aRJFa4s4xuZvSDGWpjgDKHGsaJ9RDom8K+alJLCMipeRkSsI3tXrIXPRKuD Quh76OibVkl+DT4tZBYaF7culrzB600rB+LzrfSFhxPLOHavpNbsufT5v6OXYGpDY2JQoFx2y R5PsYpd5ePGAarhsVBEgnLsvluM7eyVemRsMLOh23FokiUHfNwgd4l4Uiy8FSQaJ1LRuBCuTu L+6qm2muolaxz75oW1JWlw1juDBd9CWHF8Ed8inWAGeiqFUezy6S53Gnd3UHfaABDRk7nr5dv xoRlgNofFD5oCjJcaiXvhh5qm1auAZ4hMxTtMoIrIU/cw9fFAjSmxOPyv7RelofUGFjponH0g Iv2zQ639WLEMS9yOrtPH0g= Received-SPF: none client-ip=212.227.126.187; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: Richard Henderson , Laurent Vivier , David Hildenbrand Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson At point of usage, it's not immediately obvious that we don't need a loop to copy these arrays. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand Message-Id: <20210428193408.233706-14-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/s390x/signal.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.31.1 diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c index 81ba59b46af5..839a7ae4b3d6 100644 --- a/linux-user/s390x/signal.c +++ b/linux-user/s390x/signal.c @@ -141,6 +141,8 @@ void setup_frame(int sig, struct target_sigaction *ka, return; } + /* Make sure that we're initializing all of oldmask. */ + QEMU_BUILD_BUG_ON(ARRAY_SIZE(frame->sc.oldmask) != 1); __put_user(set->sig[0], &frame->sc.oldmask[0]); save_sigregs(env, &frame->sregs); @@ -266,6 +268,9 @@ long do_sigreturn(CPUS390XState *env) force_sig(TARGET_SIGSEGV); return -TARGET_QEMU_ESIGRETURN; } + + /* Make sure that we're initializing all of target_set. */ + QEMU_BUILD_BUG_ON(ARRAY_SIZE(target_set.sig) != 1); __get_user(target_set.sig[0], &frame->sc.oldmask[0]); target_to_host_sigset_internal(&set, &target_set);