From patchwork Thu Feb 14 14:49:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 158398 Delivered-To: patches@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1462171jaa; Thu, 14 Feb 2019 06:49:38 -0800 (PST) X-Received: by 2002:a37:a147:: with SMTP id k68mr3091583qke.190.1550155778774; Thu, 14 Feb 2019 06:49:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550155778; cv=none; d=google.com; s=arc-20160816; b=zYmb8LoC0mpGMu8O1Et8LmrnA+yyQcJ95sMP0saK/ZOYlCPmztKjvvzDw0LPkyPnhJ QS5z0NqIi2GBL88BK+qspo5EPj1lJFIK/x8XE41VuZpok/lCPDzzNHxkOV8npIwwfMK3 Ch6pcvRO23qDQGbdXt2wqamsI8L74ngQMWTg64++AYTpqBb+jGg0KyaA/Vc0wmWYCPb4 VHb/Xrml9EAE4Mfe5Ngejomdk5FExMz3SkMNpPtzBcg3wa6TwZ4VeL22Gna+1ROZLc1O QO9gJAZRbUSQ2EBhGNDJObhZl5shDEYWxErfeMLV9SUmBqkU5iZzjIkN89jyDMVC+DaA cKJw== 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=njKhqNVW1q77dfnJouybYtAijgeLOYBipkp1AnzUgE8=; b=jrSoFTnJkn8Evfm5DRHH85VbZaXVI5FOfJfRYBS+6/Fyi1Qmlcx/KoqbBBD6UlSWwC b0IgfK1yJ+2BQ2Y4vtgYXZUNYsd1ZmQ/umT7tGBA1eytrzT0vOLwIh0jPiSjmXtCrJgA JXO0JyO4uD586mXm+5C0VZJohEFclpxR8HgnidNRy+rOQlMS4PonPvTV56tZ2tnPpZF1 HJtRf8OaFP8gRDI7Dx86ibPegIVZobbFd2ULM2FgTXP8NT6K52srOOT9ZXBuO5DwW5Xs 6PDlNPlJ+AWM+KyszL74KcrjrnVok57LTJ/74Lr93yD/9Rp9hrwvuIXIw1QvoIERjxqq mjJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O23hPUmT; 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 o200sor1632602qke.41.2019.02.14.06.49.38 for (Google Transport Security); Thu, 14 Feb 2019 06:49:38 -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=O23hPUmT; 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=njKhqNVW1q77dfnJouybYtAijgeLOYBipkp1AnzUgE8=; b=O23hPUmTPYxoo3uILFDTZz7epP3dts+rXc5g2YO4Xz/tEc2cf8SlFWmqgKsqzOpkCd 8RBuDUOwA0twNEt3dO2wtdVMNPPit1eRPwVmmhQ0oAWqxlyYpbAFbl3Ilovh8O52ZTKK zI2yh91q+EKI5ApQZUUoOzkXeZxnOeKCa+1fOVzL2oSEfnXaFBZndxC0O5/s5QgINz9E Q6yMXfMljTgsLB7Ko0g9vF8A+r9iPjYtzQT+32+Ps6qictWs8/LFiUbXBj21nk8q4hsQ 799ypVQ442qrgjiQFtSdCTUQ6ST4jpdR9zjctiKdZck3dOjGA2kgaPK0WF2JeoxY3eVY 4BHA== 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=njKhqNVW1q77dfnJouybYtAijgeLOYBipkp1AnzUgE8=; b=iYIwboFtARv2/IPQZPSC3GTm41KsteQNUHudsot5Sr8lOsQeZ9q769WzBxEYGprJhq XU/lHqKglHaxzKsJHlpRUaLEwVhf0twRJO7I5AdqfE3ZM6snNM7LLhSICGHstQNr49nQ 8QQfe9b40YgkElorckBuopNqtluxfXyWVrY3iAvTaDx7eTZRGraWDnEUPwsoNdh7mcHB FuGEWDAhb+bX8QPbyzC7ARHugZOSIuxP2TrSeOVdl8otBG3qTa7w8VCZraxTJvZPSLYp cmgZaURw4gfsDdAIyY6mT8QX9JfdMH+3KAh0GuB0omuTAMWHcFnKmh9urHUXI4Icw6t8 G7Iw== X-Gm-Message-State: AHQUAuaHbIOANj4H0G8odhG982nv7MlPXpvJGuBZUknPHM1Fnl5JVLpu 2lPzNEM3v1XLIBNoiIFlyatFX5aZ X-Google-Smtp-Source: AHgI3IZeLOitEMQ7JlaeqazgDG5amrIQ9TI436hGm3PGw0z+wD5nC1StYU/ccIhO7n9txbFYE3MmDQ== X-Received: by 2002:a37:8443:: with SMTP id g64mr3129866qkd.334.1550155778416; Thu, 14 Feb 2019 06:49:38 -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 k66sm1498919qkc.25.2019.02.14.06.49.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 06:49:37 -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.9 04/16] ARM: 8793/1: signal: replace __put_user_error with __put_user Date: Thu, 14 Feb 2019 09:49:18 -0500 Message-Id: <20190214144930.27539-5-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190214144930.27539-1-dave.long@linaro.org> References: <20190214144930.27539-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 135b1a8e12eb..0a066f03b5ec 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -302,7 +302,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; } @@ -434,7 +434,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) @@ -454,8 +454,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);