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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A233C43334 for ; Thu, 14 Jul 2022 18:16:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238579AbiGNSQE (ORCPT ); Thu, 14 Jul 2022 14:16:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232100AbiGNSQD (ORCPT ); Thu, 14 Jul 2022 14:16:03 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62CD067CAA; Thu, 14 Jul 2022 11:16:02 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id w2so3099462ljj.7; Thu, 14 Jul 2022 11:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2QX/Lxw1dM3em+AdcVNETTOfkI14eEfg7V1aSOQdTQM=; b=cL80WLc/zql6U7gVA/bMoRIaeyJja2A7Hl+8eM1sjIXk66Z69jRPAKragoT+s5oy5k 1a8lc7LUo/0ZDCf2dAYC7YpNREsVd0CncKUzvRERTqnIbl3jCZT/M+6Mlz90DZP0LPBn cf7++pETwaA0ZfmkxaCN/CL2O2mgZP+X6tA3x+MxPdsIhW2wvuAEQjL0l4mloz5KY2uk HbSkdnKi7NbTpl4TVaQnbMbMDVLWqeE9PTKvc1LDsEBZDNUeWqyY+Rf1n3G/9Zmj34gZ PP5eWPuOXKBifT8R/noIRJY4rZywnQduq1Rncu2XnGHyRKmzuXz2etugNPmcDSmBV6ws tBPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2QX/Lxw1dM3em+AdcVNETTOfkI14eEfg7V1aSOQdTQM=; b=NBIqa2uPmu4FOQsfyZXBLExLsE8ki7pkd/69xduT0fpiHbSjXavA5XhwhNsB53gjYx dLMAIQD0bqKsx4mW/lyXv9+uFwYOsGuRmoEZre2vza1BidGUUezQMSl85B6hepXW7+jJ BvIna74YyOcnjrxy5OUyMad0WzLGMVuFHBxq2Fc1RJdD82/fFJFaSBnyb8WD9kQhsJEU 0euIgznbgKSUyS3YoAR4K+ZvCXYvfMCWLu80LQeyaoKOcEW6vlKURg/bAOpafuMWJV7a E0tQ1XqK697eI9EtdZRSUihTOWiO1JS3831rjzmQ5SC5Kb2JxLEoXPubBn+wV5GsTLqE XoOQ== X-Gm-Message-State: AJIora9pylqZUe3wqix7wi0GtMMnBELGnN3c0xindONjVDGm2rL9NUpi A1BmjTpbc+bn1RX40hfW4Pw= X-Google-Smtp-Source: AGRyM1tpHk0AhqgOpToqpDTVrMgKe6SHJxLYZZJu+FPz/pCXoZQpyRbm608wTJYHdeLLsSOS4dK+hQ== X-Received: by 2002:a05:651c:158c:b0:250:a23d:2701 with SMTP id h12-20020a05651c158c00b00250a23d2701mr5429808ljq.475.1657822560608; Thu, 14 Jul 2022 11:16:00 -0700 (PDT) Received: from pc636 (host-90-235-11-208.mobileonline.telia.com. [90.235.11.208]) by smtp.gmail.com with ESMTPSA id bi32-20020a05651c232000b0025bbd5e3febsm386358ljb.132.2022.07.14.11.15.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 11:15:59 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Thu, 14 Jul 2022 20:15:56 +0200 To: Song Liu Cc: Christoph Hellwig , Song Liu , bpf , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "linux-modules@vger.kernel.org" , "mcgrof@kernel.org" , "peterz@infradead.org" , "rostedt@goodmis.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "mhiramat@kernel.org" , "naveen.n.rao@linux.ibm.com" , "davem@davemloft.net" , "anil.s.keshavamurthy@intel.com" , "keescook@chromium.org" , "dave@stgolabs.net" , "daniel@iogearbox.net" , Kernel Team , "x86@kernel.org" , "dave.hansen@linux.intel.com" , "rick.p.edgecombe@intel.com" , "akpm@linux-foundation.org" Subject: Re: [PATCH bpf-next 1/3] mm/vmalloc: introduce vmalloc_exec which allocates RO+X memory Message-ID: References: <20220713071846.3286727-1-song@kernel.org> <20220713071846.3286727-2-song@kernel.org> <8AC2399B-F3B2-4F91-B18C-D9D3D5085471@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8AC2399B-F3B2-4F91-B18C-D9D3D5085471@fb.com> Precedence: bulk List-ID: On Thu, Jul 14, 2022 at 04:54:40AM +0000, Song Liu wrote: > > > > On Jul 13, 2022, at 9:23 PM, Christoph Hellwig wrote: > > > > On Wed, Jul 13, 2022 at 03:49:45PM +0000, Song Liu wrote: > >> > >> > >>> On Jul 13, 2022, at 3:08 AM, Christoph Hellwig wrote: > >>> > >>> NAK. This is not something that should be an exported public API > >>> ever. > >> > >> Hmm.. I will remove EXPORT_SYMBOL_GPL (if we ever do a v2 of this..) > > > > Even without that it really is not a vmalloc API anyway. > > This ... > > > Executable > > memory needs to be written first, so we should allocate it in that state > > and only mark it executable after that write has completed. > > ... and this are two separate NAKs. > > For the first NAK, I agree that my version is another layer on top of > vmalloc. But what do you think about Peter's idea? AFAICT, that fits > well in vmalloc logic. > I am not able to find the patch/change to see what you have done. But please do not build a new allocator on top of vmalloc code. We have three different ones what make things to be complicated :) -- Uladzislau Rezki