From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03DD6C4332F for ; Tue, 22 Nov 2022 06:13:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7248E6B0071; Tue, 22 Nov 2022 01:13:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6D4126B0073; Tue, 22 Nov 2022 01:13:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5C35F8E0001; Tue, 22 Nov 2022 01:13:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 4BCB16B0071 for ; Tue, 22 Nov 2022 01:13:28 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 1937680FEC for ; Tue, 22 Nov 2022 06:13:28 +0000 (UTC) X-FDA: 80160061296.03.1F42324 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf23.hostedemail.com (Postfix) with ESMTP id 6A135140009 for ; Tue, 22 Nov 2022 06:13:27 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 5535968D06; Tue, 22 Nov 2022 07:13:23 +0100 (CET) Date: Tue, 22 Nov 2022 07:13:23 +0100 From: Christoph Hellwig To: Luis Chamberlain Cc: Song Liu , Christoph Hellwig , Daniel Borkmann , bpf@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, x86@kernel.org, peterz@infradead.org, rick.p.edgecombe@intel.com, rppt@kernel.org Subject: Re: [PATCH bpf-next v4 1/6] vmalloc: introduce execmem_alloc, execmem_free, and execmem_fill Message-ID: <20221122061323.GA14204@lst.de> References: <20221117202322.944661-1-song@kernel.org> <20221117202322.944661-2-song@kernel.org> <882e2964-932e-0113-d3cd-344281add3a1@iogearbox.net> <20221121155542.GA27879@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669097607; a=rsa-sha256; cv=none; b=PP2cecp6c0xZ8Y2JA2cvd4NHRj/3J6Bvz7UiqW6ZedWzOr0w91pLImpPAj+VUMIaBov6tq PJhE2CxdebZDcb9tgsnwlN422JHS9fLTdEowW7CknDkdtvPFrPRVxD1xd6lLdSKJL1An61 h877GjNUAVJ1zVz6IyYBd8269JMHaBQ= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; spf=none (imf23.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669097607; h=from:from:sender: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: in-reply-to:in-reply-to:references:references; bh=UX/1sh0ItCzhCWNBXx/AN5tQydf5osRUZDRVvo7Obyk=; b=ByWDiPPGuID2HrGrM1/DS2+niYoXXceHiA9RrQHivIoU/1rZkMKZwoi68tDhawFGEGb146 +aaSgn8PHLLzb/kt7MhKI8TlAUPaioBv1vF8EyeV4Xw5F4CuFwA+xS2tbXzjKhzx4cSbAK d21KI1uZC1t2pG+n5+WPtpLf980bVfE= X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 6A135140009 Authentication-Results: imf23.hostedemail.com; dkim=none; spf=none (imf23.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de; dmarc=none X-Rspam-User: X-Stat-Signature: 3hpx49kohatboyaww5j8x8dz4amn3f3j X-HE-Tag: 1669097607-52019 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Nov 21, 2022 at 11:55:14AM -0800, Luis Chamberlain wrote: > > I added these exports for test_vmalloc.ko. Is there a way to only export > > them to test_vmalloc.ko but nothing else? > > See EXPORT_SYMBOL_NS_GPL() No, that is in no way limiting who uses it, it just makes them go through extra hoops. The funtionality to allocate exectuable memory is highly dangerous and absolutely must be limited to built-in code. So the tests should just be forced to be built-in here as well.