From patchwork Thu Aug 1 08:16:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 170337 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp5086450ile; Thu, 1 Aug 2019 01:20:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIqI+dn9lXdY3ovuqa3BVRfyUAO8YgouDwb3n3jYPKtkOgAHrWdybk0cnOGHl+pO64KVfD X-Received: by 2002:a62:5c3:: with SMTP id 186mr5900507pff.144.1564647657312; Thu, 01 Aug 2019 01:20:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564647657; cv=none; d=google.com; s=arc-20160816; b=D8A522R8oimW+HfmvqUJDzEc1I4IS63oSvTWZOSYP9INMEq+fS2BigtnZf4l8wId1X lUraYzafODMJ87U9J82VKU6kKZMGdgOa0+WiphFyE7OskGposLRA7FG5xIZS6iOwoMCu PdtXNepv4KvwZirWsM2Lm4m0Uj/0S4TLB9/46Lj9ZPKHK3nBIfdwfAxLkl7bJo20WnpT BlZiFN333HDPPLzBlWxDz0mGsAnLfUv1tEt++tlTXV2YeQKBdySZqxjb0Md6RwN1Grty 6aIMhdRvrXCO93XdvXaHyBxpek26l4Ylfb1k4sO+LRSZVlwTrf0OHzEJ67JivX2MOlhB Ra2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+tEIHvT2/jri72b3g9sp066ia6oUWHcxPpBllqXMUPw=; b=0+x+mzKYClFmoZtV3XZqXBplPZPWOyyIrK/4Y8KHyx1VrLhcpTW3f/Ruv9NVFyfdyw BucmJ/V01qCHc48zH0M5i2zhbIubyEhXpBi6fiVlo95tqtNEQs4vchoCKuFyrE4Z6zBg hFFTaAQky5D2FrTpoHZpDrUuXQZ2zNYWdCUwtg6KRxYXCoTyBPkU+2YrkEqnFdRnVWLc kwcPFGJCc9repAMeGtGulkGnLtxhzJLVkcvJTqJQGOE27pnjgOI87hhEnGK8nFtjmxOQ zyKR1raMaMYPB1jb3AsLMTRF34eAb07gGFt9FqJ3xVrwgG8X7zStrvIkNcfOurARsneQ ehTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zstarAAh; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v63si6543334pgd.111.2019.08.01.01.20.57; Thu, 01 Aug 2019 01:20:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zstarAAh; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728259AbfHAIU4 (ORCPT + 14 others); Thu, 1 Aug 2019 04:20:56 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:47092 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727171AbfHAIU4 (ORCPT ); Thu, 1 Aug 2019 04:20:56 -0400 Received: by mail-pg1-f195.google.com with SMTP id k189so14686584pgk.13 for ; Thu, 01 Aug 2019 01:20:56 -0700 (PDT) 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=+tEIHvT2/jri72b3g9sp066ia6oUWHcxPpBllqXMUPw=; b=zstarAAhY7wWmMaGY6D6L8D4JUjQWl1LpQDoGnw+W3hdCIJFeJzHRMBiPHafBsJN9l eZzvWMX/PZj6qV0aTkXMvuu43Wh3x673EnQCOEqPk197LcpNJFabikbGb65LoN4kOhsx WP8ba6yc2hAueRfZnHaWcCbYiVJiL13J4NUyBdoWUvmrtKDhtXrlXNWbiiOfVNIyZM1y /vNp/Yte3Jw4v6bpd1KDd53erL5yT9SmyfuxiqQAeLn/V5g/OTR1qSREfhWIZH/aBV/k qU8xqXAtcEchEEN/j5oB4C/dILnMiiNADOiXy9RhZkxWQGvOMs8ISwdONHMl0lypJqzS V+Sg== 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:mime-version:content-transfer-encoding; bh=+tEIHvT2/jri72b3g9sp066ia6oUWHcxPpBllqXMUPw=; b=Kg+6fUzXWWaJQeFkw784qkMpV/VM888NUOUa1zV8NPCa4lX4dHhVFUlp5gmomQIujN HtV31nXK7VpYnZcK0NqnFF8eyRPSR0RareCpKbgi29Siho+qoJCvVf7Lcpngyt4OK4YP FLymb0dyFXIvMtr4ypCQpyX/PLwGxv3Ongewx2nehkOjD3xTwMAxhIUB7Uq7aBFAVHLH OnMuZRz3hmgfiE+GPWNjUwzA7SxYZsCWamR0Savu2w7MuFU2N7SZhYBFv8M9VHpp87Aw cSNiI2q5jdtpFCjY5UkStowgqYecuLStbyBuVidRF54fAD6JPIi4i8ril8LQKS7SaOZX oGjQ== X-Gm-Message-State: APjAAAXn1SSJs73vZFIsZRoqSNJBJEl6+88NUO8qWEqefit+W8Rc+SrX X55LozgjERCWRTVKfyZyyh8gI4Zvy5o= X-Received: by 2002:a17:90a:8c06:: with SMTP id a6mr7401352pjo.45.1564647655514; Thu, 01 Aug 2019 01:20:55 -0700 (PDT) Received: from localhost ([122.172.28.117]) by smtp.gmail.com with ESMTPSA id 5sm2004064pgh.93.2019.08.01.01.20.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Aug 2019 01:20:55 -0700 (PDT) From: Viresh Kumar To: stable@vger.kernel.org Cc: Viresh Kumar , Julien Thierry , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Marc Zyngier , Mark Rutland , Will Deacon , Russell King , Vincent Guittot , mark.brown@arm.com, guohanjun@huawei.com Subject: [PATCH ARM32 v4.4 V2 31/47] ARM: 8793/1: signal: replace __put_user_error with __put_user Date: Thu, 1 Aug 2019 13:46:15 +0530 Message-Id: <8aaea1bd07c7c54db7efc732ac3a041c32d3bb4a.1564646727.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.21.0.rc0.269.g1a574e7a288b In-Reply-To: References: MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.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: Viresh Kumar --- arch/arm/kernel/signal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.21.0.rc0.269.g1a574e7a288b diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 6f0bd90f6d93..4a4ab72d27ba 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -301,7 +301,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; } @@ -433,7 +433,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) @@ -453,8 +453,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);