Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3477980yba; Tue, 16 Apr 2019 12:10:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZ5AtHCM0FMaiKdC/07F7YuhT3cZf6QmKYUTA/93kxVuCcCQbtdwdETtbjlSXB4uu1FqCy X-Received: by 2002:a62:6f47:: with SMTP id k68mr68107857pfc.196.1555441810451; Tue, 16 Apr 2019 12:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555441810; cv=none; d=google.com; s=arc-20160816; b=H0Vy3cfHK8szoGNoVwbthM3LRbD0NIozBjbi1RriagtnOrttaTEutjvYIN8iNsR1Pg pMfITjMCxt9gx9yOaDsRC5YCuUbIbksylyYgDJdYlcSKh5hFcO7l/pjfYshRrKVBNL2C J/NcScKJjncSG9vMnnVk+TN9CMxdCs9xJ32s/LNF3klC4FF+HaCSWRWAmfF7830ZJkcA 02iVLxxGDg5PYPuWzEqGt77OvMCKcSHBUpa2qq78dY3xTKOGiAH04tmcbKYL94d8SLpe 4N9sz9gv7dqznGLfN6SDUSKXEJ3p4OUH7/ccdJJh4MUEA6emLF58WUwTpj9TTAYLTmcP 7CkA== 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; bh=RfRWWgVcJ7rwT+Vouyp2IaYBRc+wrd0u6p3oTLv0rcY=; b=nYuB2NLr1T/p/SGvB+vXeiu2Ndi8YUvZC3G8UeKkfM1CzUEnGRifQH69CADTRaxsrb kblFLcgr3zJIox7xQbzeloRkGbaZ7i4Gti8pqzqKK3kWUa/fouRMsG5r9T72cBqtfGCi 9inzGibqD//vV+zpTsyLX69LK+J4hseLXDe5oi8pB69FuH6jtWPBz6DEc1EsjtLuXigS LvNtMkqsD/BVGwSBqVTmDnYyE64VTIJH/djDfBDNDKH1JY9TENnLoanE/Jm8X4x0Ea68 jKjsDM9esFFtihFplr6SIy3WV+VsAwZn4cQzHz7IXAey13IzPni0WiekVZJp5fMfclq5 m6UQ== ARC-Authentication-Results: i=1; mx.google.com; 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 92si39462558plw.138.2019.04.16.12.09.53; Tue, 16 Apr 2019 12:10:10 -0700 (PDT) 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; 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 S1729370AbfDPTJS (ORCPT + 99 others); Tue, 16 Apr 2019 15:09:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:33002 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727136AbfDPTJR (ORCPT ); Tue, 16 Apr 2019 15:09:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 34599AF9A; Tue, 16 Apr 2019 19:09:16 +0000 (UTC) Date: Tue, 16 Apr 2019 21:09:15 +0200 (CEST) From: Miroslav Benes To: Joe Lawrence cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, linux-kbuild@vger.kernel.org, Jessica Yu , Jiri Kosina , Joao Moreira , Josh Poimboeuf , Konstantin Khlebnikov , Masahiro Yamada , Michael Matz , Nicolai Stange , Petr Mladek Subject: Re: [PATCH v3 0/9] klp-convert livepatch build tooling In-Reply-To: <452e0cc5-ea9b-1638-3557-17e12671e21e@redhat.com> Message-ID: References: <20190410155058.9437-1-joe.lawrence@redhat.com> <452e0cc5-ea9b-1638-3557-17e12671e21e@redhat.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 Tue, 16 Apr 2019, Joe Lawrence wrote: > On 4/10/19 11:50 AM, Joe Lawrence wrote: > > Hi folks, > > > > This is the third installment of the klp-convert tool for generating and > > processing livepatch symbols for livepatch module builds. For those > > following along at home, archive links to previous versions: > > > > RFC: > > https://lore.kernel.org/lkml/cover.1477578530.git.jpoimboe@redhat.com/ > > v2: > > https://lore.kernel.org/lkml/f52d29f7-7d1b-ad3d-050b-a9fa8878faf2@redhat.com/ > > > > (Note that I don't see v2 archived at lore, but that is a link to the > > most recent subthread that lore did catch.) > > > > > > Livepatches may use symbols which are not contained in its own scope, > > and, because of that, may end up compiled with relocations that will > > only be resolved during module load. Yet, when the referenced symbols are > > not exported, solving this relocation requires information on the object > > that holds the symbol (either vmlinux or modules) and its position inside > > the object, as an object may contain multiple symbols with the same name. > > Providing such information must be done accordingly to what is specified > > in Documentation/livepatch/module-elf-format.txt. > > Hi Miroslav, > > I noticed that some binutils programs like gdb, objdump, etc. don't like the > .ko kernel objects that we're generating from this patchset, specifically > those with the additional '.klp.rela...text' livepatch symbol relocation > sections. > > For reference, I opened a new bugzilla with more details here: > https://sourceware.org/bugzilla/show_bug.cgi?id=24456 Another great catch. > And was about to ping the binutils mailing list about the assertion that is > tripping in bfd/elf.c. The thought occurred to me that you guys might already > be carrying a patch to workaround this issue? No, unfortunately we don't. At least I don't know about anything and a quick test on openSUSE Leap 15.0 confirms it (objdump -D gives "bad value"). Thanks Miroslav