Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753838AbbDMKhR (ORCPT ); Mon, 13 Apr 2015 06:37:17 -0400 Received: from blu004-omc4s1.hotmail.com ([65.55.111.140]:62588 "EHLO BLU004-OMC4S1.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753614AbbDMKhO (ORCPT ); Mon, 13 Apr 2015 06:37:14 -0400 X-TMN: [N7EEEp3l1HfrqdiUqS+B67Dm1oYmXfFe] X-Originating-Email: [minfei.huang@hotmail.com] Message-ID: Date: Mon, 13 Apr 2015 18:37:10 +0800 From: Minfei Huang To: Petr Mladek CC: jpoimboe@redhat.com, sjenning@redhat.com, jkosina@suse.cz, vojtech@suse.cz, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] livepatch: Add a new function to verify the address and name match for extra module References: <1428844554-4015-1-git-send-email-minfei.huang@hotmail.com> <20150413083725.GA16088@pathway.suse.cz> <20150413094121.GD16088@pathway.suse.cz> <20150413102240.GE16088@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20150413102240.GE16088@pathway.suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) X-OriginalArrivalTime: 13 Apr 2015 10:37:12.0642 (UTC) FILETIME=[CD4A3220:01D075D5] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3459 Lines: 83 On 04/13/15 at 12:22P, Petr Mladek wrote: > On Mon 2015-04-13 17:50:23, Minfei Huang wrote: > > On 04/13/15 at 11:41P, Petr Mladek wrote: > > > On Mon 2015-04-13 17:11:19, Minfei Huang wrote: > > > > On 04/13/15 at 10:37P, Petr Mladek wrote: > > > > > On Sun 2015-04-12 21:15:53, Minfei Huang wrote: > > > > > > In order to restrict the patch, we can verify the provided function > > > > > > address and name match. Now we have can only verify the vmlinux function > > > > > > name and address. > > > > > > > > > > > > Add a new function to verify extra module function name and address. The > > > > > > patch would not be patched, if the function name and address are not > > > > > > matched. > > > > > > > > > > old_addr could be predefined only for vmlinux. It does not make sense > > > > > to define it for modules because they are loaded dynamically, each > > > > > time on a different addresses. It means that it does not make sense > > > > > to verify addresses from modules. They always need to be detected. > > > > > > > > > > > > > Please correct me if there is something wrong for below comment. > > > > > > > > As commented in the doc that function address is optional, it is more > > > > confortable during patching the patch, if function name and address are > > > > provided. > > > > > > > > For now we only use function name to detect the module function. It is > > > > more accurate to detect the function using function name and address. > > > > > > I think that it is the other way. It is easier to create patch without > > > the addresses. It is enough for most patches. > > > > > > The function address is needed only if there are more functions of > > > the same name. There are only few in vmlinux. > > > > > > We currently does not allow to handle name conflicts inside a module. > > > But the chance is very small that there will be such a conflict. > > > Do you know about any module that could not be patched because > > > of this? > > > > > > > Yes, the function name exceeding to 128 is not happened, in general. > > But I donot think it is the reason that livepatch donot support this > > case. > > > > Patched these patches, we can still use function name to detect function > > for both vmlinux and extra module. > > > > It is poisonless that we support to verify both function name and > > address to detect function for extra module. > > Please, read my previous mails. We do not know old_addr for modules > at build time. Therefore we could solve this problem easily for > modules. > Sorry, Do not get your point correctly. For my patches, I think it is used by the persion which will compose the patch individually, not for the manufactor. Yes, Verifying extra function address is more useless in general, due to the changable address on different system. IMO, we shall do our best to make livepatch more robust. Thanks Minfei > I think that the whole problem is rather theoretical and it is not > worth spending time on it. > > Best Regards, > Petr > -- > To unsubscribe from this list: send the line "unsubscribe live-patching" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/