Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6421768rwr; Tue, 9 May 2023 15:13:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6fPyg5EFgNb3UTZeGmnu1V5m1ljx2sgTsrJztrDa/UaGWafl+VQAlXruhWEpgibBLlSzxD X-Received: by 2002:a05:6a20:3ca9:b0:f3:3ea5:5185 with SMTP id b41-20020a056a203ca900b000f33ea55185mr18331976pzj.10.1683670387968; Tue, 09 May 2023 15:13:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683670387; cv=none; d=google.com; s=arc-20160816; b=tTLnm0mwh02zuAjOXaT2vhDLQ8oZIp8Xy/t3Uw3tWtcoahp7V81gvf51h4QGFSkZ5k ZJpvxb6jFhZ+Lrn2iRpNAHoGeVvcfSQXi6TYkoN/Psa+sgtUsfUd/hj9IJKndH/j5UAu NPRlfQ26w43uBTnvcvpEgQt/LWqnNGXDsmHaMCl0mups87RJhZxEd+hZsTFvQiQSqPH8 SJKS6qYv01TzNEtP3vwmHSexK+++uVJyUGX0+BCpCCAI4GGPz9PqCU5rljF4Pagz9CI0 +XtP1XNTfiDEku5jQ5N7801xjkImmk//m1K2B/VLPpwch+sGYnaXioMR7OT/bVzaRWjO pWBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=7BLmDLz3BiMEr2LiLldeMxPISO3gLTAAmsfZ3LAk8jY=; b=G7f8NnxKk4PIj20F4BNV4zVCAcbuE0p6DLd6t2GyDqH75MS5+04JNGw1F5rfcKbWb7 JyDv78L62msKytF+O8Z1tKN/U5ccLGv90mY7O4vI03gOFa2bFMP9aNL8cb8r8nUAMeKi 6PkTfAkt7rQp9aA6feY3fM0NeucX//1ZS4ShDTFMf6LOng0r363pzB7YAhXl0m5OGu/r DMez/EItWJaZmPwPH3QojTT5LBmd+MvSTvt11DXYTuO1Ix2AVNGo6FoyEL2ZspdJWxJB Hu79TNqFx486ups/UXUEQXe4AdGN76lfdC1gzTFuQ5dCw0MaRmlQOdXxabMezpvh7NWl aghw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=VsfqGbr4; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a19-20020aa795b3000000b0063d26262efasi3425163pfk.187.2023.05.09.15.12.48; Tue, 09 May 2023 15:13:07 -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=@linux.dev header.s=key1 header.b=VsfqGbr4; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235657AbjEIVc2 (ORCPT + 99 others); Tue, 9 May 2023 17:32:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235882AbjEIVcN (ORCPT ); Tue, 9 May 2023 17:32:13 -0400 Received: from out-4.mta1.migadu.com (out-4.mta1.migadu.com [IPv6:2001:41d0:203:375::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 693C09ED5 for ; Tue, 9 May 2023 14:30:44 -0700 (PDT) Date: Tue, 9 May 2023 17:29:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1683667754; 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: in-reply-to:in-reply-to:references:references; bh=7BLmDLz3BiMEr2LiLldeMxPISO3gLTAAmsfZ3LAk8jY=; b=VsfqGbr4zmcegdCNeOps8Tym8iTSXsp82l46/RQQeimltbUGVyaxe0SRmZCKkOhjp/WOGo 6STHO1rpPpMOgnZ2guu4NVaqHLb0JSo5iwlLOvqhpgKezzpIXgHuBYtnYwjflDEofwV98s Hz6z9dW8EYVZ3k7IfvXGRc55GJUSZS4= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Lorenzo Stoakes Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-bcachefs@vger.kernel.org, Kent Overstreet , Andrew Morton , Uladzislau Rezki , linux-mm@kvack.org Subject: Re: [PATCH 07/32] mm: Bring back vmalloc_exec Message-ID: References: <20230509165657.1735798-1-kent.overstreet@linux.dev> <20230509165657.1735798-8-kent.overstreet@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Tue, May 09, 2023 at 02:12:41PM -0700, Lorenzo Stoakes wrote: > On Tue, May 09, 2023 at 01:46:09PM -0700, Christoph Hellwig wrote: > > On Tue, May 09, 2023 at 12:56:32PM -0400, Kent Overstreet wrote: > > > From: Kent Overstreet > > > > > > This is needed for bcachefs, which dynamically generates per-btree node > > > unpack functions. > > > > No, we will never add back a way for random code allocating executable > > memory in kernel space. > > Yeah I think I glossed over this aspect a bit as it looks ostensibly like simply > reinstating a helper function because the code is now used in more than one > place (at lsf/mm so a little distracted :) > > But it being exported is a problem. Perhaps there's another way of acheving the > same aim without having to do so? None that I see. The background is that bcachefs generates a per btree node unpack function, based on the packed format for that btree node, for unpacking keys within that node. The unpack function is only ~50 bytes, and for locality we want it to be located with the btree node's other in-memory lookup tables so they can be prefetched all at once. Here's the codegen: https://evilpiepirate.org/git/bcachefs.git/tree/fs/bcachefs/bkey.c#n727