Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2318854pxb; Mon, 20 Sep 2021 18:41:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze7V2QViecSOHjyt7MLkwWu1rvT/IpCe2TGhZ5jU4aRTGQdeiz1k27X6npuzzYCTBWPWeU X-Received: by 2002:a05:6638:f12:: with SMTP id h18mr12827325jas.107.1632188484739; Mon, 20 Sep 2021 18:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188484; cv=none; d=google.com; s=arc-20160816; b=VvQlXDwT7I2AY56yVAS+qfkrfCX6WXC2iAiaHvyrODgO0MzK9mx7sONIJvsldYke3b gZIixtaQMA8gBKsT/EoiqBwrYAqE0LHW7/SHge290gxoyma4txoKgU/Vh/PsbnXVrQ1H ZrZg/oLDWc7ZngRnYeG3e7srMQTvc2a/bMoM4uNeHjLFNAIddG4iE6KLeCmbxrk6JlW1 zmoUrkFM4ggMdz7YzgoeTc8seAEKkXmxlyYXNTnTikUVlA5d1XaaCOhn5t/K4DzIAcm+ +HXzSOLwvKikHGd7QlGMoc0E0pNWhROZckdekw96PDDqkmyz7K0if++sh079f5VNa1/B uF+w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AuJeJ79be7zmoeyCUwsFnNbpoo91t7DS/nyDqMjz/ao=; b=Nz6QKFF+H5JnzDq1yJFNF8RDaaBe9iLs7jKIoD2KohMEEKu0ExQlLnQI9yt/0y7l/D k/zZTCoDukV2XKBY7O8shlzFGrwGiXu4+aulMbYSl7NO4heLwaPAlNa0oLbUEtLTDU7i zpAmn4YbNDx9zj9SaSqL/XCDGil/y9plX/Femz8I0JJiekzjW5lKzRQFOebj5x0p5EP6 SQ40kRfSWteKR1rlv5Vj1jb6rvcO0QVs0p4+6GIaHIU6P+WMOazXa9oKNFeYWMMxO/sB 06q7H2+bPBfvEM0aBfC9HGBTr7AhVMB2gf3zYv2bu3sDoeWds4kHqt3ww+cjgcLhsvfk 5Diw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Tfu3SR71; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h15si14922111ili.51.2021.09.20.18.41.12; Mon, 20 Sep 2021 18:41:24 -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=@linuxfoundation.org header.s=korg header.b=Tfu3SR71; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243954AbhITQsw (ORCPT + 99 others); Mon, 20 Sep 2021 12:48:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:36554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243629AbhITQsC (ORCPT ); Mon, 20 Sep 2021 12:48:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3A27960F6E; Mon, 20 Sep 2021 16:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156395; bh=QmEUPYvCs278HOHIsmLUGKG7TGSEj1b5a3hRAh4XEZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tfu3SR71oLojoVV/SBPXTXWsg7EDwSEpM3na3fm9Z5haz+CLW/0s/YqhAqDs27DKB AkMGucsLUExYaNp12Lx98oT8QLJ8gK3FXbbHz7va+GVz8Cf9hH8lDivBCbynwc4yP6 my4tR/ZzwV1BitAJqrZTwIgfa+LV4OMWCgBHTqFs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Ellerman Subject: [PATCH 4.4 022/133] powerpc/module64: Fix comment in R_PPC64_ENTRY handling Date: Mon, 20 Sep 2021 18:41:40 +0200 Message-Id: <20210920163913.337481283@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163912.603434365@linuxfoundation.org> References: <20210920163912.603434365@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Ellerman commit 2fb0a2c989837c976b68233496bbaefb47cd3d6f upstream. The comment here is wrong, the addi reads from r2 not r12. The code is correct, 0x38420000 = addi r2,r2,0. Fixes: a61674bdfc7c ("powerpc/module: Handle R_PPC64_ENTRY relocations") Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kernel/module_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/powerpc/kernel/module_64.c +++ b/arch/powerpc/kernel/module_64.c @@ -662,7 +662,7 @@ int apply_relocate_add(Elf64_Shdr *sechd /* * If found, replace it with: * addis r2, r12, (.TOC.-func)@ha - * addi r2, r12, (.TOC.-func)@l + * addi r2, r2, (.TOC.-func)@l */ ((uint32_t *)location)[0] = 0x3c4c0000 + PPC_HA(value); ((uint32_t *)location)[1] = 0x38420000 + PPC_LO(value);