Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp464780rwd; Sat, 27 May 2023 00:23:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ72aYIHkC9c9H1Ke5l1SbGQAHX5uWYDZo3h0dM/qEK3wwbqW1VzEscU4eHAfjsGMSgC8CLi X-Received: by 2002:aa7:888b:0:b0:63c:1be4:5086 with SMTP id z11-20020aa7888b000000b0063c1be45086mr6473549pfe.6.1685172202102; Sat, 27 May 2023 00:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685172202; cv=none; d=google.com; s=arc-20160816; b=NjGIxf3DT0UO+vuRPB+MCJmUNu29CH4HMY2wgc0eJhtEFHM7wXdcTqBQmNk3TbxI3q XuqIWgSsKHtdoJSVBN7I0UWeC+eBzQbEhnkpkdW09hoNgU4Puvcf+YmIMatkyG89CiR2 TQZUp1xSPlsUd7+LOo0pGXIC1Gz6sdZSifuxKbleIKm5HHB8RQ3CRCaUbcdYl+PwZ4zJ jSW7MlMBpZ1yCgZhEFpXCacgNnXhLfH10fR/6bJtq2sEemhXW4yvhUtzmNGCKjatmEYl Mx01+fn5SPr6HdCloDiQd7f0Ttcp+4VBM/SRpfoScST+TB02nWI+3r9q46XdQpSM3fm1 r2tg== 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=iou0GTPq4Ljp/eKRqegKeRywXowmKecKWFtCM8AzuyE=; b=mNNLJyjaHQmFrsCVl9vaFdTx2IeLkdNyEWuei9kq3bdLQz+QYEI/85h1ucgLPzOLjO lzYWK8yqLxmmuNHdKrvwzbG8/QC3xyvyAjvii5qpSxnJrWg3gQ0YCrjekZKnMhZgvO5U CpEM7baR44+Ry+5DSJRmXq2GSNBzNFcLxT9FZEb89W12pTTw1Rgc8MhzikNV4ufZoM/d U4Bw7CHy9dGtb6X8vUmt4l5JF+kykNIi1sbfMcQeGNYC9slA92BYV+vhlmYUnwwHN4gU lx1HkgmzkeaNFvXqNjqizIWK6vHONh6Jj56aOlqyTaE5v9YmxECdG0qw3jbDtzkkKuHJ DISw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=vaqBn89c; 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 c8-20020a056a00008800b006293f8330fcsi1173756pfj.322.2023.05.27.00.23.07; Sat, 27 May 2023 00:23:22 -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=vaqBn89c; 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 S230395AbjE0HE5 (ORCPT + 99 others); Sat, 27 May 2023 03:04:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjE0HEx (ORCPT ); Sat, 27 May 2023 03:04:53 -0400 Received: from out-16.mta1.migadu.com (out-16.mta1.migadu.com [95.215.58.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12505EB for ; Sat, 27 May 2023 00:04:51 -0700 (PDT) Date: Sat, 27 May 2023 03:04:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1685171090; 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=iou0GTPq4Ljp/eKRqegKeRywXowmKecKWFtCM8AzuyE=; b=vaqBn89cvOB6cMJpgVHg8c9LyrFKdkyl6wiaHAmBzmvw/5hJ3K7b2CFzuKlroi18Gt2y87 9A5XRCQIl6o2dJEOPbDlTOqFs3MkIgYM/WKORNr10fKe9m7Inp7yE3R8RsDuDj518bJBPj ymlbbkFW7ZnF6yfDkkv8vgKc5h9Z7SQ= 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: <20230526051529.3387103-1-song@kernel.org> 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=unavailable 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 Thu, May 25, 2023 at 10:15:26PM -0700, Song Liu wrote: > This set implements the second part of module type aware allocator > (module_alloc_type), which was discussed in [1]. This part contains the > interface of the new allocator, as well as changes in x86 code to use the > new allocator (modules, BPF, ftrace, kprobe). > > The set does not contain a binpack allocator to enable sharing huge pages > among different allocations. But this set defines the interface used by > the binpack allocator. [2] has some discussion on different options of the > binpack allocator. I'm afraid the more I look at this patchset the more it appears to be complete nonsense. The exposed interface appears to be both for specifying architecture dependent options (which should be hidden inside the allocator internals!) _and_ a general purpose interface for module/bpf/kprobes - but it's not very clear, and the rational appears to be completely missing. I think this needs to back to the drawing board and we need something simpler just targeted at executable memory; architecture specific options should definitely _not_ be part of the exposed interface. 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.