From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756227AbdHYLe2 (ORCPT ); Fri, 25 Aug 2017 07:34:28 -0400 Received: from mx2.suse.de ([195.135.220.15]:47162 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754691AbdHYLe1 (ORCPT ); Fri, 25 Aug 2017 07:34:27 -0400 Date: Fri, 25 Aug 2017 13:34:25 +0200 From: Petr Mladek To: Jason Baron Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, jpoimboe@redhat.com, jeyu@kernel.org, jikos@kernel.org, mbenes@suse.cz Subject: Re: [PATCH 1/3] livepatch: Add klp_object and klp_func iterators Message-ID: <20170825113425.GH30286@pathway.suse.cz> References: <93efd1d05081843c97ae090333873784f214f17d.1500482335.git.jbaron@akamai.com> <20170824142541.GF30286@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2017-08-24 11:39:08, Jason Baron wrote: > On 08/24/2017 10:25 AM, Petr Mladek wrote: > > On Wed 2017-07-19 13:18:05, Jason Baron wrote: > >> +/** > >> * struct klp_object - kernel object structure for live patching > >> * @name: module name (or NULL for vmlinux) > >> * @funcs: function entries for functions to be patched in the object > >> * @kobj: kobject for sysfs resources > >> + * @func_list: head of list for struct klp_func_no_op > >> + * @obj_entry: used to link struct klp_object to struct klp_patch > > > > I would prefer to make the difference between the static > > and dynamic stuff more obvious. The generic names for both > > variants are confusing. > > > > I would personally use "no_op" in the names of list_heads related > > to the no_op stuff. But then it would make more sense to add this > > in the next patch. > > > > Well, I do not have strong opinion about it. > > > > I think I avoided 'no_op' in the naming because I thought it maybe could > be a more generic list, but in practice I'm only using it for the > dynamic noops, so I like explicitly calling it the no_ops list to make > its usage clear. I also think it can still live in 1/2 with the 'no_op' > name, but if that's not ok, I could just rename it in 2/2. You could do only the needed preparation steps for the more complicated iterator in this patch. It might still handle only the static arrays. Then it might be extended in the 2nd patch together with adding the extra lists. Best Regards, Petr