From patchwork Thu Feb 14 02:10:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 158278 Delivered-To: patches@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp793724jaa; Wed, 13 Feb 2019 18:10:32 -0800 (PST) X-Received: by 2002:a37:a147:: with SMTP id k68mr979256qke.190.1550110232152; Wed, 13 Feb 2019 18:10:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550110232; cv=none; d=google.com; s=arc-20160816; b=ZKdPRTi62idWFe6FFPdM7/LZytR8WRQSrgj45aIEXNhFT59LfLNxY6NDBp0ZbNDPAx lVKkB0pBNgS56DICc3sT2lMj7CU66Qtupx+FT8ljNG98ow0YJ6RmkVIha54feMJYwCRn BFpZQ7lAPvAhPnj8MVbWvXYAY+IgAw6FnX7+Vw0TkpyxipQIbfN0VvmlhAzzxnKi8RFI PlHtK0NozH5HaQDvM0M2MpyR9lBmCvaWdEqLxzPCA2usiYk9EnoKf7ZYYfAWF7OjcBfo VjmUOULh42W4zn5FinSIuRAyM/GCZWWeqzhvrkxNv+mBTLRX8dgelu8Mh0bkMRl7JoqX 9yEg== 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=xIzVBfVsJyFafmUW72TZLqDDrY1szfaf1MexYWgTKBk=; b=tm98I3yOcDnVtyCieCNYW/cfOfaDrJ3AafiFg0hhWrlzWjWsBvwCy7EVeXSSuOpGGr sgJ24qjNfwbx8yneIOdDo+SMznzPYb3QKadhsoUp1fbgpgmyej1kHNxGwh4AmQqrCbL8 TXl4acRggaO3mHSK6FB1TdNKGczKS3VcMvojFWWFABIuRvtJ4AGHYMPVlvcdZB5easYH xvoyNobnDn39YJPRgqOqm8BbA+jH7mvHlmE87c9kWjckbe53fb5QSeZlAJM5On6apm+y FCtatlreA7exTh37/E5vhnWUhUzubI4rXADe6X77wENEQJr/Db6X3n6F83y5o01r0iVB VLqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bSJWiF25; 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 c186sor625307qkd.142.2019.02.13.18.10.31 for (Google Transport Security); Wed, 13 Feb 2019 18:10:31 -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=bSJWiF25; 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=xIzVBfVsJyFafmUW72TZLqDDrY1szfaf1MexYWgTKBk=; b=bSJWiF25S/UclV7gkfOpR2SXzbsw/A4AR4+zqb6qpO1veqy64HDC/XScLrdw2icpDo 8MeRynHIaSNrIqFB0vfA6ZGHYZNkbKWzCbhK9J6kq6BZ8+glVioFlrXk2DDOFNNacJQm K2go/hcpMhSEu9jvcd6bGuaBqIYV8qC28c8ZuJUdy0TnBq08qIO8x4EWMT+3xP57x3oN egAFkNBRPOprcjoZo+wOGoqVT9JJ7kQUpHquKsi1QRij0QRawyMbLRLzNCAyrOkzF5iI W5GYCuAYRxuPYgAyg9OBraDCEXAkMPV3Ya1oVVwTU+g1WovCI5VzvAHvoqz5pZXHWMw+ 6BuA== 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=xIzVBfVsJyFafmUW72TZLqDDrY1szfaf1MexYWgTKBk=; b=QQn029PuuUCnSTr1jFqy2ICnXKcVvBiaC8HOPerq7NnXBMBPy5SJB8/ymdZnqVGu3y 4OAJ7wFFlFVmghLKAQhPkXiUDhaaR/bXdx0YRyUzeDl7OLS8nol3suQvCcKXpoYMB8Dy 4V9ziomfpos+FWcdPONDKigfFxIRnIzX4oMN6Tbsa9Ck8PzJBeKMW5BN2DMtEtk/Rwvb V9ihsmfBMGPpoYQT+CoKoYGz0fntkfNlaTbjhRHgGEthkpGQKj1yHKSonTYytN2qEZ1E PxYiB8lFXFrwgPzO/dpqbK/J2CiLhLsMVHMLHYC/FzMtA00Jb2+ozwJIc9iEnF48ByfY UP+A== X-Gm-Message-State: AHQUAuZNHkaAUGFzuDJXsq7+j4ZteJSB7QOHifvr6kGi/jPb3PmmhCnY E5t229bGfz2E5dbbwWsWINpx6YJe X-Google-Smtp-Source: AHgI3IYfUk2A8qd0ubf+k0DgmFRWZzwMACnQjGBVT7rPfaVEaK5tRcEzUmZly/sGJCvQiVwaInr56A== X-Received: by 2002:a37:3641:: with SMTP id d62mr982296qka.14.1550110231737; Wed, 13 Feb 2019 18:10:31 -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 d63sm1091575qka.22.2019.02.13.18.10.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 18:10:31 -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.14 V2 05/17] ARM: 8793/1: signal: replace __put_user_error with __put_user Date: Wed, 13 Feb 2019 21:10:10 -0500 Message-Id: <20190214021022.5313-6-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190214021022.5313-1-dave.long@linaro.org> References: <20190214021022.5313-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 1eb83ee7e1cc..02e6b6dfffa7 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -344,7 +344,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; } @@ -476,7 +476,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) @@ -496,8 +496,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);