Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1014944pxb; Thu, 9 Sep 2021 18:03:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxybPXsFxn6LL8r1NRP+R6O1h5osI7ddKEopz5HHvXjG8qKHVIVeEr0CJf7sdaFj5oQXjvb X-Received: by 2002:a17:906:919:: with SMTP id i25mr6333312ejd.171.1631235791671; Thu, 09 Sep 2021 18:03:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631235791; cv=none; d=google.com; s=arc-20160816; b=O9LDR0/o/XQ5FI8VSI+QSe7R9r3wcroUx/MLJTJ87qJYhnLvSnHVIvSb0ZE3/YRbsc HeMDYIS/eIiW0lVId187A1dZNFCw2rzilLXl1mQMgJe3zdaXimCaPW9SpLgOHqwOwOCK Jvxnf0t0UK6Y3FufCDQB7gkvL37fxEzfg6HumwNjRlX4bYrAUu2IkJXzoH0Xb17ffk4T j43Q+DT9EeJQCQo/GA/0tYunhgJfo/HUs6a9PJGZhndPfZ0QrW5I/9Bv1FTyE2V6UTKc S5D/goT62Z+dUca1ogL3v7DyWL9EAP6H2hhVKA1ydhTt5sGscYCBOyZYO08JplAwX4eZ 9KMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PhU2tCmpxlOhKl2V8N+O40CClbT2niNHQw1aMlqF6r4=; b=uaiSNgRCEikibcueAHBO3Obj1FF8rOd3bceRdaSci06y0bzIn8cOlSWA3n9UDxIvUw hT1wzo5t23lWmkP7CFZ2G5QjaK8/55SQ7VqP1HCHgP9LvQ2H0Pv9zSnCXZTdgU5YUvKM fW3hzo1FL5zu8W3hpVIEnGjo50ettU4nHEKjWNnM4ayRu/n7V8McSrl7/92FT/5cEO/E D/BRbSNI9tzfFk3ECUD3hCZCLkHTe6rIUGIoRehiftDp1dwZlZf6we8ie9PWpC1dC4VM kAiX+VNj0l6kGKdQhFmq7MzG11u2RlCDscbQ1cgmbdNEQw0xjofMUn0T32qKkgyURr6D WaWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SCYgUfBg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z1si3537348edl.531.2021.09.09.18.02.47; Thu, 09 Sep 2021 18:03:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SCYgUfBg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229990AbhIJBAc (ORCPT + 99 others); Thu, 9 Sep 2021 21:00:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:48874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234471AbhIJAXZ (ORCPT ); Thu, 9 Sep 2021 20:23:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A52F9604DC; Fri, 10 Sep 2021 00:22:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233335; bh=5YvZWveQ6Oj/8E1VVd4liEW6mT2eF2JhmKfCHIictos=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SCYgUfBg4ZOuwE9IsQJZCs3x0z3LOhcqQcZu96KdQmKOOndk5hgxCTidBXDTOR7pM kODu3CXVvKU9QKfktD0lDvIVr6w1/PT2GgsacGskdz1HnApaKmZe5ODCF7n+/SDcn0 XCeCNCBOH9d72N16/fPR3n8HtyBsG4+fa2pASmIhfd3eAZ4J0XTcFoqkfXa6cidHPo roAPaaKZv5rJTQKaI7O8sc2SySGcXfHTiwrVHUphGSI33SBjMziYl9eaFVFyaom1am XYDDUByorMO+SOoFw/PFUQ8c9MIxj51cG2jarJopZ4ymLln0WeOH2kdhmC4I9sma3O 1X8QcvZVs2DJg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christophe Leroy , Michael Ellerman , Sasha Levin , linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 5.4 24/37] powerpc/32: indirect function call use bctrl rather than blrl in ret_from_kernel_thread Date: Thu, 9 Sep 2021 20:21:29 -0400 Message-Id: <20210910002143.175731-24-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002143.175731-1-sashal@kernel.org> References: <20210910002143.175731-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe Leroy [ Upstream commit 113ec9ccc8049c3772f0eab46b62c5d6654c09f7 ] Copied from commit 89bbe4c798bc ("powerpc/64: indirect function call use bctrl rather than blrl in ret_from_kernel_thread") blrl is not recommended to use as an indirect function call, as it may corrupt the link stack predictor. This is not a performance critical path but this should be fixed for consistency. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/91b1d242525307ceceec7ef6e832bfbacdd4501b.1629436472.git.christophe.leroy@csgroup.eu Signed-off-by: Sasha Levin --- arch/powerpc/kernel/entry_32.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index c72894ff9d61..09ef46e5690b 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S @@ -485,10 +485,10 @@ ret_from_fork: ret_from_kernel_thread: REST_NVGPRS(r1) bl schedule_tail - mtlr r14 + mtctr r14 mr r3,r15 PPC440EP_ERR42 - blrl + bctrl li r3,0 b ret_from_syscall -- 2.30.2