Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2306294imj; Mon, 18 Feb 2019 03:48:53 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia9mrF6lO7uCyPK6jUTb6UTgeO4VhAsmTumsX715f22JMrP9aKD/1hQvY9PU1ts/MUz842W X-Received: by 2002:a62:bd17:: with SMTP id a23mr23496310pff.233.1550490533775; Mon, 18 Feb 2019 03:48:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550490533; cv=none; d=google.com; s=arc-20160816; b=OH+xiJ7oQ3bJOoeYEjuCcCNnzN/k5N1hv9SVi3gD+5gdLXJSOEBeiBwpeWpswYhURd GETfAopjekXiFq//x0wVuKFlO1EgURq4qagTa7z+xVzUb8xVQfeIcqhz/CgBpj4qUas6 y8imtjs90W13/oEkZJF5wVW6zgu3v5FPGMJs+1BQCOSp2QvFJ2LgfGusSDzKfXg2PXnL EDN+ZqguYqtOGwvd4FWcyXbFp+FCGDILAjf2sNwdxdV7/P57p1F64piPsyLoaNSf8qbb O64rzK29I2oRkAKYR0mIKOUlGedU9U9gsa7EA4lo0eo5UlHqU+nsQf2m3x+/3QI/vGva AW8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XI4RVhpltTTNVh2o4KR0ccCJ5Oy6wVYZxiO4wEmvvDk=; b=NIzO80Rcg0g4Cvi6AEmkKsSch3Xj/1qi1EgF3TeXh6/V1f9Wk+eRAJPf/Fok/CjL4S kzmVO3R6O+pvNLEK2zZMUGCwnNNNxmI0TtYJtIS/nzqonk2BHGWy9gae/WiQoiqBl4Gp BrnuOZkYfBds6rsI02QyUyl3tfmck385CptDBcognDnP4x0Aam1jcsgiRHNhsSOFutyj LGfV4kq4Y6prf6UFQMB/Pdi6qFiQiHsCWxMjSRr5QDlIHy8f27Ckxt+L5lLabGpUMP/h Du7LRlMzFTxf2SLvL4Y+OnN3PqnPKRdvLNOlzrD/yrzUUswk72ea8Z0K4c2l0fJnuN0A AOHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="r1g/HLYJ"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s80si12477396pgs.165.2019.02.18.03.48.36; Mon, 18 Feb 2019 03:48:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@kernel.org header.s=default header.b="r1g/HLYJ"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729485AbfBRLrw (ORCPT + 99 others); Mon, 18 Feb 2019 06:47:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:43786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727084AbfBRLrw (ORCPT ); Mon, 18 Feb 2019 06:47:52 -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 1582C2177E; Mon, 18 Feb 2019 11:47:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550490471; bh=UsS22V1FrbDB0hLJXgK6+COBj+ujyQWrJOu5+Qz48bU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r1g/HLYJs86Qz4BG2r+qTdgZIgobaBEe1eWfXeWN5mlTDrqsNn+JySipPkjJd+2Sw ay1SX1eA68BR87PCFgpwADgA6ee7d+ryMLHBgW9YSyrYBkW0exQYvJyKEjNE8ZBox/ cvg/PAVFyvT37ynqfGkIFnWWZ0eo7cke3Vm0z/eo= Date: Mon, 18 Feb 2019 12:47:49 +0100 From: "gregkh@linuxfoundation.org" To: "chenzefeng (A)" Cc: "hjl.tools@gmail.com" , "jpoimboe@redhat.com" , "sjenning@redhat.com" , "jikos@kernel.org" , "vojtech@suse.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "x86@kernel.org" , "live-patching@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "chengjian (D)" Subject: Re: [PATCH] x86: livepatch: Treat R_X86_64_PLT32 as R_X86_64_PC32 Message-ID: <20190218114749.GA602@kroah.com> References: <79A62BFA453EFB42B7A4E40AD8F3A2264F2A872D@DGGEMA503-MBX.china.huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79A62BFA453EFB42B7A4E40AD8F3A2264F2A872D@DGGEMA503-MBX.china.huawei.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 15, 2019 at 02:01:31AM +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. > > In linux 4.4 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 > > Signed-off-by: chenzefeng > --- > arch/x86/kernel/livepatch.c | 1 + > 1 file changed, 1 insertion(+) This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.