Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3207627yba; Tue, 16 Apr 2019 06:56:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7X8O4L6szfs4OH0LggsacNqIsoAuevJPfDj6rlumNd6sZvosJ0cgs+6Ecvz79QrXV7vyC X-Received: by 2002:a17:902:599c:: with SMTP id p28mr19906035pli.70.1555422964414; Tue, 16 Apr 2019 06:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555422964; cv=none; d=google.com; s=arc-20160816; b=MyXbnJ3jJJX4qxi7BvcygDlejWjpYRNCxfkI1NuS4ugTC5acicjH13+HFJFes33Et2 tC43J93FbaZ5AMFvhTe7ij5UQyg9b/GzKSM+5GkrQI50foXa01zmJgwHk6gY0T1mgFd3 ZI5/TIrSJXZ0CLvYbiVsbe2aXKHDibdH44ZEF0qB7UHYGQEtSIV/pprJykecOgDrUa8s gTVicGkQbYSEUy19EK5RJBdsqlVVMXjKc/0fml/Yb7JnRl3xXEMSbecaUWb06pceTRW9 tWePNTICNXvHY/ZSAb5vSKjg6fy6WOxvKNKAl+pSZEJM466CObFYZzM30/HDvqnV848G 6f3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=GMLT+9wLV0stXU0dzKzCIUSMaJkf4oHLcsFm97czCxg=; b=bWtA0gnWCfc1nSz0BeyFI8jg+yTFD7neOPXYvB4yLbgyjwSxWcizh7wpqeYscNouaO fX3i3pk/LVAfVolib/QJ88qYbs9wq6zeO0ubsn/11sR3aKw0RizdnV4vPfaW3XHd1dpk 7QhIRfvucgJf3B15ASWCKqy1rYZgz0LZPmqsomUxRY09T5iwwrwa3wz56nwKfhV9NSMu 0rHPY9JvwLYuHdkT02x5Ti7kS/cRwljmWhYJ0IDCY6FtUPIgaSL1Kf68uYShwSJ8VAYM 1NVXxGw4yfPK2gIWXcCjTqZs0OaNt3PAe2aVl8kG1Sh5UI241SWRJ61s3fW5xLhs3if5 MVNQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a191si27774666pge.72.2019.04.16.06.55.48; Tue, 16 Apr 2019 06:56:04 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729450AbfDPNzH (ORCPT + 99 others); Tue, 16 Apr 2019 09:55:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27332 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbfDPNzF (ORCPT ); Tue, 16 Apr 2019 09:55:05 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CE41130B8FA8; Tue, 16 Apr 2019 13:55:04 +0000 (UTC) Received: from [10.18.17.208] (dhcp-17-208.bos.redhat.com [10.18.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 52DCD5C220; Tue, 16 Apr 2019 13:55:01 +0000 (UTC) Subject: Re: [PATCH v3 0/9] klp-convert livepatch build tooling To: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, linux-kbuild@vger.kernel.org Cc: Jessica Yu , Jiri Kosina , Joao Moreira , Josh Poimboeuf , Konstantin Khlebnikov , Masahiro Yamada , Michael Matz , Miroslav Benes , Nicolai Stange , Petr Mladek References: <20190410155058.9437-1-joe.lawrence@redhat.com> From: Joe Lawrence Message-ID: <452e0cc5-ea9b-1638-3557-17e12671e21e@redhat.com> Date: Tue, 16 Apr 2019 09:55:00 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190410155058.9437-1-joe.lawrence@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 16 Apr 2019 13:55:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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? -- Joe