From patchwork Thu Jan 10 17:51:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 155249 Delivered-To: patches@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2176079jaa; Thu, 10 Jan 2019 09:51:59 -0800 (PST) X-Received: by 2002:ac8:3181:: with SMTP id h1mr10864757qte.14.1547142719857; Thu, 10 Jan 2019 09:51:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547142719; cv=none; d=google.com; s=arc-20160816; b=sjP18ZJwiP8MEAtUM6VpKRJcs1M8q0BMHS7NINcB18R8/cd3jRqvk5ztDrVKWjnM36 eascuZ/c0eDuZrZcgMjBwJETB0ES+coWEgPIzWFgsgyvPl+jtFDIWPzgrQsdpon913rn GEJnYk0Srg4uZryMX0zNDNC5itqUmYaa5nSAf7gm+jqZKwwirBy8aapqm7w0ujkp2Gi/ YtE+OmXTlGO3dTUJI2wBRDo2rIKc1GTij+jbVzmkKw5ElJ8WNoZz1QGnNX8mCoT7a0nd nLq95Kvce8VLZRKmNnjydFKpzaA+666/s5a9+AdCKt4O5fBokUOl3PDWn1yFSHEPcrCC ApmQ== 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=iqoUd3BBVgCCCPNDsO3ruGIEt1zyphecuUW2uxCBAmZlJRp5HqDP2GIyC91jYazyaq +2Pg80FNsaOmtGyjBplo4Y9fmt3NHSpPuDiF9Qq4ICvcWsUJOCLeVqsCMSpjbd5xUQbv vDAGl7RjzQ2UfZTUnLkJ3XTJpqdnuuE3m7ppHN4OAywLQjTWGHBczCNsRNv/UWUY3TZJ BgmmnPTH/e8DHx3jlPgFLtpPjjwyms/ykEAX7HQKwTGCM494jNWuhkYGas+ZSIKPwk+T V6+tqaAj5OMQjEW7Mxx4Uy6pAlsUzbqLToFpZWAbNgKb+2q3G6vewDjJwsI/hZioV1IN n0xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PUvu36DD; 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 n15sor36453174qki.24.2019.01.10.09.51.59 for (Google Transport Security); Thu, 10 Jan 2019 09:51:59 -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=PUvu36DD; 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=PUvu36DDKBuL+/xwzoBPyg+6kly8Cr9YAaqC8cBU18AxTlfO3Be66HIAl3xmziMwKU 0f44MXEUq7YmmbYghlifzFaqDpYJDHLsJEfTNJGpFlA1AmHPQYtKT7zk0FJkh+bojPv0 gV5y1QuMJyR+25G3oHNxbhj7y6TDI063rcdOU= 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=clYehhujpGvLucqHJr6An99BYt4CkDg1FQVmqQ6tF4v9Q0E0m8/6h3hkcDurmVc4vu t+1SlXcotlzFol36WlFRtYix5KIyRhYXryZI0d5FO0G8I/33kDMwcxpeNzswjcvsfet8 cxynl5GAyDM4IEmjFtC+lQ2RNPT+t4/pQ5zfJ6P0GmNKUPiqRz782rYgBxUQK8B3r97A PPBFw9sDSb1MWCDL6NdgTgeWe7a4uk09bsaJVo5h/vuTo2IiLl3bXTCH+LfyF9pr6zXV o3coFH93ZE1b7gd+bGbhxexhM2d4oFG9JsfrnGq7/Qmgkqc8Z618RGuuegWkjOBd7vSx vWAQ== X-Gm-Message-State: AJcUukeEVCEJQMqxiNcS+RONppNaEtNNwjLKk8fqDZ4X4n2UnF3BNQuz piC8u9QBFRe5Nl3aoctethHz7V+22Z+b8w== X-Google-Smtp-Source: ALg8bN4HECsOcvGxqD/klkc+uE7HEmyR/u07jY+2uUrF5/Fgiq6h9tTpTRLCXloGF6W8gXzBQ3c+SA== X-Received: by 2002:a37:7d05:: with SMTP id y5mr9641634qkc.310.1547142719619; Thu, 10 Jan 2019 09:51:59 -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 b8sm41815904qka.79.2019.01.10.09.51.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Jan 2019 09:51:58 -0800 (PST) From: David Long To: stable@vger.kernel.org, Russell King - ARM Linux , Florian Fainelli , Julien Thierry , Tony Lindgren , Marc Zyngier , Mark Rutland Cc: Greg KH , Mark Brown Subject: [PATCH 4.14 05/17] ARM: 8793/1: signal: replace __put_user_error with __put_user Date: Thu, 10 Jan 2019 12:51:38 -0500 Message-Id: <20190110175150.5239-6-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190110175150.5239-1-dave.long@linaro.org> References: <20190110175150.5239-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);