From patchwork Wed Feb 13 21:32:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 158257 Delivered-To: patches@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp560834jaa; Wed, 13 Feb 2019 13:32:33 -0800 (PST) X-Received: by 2002:ae9:d8c2:: with SMTP id u185mr194324qkf.107.1550093553051; Wed, 13 Feb 2019 13:32:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550093553; cv=none; d=google.com; s=arc-20160816; b=okrDLMJsj5pNKQ0cGiS9bcTyZFk8xmY2E0brg2kdG8C1Xz/WKMMry+LTyIGHzhm2E+ ErmHMvAXCStwP4Yt0E9MwdaLXMegDxhlHDnTRnaQ1yxcl8sVibvKZcPc2c5VWihdnDov vUtZsKj7Ibz7POi4v3RjGz5ap/C6xhkpF/+QAtWLxIR5gkLs8QvRVMNA86TxW+ysxIXg 490/Od+ff0e/+HsdHTJDYgLwqlqjYkNsEZ8z65wIEM2ZY48sl0pAu4nZBRLmS9fOu6oX SmWhOHQ2kUD4X5As47IFpQQ8K3AbJNDdiDxj2XLubvesBzc7//OEeTrpWNB5uFXYLjex hzuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DKiPUgce4JTheoGvWXbyBEIdokTDXbYrmiEYcaxz36E=; b=OVxx7Y9cuLDL2lNFYIRQjZtzWCGM3RgAktroXzawQseQX5q741xeZH/u7BUIxSHZcI s3aFqmQdIRQE6Pf+0WLhzXlZCGBa1mWYVMNxMAVYVx9IvYf6NwcpJccMbeVCmeTjE9mi 8QuB0bkjWY0Fl7PtTgQS51axxM9lk6JwV3ij1Ctp+kllNnrkFZwB9kqWBOxTg2nlNF7p fMJ8d7f/UJijo8JpZRAjPXxRAbr+A1AsrTsDOlYlKc4uDHX0BycDy24e5juQybmXTNPN rCK+K0A8XzLCePAQbilSolKvilYksv1LNrz/x0JWxjdcPB2HvTS6gJ2/wfT3LV4kHtiY 6itw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DbAPnFK7; spf=pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id q126sor274078qkf.120.2019.02.13.13.32.32 for (Google Transport Security); Wed, 13 Feb 2019 13:32:33 -0800 (PST) Received-SPF: pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DbAPnFK7; spf=pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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; bh=DKiPUgce4JTheoGvWXbyBEIdokTDXbYrmiEYcaxz36E=; b=DbAPnFK7wOOhgCkSXvr0rLYtTRXuMZoONdFu6iHTzWBB/el8BuICjM2pTFOqGm9uUD MzehSpAKMBox9yPh88f2hG4Knzskm9d/Uq8PuLOjVRmRyw5HfRE6h65JxG1hWs/jgzb7 ep/kP7umpWmHAL7RDckVkr84vFvbcl+65Eci/o6yk9AgDW1Ho6YpNC0KPJG4GyO4KOof qU7020prSwEjhrPdjOhv0nTnfZ7UB3eFEgtPH/+g/B13w+swHlEWHm6+9ejg/Yh4evoc YKL4JtBxJiSaOeonz7KnTt4HCuTAV2YpOxp3PrVTmVy1PE7u0Hl25MccfI52IVcaCcLa sAew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DKiPUgce4JTheoGvWXbyBEIdokTDXbYrmiEYcaxz36E=; b=bbG2uxaIzvCGXfIRXfmWWzcH94C+YA6jiFnSLLjs6UvqvtMfTimeWYY3rUGon4Q2WG m+wXCC2bXEk9aCPzIDE1Gike2fDkIgnUhYrxM9ALDrpNJAERZKLwIoILODh5JxqIP2uj +1RvGi/ziaAXnuHGqEE0LH6i9kdbLBd+kyw45QCFvA+CBhRBN8yAN3+eq+Rpa1liZOqA veYfT9ccDlvbxsjfsmof9OznkScD6aFwYS0OxoEyFCNOsVAmuVX2KdnfMmnUYTA8u6o6 hXpNMk+lPRFVZ5kceM/sqmKx4qAFGPlee0UcQ6y20+GCsyHWkedH9BS64dmB3RrQHOQq XCQg== X-Gm-Message-State: AHQUAuZUV2zn4me6iu2p7Zr6eVOAcRsnqHB0PtxgUYv356fQ3ft+e2WC 1M0i0/6f4XutH+G/ulGYYW+REalh X-Google-Smtp-Source: AHgI3Ibx+sKx3L99liSsDx+HFc+v/ruM6shgCriTB9LCyaZtBZ2LkNnyIIhH56SKc+xo29hyIj24zg== X-Received: by 2002:a37:a14d:: with SMTP id k74mr216780qke.242.1550093552772; Wed, 13 Feb 2019 13:32:32 -0800 (PST) Return-Path: Received: from localhost.localdomain (pool-72-71-243-63.cncdnh.fast00.myfairpoint.net. [72.71.243.63]) by smtp.googlemail.com with ESMTPSA id 8sm382675qtr.7.2019.02.13.13.32.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 13:32:32 -0800 (PST) From: David Long To: stable@vger.kernel.org, Russell King - ARM Linux , Florian Fainelli , Julien Thierry , Tony Lindgren , Marc Zyngier , Greg KH , Mark Rutland Cc: Will Deacon , Mark Brown , linux-kernel@vger.kernel.org Subject: [PATCH 4.19 05/17] ARM: 8793/1: signal: replace __put_user_error with __put_user Date: Wed, 13 Feb 2019 16:32:11 -0500 Message-Id: <20190213213223.916-6-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190213213223.916-1-dave.long@linaro.org> References: <20190213213223.916-1-dave.long@linaro.org> From: Julien Thierry Commit 18ea66bd6e7a95bdc598223d72757190916af28b upstream. With Spectre-v1.1 mitigations, __put_user_error is pointless. In an attempt to remove it, replace its references in frame setups with __put_user. Signed-off-by: Julien Thierry Signed-off-by: Russell King Signed-off-by: David A. Long --- arch/arm/kernel/signal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 1e2ecfe080bb..b908382b69ff 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -336,7 +336,7 @@ setup_sigframe(struct sigframe __user *sf, struct pt_regs *regs, sigset_t *set) if (err == 0) err |= preserve_vfp_context(&aux->vfp); #endif - __put_user_error(0, &aux->end_magic, err); + err |= __put_user(0, &aux->end_magic); return err; } @@ -499,7 +499,7 @@ setup_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) /* * Set uc.uc_flags to a value which sc.trap_no would never have. */ - __put_user_error(0x5ac3c35a, &frame->uc.uc_flags, err); + err = __put_user(0x5ac3c35a, &frame->uc.uc_flags); err |= setup_sigframe(frame, regs, set); if (err == 0) @@ -519,8 +519,8 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) err |= copy_siginfo_to_user(&frame->info, &ksig->info); - __put_user_error(0, &frame->sig.uc.uc_flags, err); - __put_user_error(NULL, &frame->sig.uc.uc_link, err); + err |= __put_user(0, &frame->sig.uc.uc_flags); + err |= __put_user(NULL, &frame->sig.uc.uc_link); err |= __save_altstack(&frame->sig.uc.uc_stack, regs->ARM_sp); err |= setup_sigframe(&frame->sig, regs, set);