Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1793370iof; Tue, 7 Jun 2022 11:27:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8ha1nSfM2QGYrX43kUWtqE5dc3cPH0TV6Hmu9urjUS3jiXKqh7yJNFexOlC+q/cN9xD9R X-Received: by 2002:a05:6402:a4f:b0:42d:db40:f685 with SMTP id bt15-20020a0564020a4f00b0042ddb40f685mr35019458edb.384.1654625995627; Tue, 07 Jun 2022 11:19:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654625995; cv=none; d=google.com; s=arc-20160816; b=pzdn/DTPXPn38WVlapAQFiuhNwBK993IPBUFPQD6YeVwYkm/iXzTAKdFtezc0TRx95 gcPdq/bO8lunsGGNUx8PAXa5e9tOt587kZrwWUWlbHNVbpD6/i30u33vff31i272w/mv wytiVGzRcIv1Mh/a9m3GUVW/GhNvrGtpRR9U4fPzDM1vg5Ixt6SWSsHPZnUcB49f1/LW mpe7UaE/B3VpaEfRoIpRKzgU8faQZDeLkLnqtfMm4yyXDUmKwOKmewvqazwGX/gji3aU jEcbYl04pWN5LT4ggA5fr9GaTYXJn4jkXlWZ1uURrLe8v1qlouLveGRy5U/HZnzoLghv 4ujQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=KveuBdGtFJ9vmpEfG9GqwQPGCYjA8kI0FyjUNOuLN+o=; b=PTr+09WlJpAzb3inQh7+2DYiyXE1Ibs6jYBNnxtQ0ida1gFPb4DW7sFlEz75joM2oI AaPONFWg4s1axYLothlyg2g2EvcvCEGBp3um9cNHGYPamHNK1V5MxA2rx6nz3ydVj3j+ DdPgtc65tlN+aCIWAQE1V4ACwgsBPjYJE8J557COz85hg2+TPb55NTwp7FyLowRZXFFr 3o2a4v38ajZolwbt1rqr7KgZwowSVRqiOzhtBhh++Xi7Ya1MKsQA7zaaUEGs8uVcckmb EVRuS5pHR53dqKGk3V01dh5KQwStyd3zqs7nAbSDqwkNlSbI5udHB7V2clF5bawt3NCA 4OLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Gcmei67X; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e23-20020a170906081700b006fefd7ae106si17323049ejd.360.2022.06.07.11.19.29; Tue, 07 Jun 2022 11:19:55 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=Gcmei67X; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242838AbiFGLVA (ORCPT + 99 others); Tue, 7 Jun 2022 07:21:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243160AbiFGLUQ (ORCPT ); Tue, 7 Jun 2022 07:20:16 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2E56F6D393 for ; Tue, 7 Jun 2022 04:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654600720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KveuBdGtFJ9vmpEfG9GqwQPGCYjA8kI0FyjUNOuLN+o=; b=Gcmei67XKfnfLK30/0BGET0qJqZ3/yKNNJMTRg5AhG90u3vz8Tqv6Iv9F3JOSjhof3MQQR dGGajz8h7VqYeIyLMsSm8EiDwoNyuHWyH5zeVnvHgkt3k5Hz8WMqChNRZytIOQTF/Y2x++ /VBdbjyaHpKCNz042K5dx/I+RY92/6Y= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-307-1yld1TuAObWyZUZPieyhYQ-1; Tue, 07 Jun 2022 07:18:39 -0400 X-MC-Unique: 1yld1TuAObWyZUZPieyhYQ-1 Received: by mail-qt1-f197.google.com with SMTP id f22-20020ac859d6000000b00304bf4dba7fso13687740qtf.3 for ; Tue, 07 Jun 2022 04:18:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=KveuBdGtFJ9vmpEfG9GqwQPGCYjA8kI0FyjUNOuLN+o=; b=fbY5sMpD096OjeG0ruTre3vh6jkwJBywfsltWDK10OQnLiA/+UGBuYRMKansQjot5j /MMxNv6lf+MMdFyUN9zCoH4IUicrz8MbWVvnMbb7Lmp8mlc2mSG2rtgZIVh8vr8CvL8k FPqWDRPv8bKo2BJzbeoEKrpOBqaLohij8JhfBXfjHrEgJCZnW3XP085oWQ1ZXGkCVoW3 LqoYNeGnkf3lBrn1c2lST8Yk2ZtNsbh8wDh9MWw8hot57wOdBV8aOc5XUePDwNzM3FyR 7RqEuEH4X5/S4DanYstbZBs5GNcloKA0tDEc/AZUED3HyNG2BiCH4JHxRnwT49+Qwg6G okxA== X-Gm-Message-State: AOAM532DhgosIQ2nre1to7rRs2DjpilkbhvQllEnvmS+ujo2jDFYPPbq tHIIgh0j7OPYI7yVzLiHRxU9S9G3aUHOGMk06yekl28mH3SPDjRwV+Ras1Uda0i5vNmwBn8MUS7 51H5WpPMAg3X2Cjp7wKnT3Ytc X-Received: by 2002:ac8:5989:0:b0:304:fcb8:f3c1 with SMTP id e9-20020ac85989000000b00304fcb8f3c1mr853574qte.520.1654600718461; Tue, 07 Jun 2022 04:18:38 -0700 (PDT) X-Received: by 2002:ac8:5989:0:b0:304:fcb8:f3c1 with SMTP id e9-20020ac85989000000b00304fcb8f3c1mr853553qte.520.1654600718172; Tue, 07 Jun 2022 04:18:38 -0700 (PDT) Received: from gerbillo.redhat.com (146-241-112-184.dyn.eolo.it. [146.241.112.184]) by smtp.gmail.com with ESMTPSA id z12-20020ac8454c000000b00304ee715045sm2969857qtn.15.2022.06.07.04.18.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 04:18:37 -0700 (PDT) Message-ID: <52e02030f7b2c0052472f127dae91fb9f5312b85.camel@redhat.com> Subject: Re: [PATCH 2/3] net: xfrm: unexport __init-annotated xfrm4_protocol_init() From: Paolo Abeni To: Steffen Klassert Cc: Eric Dumazet , Stephen Rothwell , David Ahern , Herbert Xu , Hideaki YOSHIFUJI , linux-kernel@vger.kernel.org, Masahiro Yamada , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Date: Tue, 07 Jun 2022 13:18:32 +0200 In-Reply-To: <20220606045355.4160711-3-masahiroy@kernel.org> References: <20220606045355.4160711-1-masahiroy@kernel.org> <20220606045355.4160711-3-masahiroy@kernel.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,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 On Mon, 2022-06-06 at 13:53 +0900, Masahiro Yamada wrote: > EXPORT_SYMBOL and __init is a bad combination because the .init.text > section is freed up after the initialization. Hence, modules cannot > use symbols annotated __init. The access to a freed symbol may end up > with kernel panic. > > modpost used to detect it, but it has been broken for a decade. > > Recently, I fixed modpost so it started to warn it again, then this > showed up in linux-next builds. > > There are two ways to fix it: > > - Remove __init > - Remove EXPORT_SYMBOL > > I chose the latter for this case because the only in-tree call-site, > net/ipv4/xfrm4_policy.c is never compiled as modular. > (CONFIG_XFRM is boolean) > > Fixes: 2f32b51b609f ("xfrm: Introduce xfrm_input_afinfo to access the the callbacks properly") > Reported-by: Stephen Rothwell > Signed-off-by: Masahiro Yamada @Steffen: are you ok if we take this one in the -net tree directly? Otherwise a repost would probably be the better option, with this patch stand-alone targeting the ipsec tree and the other 2 targeting -net. Thanks! Paolo