From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9536BC43381 for ; Thu, 21 Feb 2019 11:47:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5988D2148D for ; Thu, 21 Feb 2019 11:47:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550749665; bh=zWBEHhSaNqbfVDtaPjfKoynioYu96CenRXw9O7uFPLk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=uB5jAyIDXT6zd9+O2vNKqEPgEYv4iUsHMzkMdf3RKRtPyqkCyzn0m8+6YLy+cj6FB 0vgzLuj1ua6qXluqICOHt1DglWSBD7ZCzI+ZIE6BpU7NHAwyg6cAroTio4cBNhpuxz cj/15OdT3ouYfv3Jc1KaE89tDqWguoF/4+oHqiC4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725820AbfBULro (ORCPT ); Thu, 21 Feb 2019 06:47:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:58774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbfBULro (ORCPT ); Thu, 21 Feb 2019 06:47:44 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B78E920855; Thu, 21 Feb 2019 11:47:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550749664; bh=zWBEHhSaNqbfVDtaPjfKoynioYu96CenRXw9O7uFPLk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=US8ajjw4iPgQ5eeH/eyxVt5Yfb81oMjnleMc+tGVQ98LH9+CwOYvG5VSCcG0FM4a+ 0T9UtAGSJNgExFYmiwO2BWafEDM1qypI31R+zJpl6Z56QYXoq7fpjnE2SC2uaUh4+W 8U0afPTFSflJJAbSCsrNkt3AIJiaaICoijjb3Ihg= Date: Thu, 21 Feb 2019 12:47:39 +0100 From: "gregkh@linuxfoundation.org" To: "chenzefeng (A)" Cc: "stable@vger.kernel.org" , Petr Mladek , Jiri Kosina , "hjl.tools@gmail.com" , "chengjian (D)" Subject: Re: [PATCH] x86: livepatch: Treat R_X86_64_PLT32 as R_X86_64_PC32 Message-ID: <20190221114739.GF10737@kroah.com> References: <79A62BFA453EFB42B7A4E40AD8F3A2264F2AB257@DGGEMA503-MBX.china.huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79A62BFA453EFB42B7A4E40AD8F3A2264F2AB257@DGGEMA503-MBX.china.huawei.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, Feb 20, 2019 at 12:37:54PM +0000, chenzefeng (A) wrote: > On x86-64, for 32-bit PC-relacive branches, we can generate PLT32 relocation, instead of PC32 relocation. and R_X86_64_PLT32 can be treated the same as R_X86_64_PC32 since linux kernel doesn't use PLT. > > commit b21ebf2fb4cd ("x86: Treat R_X86_64_PLT32 as R_X86_64_PC32") been fixed for the module loading, but not fixed for livepatch relocation, which will fail to load livepatch with the error message as follow: > relocation failed for symbol at > > This issue only effacted the kernel version from 4.0 to 4.6, becauce the function klp_write_module_reloc is introduced by: > commit b700e7f03df5 ("livepatch: kernel: add support for live patching") and deleted by: commit 425595a7fc20 > ("livepatch: reuse module loader code to write relocations") > > Signed-off-by: chenzefeng > Reviewed-by: Petr Mladek > --- > arch/x86/kernel/livepatch.c | 1 + > 1 file changed, 1 insertion(+) Now queued up, thanks. Also, next time please wrap your changelog text at 72 columns :) greg k-h