Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2386151rda; Wed, 25 Oct 2023 00:46:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGEN+tUfUrJFPJjUxCoVB7F+Lk2wVb1QsG/4IIOGbaldftta4Q3tUhDErlj/SsAOo/vdsP1 X-Received: by 2002:a25:5d1:0:b0:da0:2bb7:e060 with SMTP id 200-20020a2505d1000000b00da02bb7e060mr5105405ybf.65.1698220001281; Wed, 25 Oct 2023 00:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698220001; cv=none; d=google.com; s=arc-20160816; b=r8+60XlrMMazKEMFk2t/qRJG08//3IZtrkw55u4k0JAoCatbHn88Eeb2O7u4+WqnZn V4/TPWOX+qoHM/ChJodGQ3Y8d3AL/lp8qp70UHUZZdt3naZ1UNi/LBsUcAtL12CvclSP tb1DhiVdjLhxMw1JR+sQ8i+zJVNKH/5DAa6G5VqYj8bN15dpD7OUJ6MJlX0AURA8lF4t jzNjle3ggGeFtkp2VbEOegC3r2oYS2Hc3jlWVczEZMgr9FMpqy4iYyP1iZvtMghwQ4AA Z+s1TLj314rn6EflUswFq1tnp8HOj4Czufv+QzAxxiDL9YrJWPPVpX5f7/HemWdgKny0 OeIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=+x6vV1ems/OliHgjioHNx4h3hyDIQFdjm8xGfLTzqxE=; fh=hjGjMaQcCh5oKu17iFVoY5WmuuUfOAjXeAz1bacfg/E=; b=OwKGiCEmTUhc4uUewF+gz81WO9Ys6kJSAhBx4eZFl+g7EUHSrz5FI0NuU0tN8uEQNz omlVdS7JXsWwDq5X2Ri1sr0eub4pOccOydxkTKjYdKkbvFUOkyqCZ1RP5On2hztYblpb c9QdKWieqVZW2yBTwsYp1qKSCZR/n3X3nLtd3hcx1yjZXxnUEgjwPx38lU/i7gJwE93t FslJtD4cLOcy/9295S+7Pz4YCEfmWZ7vMoEwtstt18aLK+8NfWJttqMKCDK6v0wnx8LM Uly8bIr67PaDVi2qsXypQAn/Y2NWglQIO3gUfkqRk0acfcEmvo+5J9z33I5lbbFEE4Fa /AKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b="owLu4/tQ"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=IuTGYM4C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id l5-20020a25b305000000b00d7f92144c06si10670620ybj.66.2023.10.25.00.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 00:46:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b="owLu4/tQ"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=IuTGYM4C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E11A8801C099; Wed, 25 Oct 2023 00:46:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234476AbjJYHqS (ORCPT + 99 others); Wed, 25 Oct 2023 03:46:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233770AbjJYHps (ORCPT ); Wed, 25 Oct 2023 03:45:48 -0400 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D51222719 for ; Wed, 25 Oct 2023 00:36:46 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 67E89320095D; Wed, 25 Oct 2023 03:36:45 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Wed, 25 Oct 2023 03:36:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1698219404; x=1698305804; bh=+x 6vV1ems/OliHgjioHNx4h3hyDIQFdjm8xGfLTzqxE=; b=owLu4/tQp/Ntse9YM2 s4I4CjOJB7qCA8JSYsO8sZRuERSyXUhex3xHqByowCyzuQKf4brI3nS2I7+GWvlo sfgOlForMvqD1Qojr7i6NdNrYk9mE0qtZemxzE2qtRjpX3D6pB791Q9oaaZfUWep nAqccr4XNbV+0Ky0KgkDWPvohOQe6cF+0+aB2ajqECitlr2O3LHUgYicmH6DIAXL sMgsSJwBAaT1ab6+5YiuYhTvNkd4S0ANBlC4XL0pgHyIyF6Usu85HV6Y4VUvj9Ik nskBBap4Czs7wfdymPAItrlhU2CgQVArAJuSrca3QqdtlgWNpV56ci3HNWRaFtCc IG5w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1698219404; x=1698305804; bh=+x6vV1ems/Oli HgjioHNx4h3hyDIQFdjm8xGfLTzqxE=; b=IuTGYM4C9dL7RM2Zo4GYrQYEVHfBm lPQIbOSmbLGirxqENytGZ4mnZ/oMVTJbz4y6aCQ7IlcfdsSektrg+8xikUcGlX2v Hxkk6jkJbsE8oMTn8rGS1IZgfhj2KX2RmfJJvGpg1VDNtyzzEsX+lhFSidl+Nog5 7Oi8CKLucbje2TLDknyjLjzQUAOiE+axQK6bGaEngxO9oyuZdHQ2d9+a+vO7sULB q2NcnNvujjJ3r6tjW3Zx0wgSiW91+t5OJbJDmr+L+rDxeyiPPNJzazFzY/cxc+UO AgZn8uRpu9wAz99OYEjtbDD4eRsdV/RHLHZNCqjce1QTDYc4RacChlRXQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrkeelgdduvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 023D9B60089; Wed, 25 Oct 2023 03:36:44 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1048-g9229b632c5-fm-20231019.001-g9229b632 MIME-Version: 1.0 Message-Id: In-Reply-To: <60b7f4c3-c5e8-4fab-bf31-d576fff7a016@suse.de> References: <20231020205521.3577821-1-arnd@kernel.org> <60b7f4c3-c5e8-4fab-bf31-d576fff7a016@suse.de> Date: Wed, 25 Oct 2023 09:36:23 +0200 From: "Arnd Bergmann" To: "Hannes Reinecke" , "Arnd Bergmann" , "Keith Busch" , "Jens Axboe" , "Christoph Hellwig" , "Sagi Grimberg" , "Chaitanya Kulkarni" Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [v2] nvme: keyring: fix conditional compilation Content-Type: text/plain X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 25 Oct 2023 00:46:38 -0700 (PDT) On Wed, Oct 25, 2023, at 09:02, Hannes Reinecke wrote: > On 10/20/23 22:54, Arnd Bergmann wrote: oid) >> + >> +static inline key_serial_t nvme_target_keyring_id(void) >> { >> + if (IS_ENABLED(CONFIG_NVME_TARGET_TCP_TLS)) >> + return nvme_keyring_id(); >> + >> return 0; >> } >> -static inline int nvme_keyring_init(void) >> + >> +static inline int nvme_target_keyring_init(void) >> { >> + if (IS_ENABLED(CONFIG_NVME_TCP_TLS)) >> + return nvme_keyring_init(); >> + >> return 0; >> } >> -static inline void nvme_keyring_exit(void) {} >> >> -#endif /* !CONFIG_NVME_KEYRING */ >> +static inline void nvme_target_keyring_exit(void) >> +{ >> + if (IS_ENABLED(CONFIG_NVME_TARGET_TCP_TLS)) >> + nvme_keyring_exit(); >> +} >> + >> #endif /* _NVME_KEYRING_H */ > > I guess the right way is to make 'keyring' a 'real' module, and move > 'nvme_keyring_init()' and 'nvme_keyring_exit()' as the modules init/exit > functions. I'll prepare a patch. That's probably a good idea, but you still need to address the link failure for nvme_keyring_id() and nvme_tls_psk_default() when the caller is built-in and the definition is in a loadable module. Arnd