Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3529204rwd; Mon, 29 May 2023 12:05:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7+BVLqiH+JvUZisoE77F9Ak7k6wO152vHY68N1vCoSycXOKXg6iQAjg3bu1aPG0qUj9A6Z X-Received: by 2002:a17:90a:889:b0:256:70d3:b4c0 with SMTP id v9-20020a17090a088900b0025670d3b4c0mr78718pjc.21.1685387130329; Mon, 29 May 2023 12:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685387130; cv=none; d=google.com; s=arc-20160816; b=QGiVqn6DSGzNIkMAYPM66bE+sbN7CpXPKzoBkaGNa7GuHdQMy/5VF68f9Fs+btDPc1 ttRsbzny/JZP3uciXZ1CPaikPUSDS4mpi5jdBwzaDX6lIlb26cI9HX1ev5TkDM4j9aWW 6l7SiE0NP7gAuh78y2fptQo1FCfOrLNbdyRViTv3pYBTpxxMoiPuRVJX/2JrQ+HdaXAT b0TtLs81UcnvHc68C/z96TAwVMouBnqfs/Gd7xbCu8B3fXCEfkWetZ/npATnx3kPOgcC MEcTsDvDs7mEwIXnV0VafrvPMiwC783RNWOCjDeTk960On1ZXfhS41q1NlAea0kBnOny 5iPA== 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=Dcw0wi1IKmWoL1+2Aech130Jerxslz1zIA7wJ3PVaaE=; b=ccPeLa6Xq1xK+H9CSwM6j0AN5PRVfTz0pLO8JYIhvKqYJ91n251TtfqoDS1duiQrlQ kCmcEuTjqYdYB5gdO1ERsxxr+DsC0aX5r5yb5TJBxO48TmGlQtCUEZN5f4U4L5R81uEu 2h6jlmebyjwWPqiVXyGcaqXjxdAjMyGnyuSe7BCaEB0Yleqxkw/jCh7I4or124jCVNjf +sE0DR3Azyo0j+cdp6VtQ/3AO8nCOQkDbvnmXkTa7hUUTTbVsRnXJusVqSy6JsD1hrUO Q7z+DqR5kJSFTcwGrvaTHGwD0DxOG15bwnZwDRPKvkMDn6fGJ92diG+/RcbkcFb/Wjq/ lPQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=hvyv6MMt; 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 q4-20020a17090ad38400b00252835d797asi1767267pju.26.2023.05.29.12.05.16; Mon, 29 May 2023 12:05:30 -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=hvyv6MMt; 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 S229513AbjE2SZT (ORCPT + 99 others); Mon, 29 May 2023 14:25:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229455AbjE2SZS (ORCPT ); Mon, 29 May 2023 14:25:18 -0400 Received: from out-3.mta0.migadu.com (out-3.mta0.migadu.com [IPv6:2001:41d0:1004:224b::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 408E1C9 for ; Mon, 29 May 2023 11:25:17 -0700 (PDT) Date: Mon, 29 May 2023 14:25:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1685384715; 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=Dcw0wi1IKmWoL1+2Aech130Jerxslz1zIA7wJ3PVaaE=; b=hvyv6MMtqup1fC317UHrZ0xYxTWI1yPtQXSD9f4elllGt7Xgm7MqPJilWH25onE5HEZvqk 4yMVcoSREt2QbHkEhCzPwLZsVf8WF36+fMAbB6bHkk92EfO+O72ca32VR3jDQwkUOA4Znj ADEM3xGH2low/mLNfirkjQEnNn5kTzA= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Song Liu Cc: linux-kernel@vger.kernel.org, bpf@vger.kernel.org, mcgrof@kernel.org, peterz@infradead.org, tglx@linutronix.de, x86@kernel.org, rppt@kernel.org Subject: Re: [PATCH 0/3] Type aware module allocator Message-ID: References: <20230526051529.3387103-1-song@kernel.org> 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 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 Sat, May 27, 2023 at 10:58:37PM -0700, Song Liu wrote: > I don't think we are exposing architecture specific options to users. > Some layer need to handle arch specifics. If the new allocator is > built on top of module_alloc, module_alloc is handling that. If the new > allocator is to replace module_alloc, it needs to handle arch specifics. Ok, I went back and read more thoroughly, I got this part wrong. The actual interface is the mod_mem_type enum, not mod_alloc_params or vmalloc_params. So this was my main complaint, but this actually looks ok now. It would be better to have those structs in a .c file, not the header file - it looks like those are the public interface the way you have it. > > The memory protection interface also needs to go, we've got a better > > interface to model after (text_poke(), although that code needs work > > too!). And the instruction fill features need a thorough justification > > if they're to be included. > > I guess the first step to use text_poke() is to make it available on all > archs? That doesn't seem easy to me. We just need a helper that either calls text_poke() or does the page permission dance in a single place. If we do the same thing for other mod_mem_types, we could potentially allow them to be shared on hugepages too.