Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp596369pxb; Thu, 17 Feb 2022 10:24:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmXOLVnV7PM1R4rs37NWxf8+2hJFDXuScJcTiMV+QZbFPo6s8sb2JqPdgqJmD1yx4dW+0t X-Received: by 2002:a05:6a00:16d6:b0:4e0:ed6a:cf82 with SMTP id l22-20020a056a0016d600b004e0ed6acf82mr4024838pfc.9.1645122276136; Thu, 17 Feb 2022 10:24:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645122276; cv=none; d=google.com; s=arc-20160816; b=w9NR2OX7yIwKF35faZXWsBKfPK5dxKlYH2AJS4Z5bxu6Ot41INXk579F2Et+VrP/ag SqftsvdFC/roPdbs3OHHbMRPM7gKP6+1R7NDy5K6Mmt+cIg+m4b9MLGgoQ8+tZiRWfJZ IkVrYsKsDE/Voymevg72+Y0rmT188hpaBGptmdUpPeH3kc7K7lbouWbrLh4oGLHEWFrm flMeivWfnajnSGwAWmz9XTqCVvaOgGsf/ICBgVipRk3qeNWTonMYvh7jkvuPgZq5TefR dFO732EIDBMX/kDVOS3NQmnuKIzFAuB1uJlMrAJtJdkKdfaADDawifqRBr1z9EhBZGxf aYMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature:dkim-signature; bh=LKo/E9dyb7NvEEgMEIwh2cqUg6haJPksCBJCLqhDMjU=; b=tuzyvBYvgVT/Bx1u+0JPqk1nHNNs/MoR6eOgq4bo9xUFrKyusi2yD0GOSGlLaGtjNa QhF3l7/8EYos2OdfkowrcAZinJdegFCxo+o1Twu5hOMUTIcFRsyvwDnTP446YZBYgvls 2i3UbsbXApnEBrRZCCTW5ZPCq7r7XSNwLap/giZinXY0GLaMm7BYP/mpBNOfQXQ8sf9Y VMtbri3+6kkWzP73FOQ1RKDbMe9fhX8gXQbdapiSsQqvz8B4FCI5PiakPOS5Xb0fzpAH JiFOgKtilgWRnnrezaFC9bPd4OTRCpWOLasOjm2ker29yYH0sH18qjAgdwEYlPSYNlKE b3WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="ouf+0/gM"; dkim=neutral (no key) header.i=@suse.cz header.b=AZY+n4sY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7si19628034plt.171.2022.02.17.10.24.19; Thu, 17 Feb 2022 10:24:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="ouf+0/gM"; dkim=neutral (no key) header.i=@suse.cz header.b=AZY+n4sY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237504AbiBQPvj (ORCPT + 99 others); Thu, 17 Feb 2022 10:51:39 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:41044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242620AbiBQPvg (ORCPT ); Thu, 17 Feb 2022 10:51:36 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4DE52B31BE; Thu, 17 Feb 2022 07:51:06 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id EF95C210E3; Thu, 17 Feb 2022 15:51:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1645113064; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LKo/E9dyb7NvEEgMEIwh2cqUg6haJPksCBJCLqhDMjU=; b=ouf+0/gMjnsv+G2TpNUu6NnOIcZYJuLjYA0H9ZFhuPjY66j1QWkTaRJpH5G1keqmO+9fzO E9lzwz4lAHn5f5DGNHBMW/lQX1jO0VLkkfd0NBhvPktDEyxkEh0HplQrqhVqfPb53gANvY qpZ47QsnmDeclIGjIetSU3j6z+Io2Jk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1645113064; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LKo/E9dyb7NvEEgMEIwh2cqUg6haJPksCBJCLqhDMjU=; b=AZY+n4sYyu3MEaw+aR/zNxThVPo665c7de5umURlu3dqC622zsI1ArRdJL+PJQ17Ii+LET nOY6/dyN1LebGwDA== Received: from pobox.suse.cz (pobox.suse.cz [10.100.2.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 82D05A3B84; Thu, 17 Feb 2022 15:51:04 +0000 (UTC) Date: Thu, 17 Feb 2022 16:51:04 +0100 (CET) From: Miroslav Benes To: Aaron Tomlin cc: Christophe Leroy , "mcgrof@kernel.org" , "cl@linux.com" , "pmladek@suse.com" , "akpm@linux-foundation.org" , "jeyu@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-modules@vger.kernel.org" , "live-patching@vger.kernel.org" , "atomlin@atomlin.com" , "ghalat@redhat.com" , "allen.lkml@gmail.com" , "void@manifault.com" , "joe@perches.com" , "msuchanek@suse.de" , "oleksandr@natalenko.name" Subject: Re: [PATCH v5 13/13] module: Move version support into a separate file In-Reply-To: Message-ID: References: <20220209171118.3269581-1-atomlin@redhat.com> <20220209171118.3269581-3-atomlin@redhat.com> <14a1678f-0c56-1237-c5c7-4ca1bac4b42a@csgroup.eu> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > +struct symsearch { > > > + const struct kernel_symbol *start, *stop; > > > + const s32 *crcs; > > > + enum mod_license { > > > + NOT_GPL_ONLY, > > > + GPL_ONLY, > > > + } license; > > > +}; > > > > Why don't leave this in main.c ? > > Yes, struct 'symsearch' is not used outside of kernel/module/main.c. It is not, but "struct find_symbol_arg", which you moved, uses "enum mod_license" defined above, so you can either leave it as it is, or carve "enum mod_license" definition out. Miroslav