Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp826713imj; Fri, 15 Feb 2019 07:27:11 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibx4shYp5K/VBtKbjGHfU1NBdk6VESPkFfq8pRHNZbR0Jpk+wZ1XjAOKCqiUMoipneUUdKV X-Received: by 2002:a17:902:2a69:: with SMTP id i96mr10726929plb.58.1550244431590; Fri, 15 Feb 2019 07:27:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550244431; cv=none; d=google.com; s=arc-20160816; b=US8o15Cn9g/jAjv1egg3Ic3soYwaMvihNY6wK0AQovyCE7D4ebBjfOmJ30yu6d/8cg xPqycZ9/lsDHZzPKNckSnE43r96A/fZFsPrjTV/cRN4N26aA1zO9VSispzK7uwNkzyLP MsdHuleZOrVvR0ZbartLw7CkkIOb28h0/XvubLFx4+f4+J5+aLIy94AQYZ1qFPPv1EpI wcQ8Bb5pmgjVSynNur2y6NA4Nc2ONc7PwkQxcIHZHCkhMxTIpK0+FlXY6YDnTmqwwqWn k5GkucMotU02JqKjrLbyyo1QBgilMyJkYIXRDlOddLlJUPLNASqCSt7sZ10yIfNpcaeB XGAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=a1Wv6mCT8aV7uVjgy5M4oET7zYnGly/6JSGb1fbbqa8=; b=Ngr1dPbjgk2tOBgLO1UaKYBIA1m4yVKLHkxmpgAgOzG+R+xjP/M36B6hTCfXTokjEs DMixy5Qk7g7c+sTnRdvKdkNfoYLCVIKRZEubj1LkTJvLt+YTVZAfICCjgqDwVM51+Kky GlCRlcjLcl9S7eREGU6T3fFMtxZnrJpbrP4rxzx5Vr/Cv7Y2/ty3n8OEZ4v8lx6CF4o9 jBYArpgzsXKulr2w6KcA8iJXpo/ofmykQA+0hI+hDwAfOacxiLjS1ab1Bu5fREmjAsO+ xfbVGdbz/0FEVrsiiCRD6KhxO/EL+XW+f0WA4Hq3J9efhSAO6GGYP1KU20PLzABu61BS DCdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aRozOm1Y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d189si5244042pgc.393.2019.02.15.07.26.55; Fri, 15 Feb 2019 07:27:11 -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=aRozOm1Y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389754AbfBOH2X (ORCPT + 99 others); Fri, 15 Feb 2019 02:28:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:44208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727993AbfBOH2W (ORCPT ); Fri, 15 Feb 2019 02:28:22 -0500 Received: from pobox.suse.cz (prg-ext-pat.suse.com [213.151.95.130]) (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 A212F21920; Fri, 15 Feb 2019 07:28:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550215697; bh=O/XorrlCP+6osysvASAW6imQn/0HY9d7EdOL356+5WM=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=aRozOm1Y5k5CIXOPsdCpEuVk6Kg8JR9ffGqt6YJz8YL+LtUFRNo514dqEOEuSQjkH WZLcMa2pKgcvgRSUNtT3xBwoNUOj4vQRRGZWRy50lvaJ9WyYfw/gI3O898LVxRD3w9 Bs3LPLonlDARkhBuvVmsvwwO3VZq3T9HggZqBIIg= Date: Fri, 15 Feb 2019 08:28:03 +0100 (CET) From: Jiri Kosina To: "chenzefeng (A)" cc: "hjl.tools@gmail.com" , "jpoimboe@redhat.com" , "sjenning@redhat.com" , "vojtech@suse.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "gregkh@linuxfoundation.org" , "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 In-Reply-To: <79A62BFA453EFB42B7A4E40AD8F3A2264F2A872D@DGGEMA503-MBX.china.huawei.com> Message-ID: References: <79A62BFA453EFB42B7A4E40AD8F3A2264F2A872D@DGGEMA503-MBX.china.huawei.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 Feb 2019, 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 address> > > Signed-off-by: chenzefeng What kernel version is this patch based on? We've got rid of x86-specific module loading stub and offloaded all the relocation handling to generic kmod loader long time ago. -- Jiri Kosina SUSE Labs