Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1795423ybb; Thu, 9 Apr 2020 09:09:50 -0700 (PDT) X-Google-Smtp-Source: APiQypLxr6rTLHID6kmfr6SLzEBtmhBUDj+hwb+Jv3YOL1etq0edGqbCzxAFvw54NHldq25Rgf5Z X-Received: by 2002:a37:7242:: with SMTP id n63mr545628qkc.111.1586448589909; Thu, 09 Apr 2020 09:09:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586448589; cv=none; d=google.com; s=arc-20160816; b=QzL4OU9AVWb64eiGxmd4gSB1QMyb8oOEd3rbesu5zzJMLAYWYkWXN8u/VKRx4lF4Oe Tdmz1zAhvMrC4GAzuQYlB8CssT4YEgL9oK9hIIHvtr7tAXEqsQutMgQoGqlSHuES8ut3 YyZYjOtXy18QnNgsmmOMslnaf7QxX0ilUrWEGvoYbatJ+0g/V7Gw48Nzh3IrbAtrxULq uWg4ootWuwpecPHS2RSlw9DwUkmdLcoO36RuiuU9WxwJ92nFRQERla52jfeyzBLb8n2+ NMBSLSPxzQig2IyKAhIwUUD5QwFduD52w4tqFDUq+XLGV4o9K2SlD1SD7PWV34CevP07 8aPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Bv5T4MVa9umd8pCEPysPH2jSGjRAmk+aGGhx29rknXE=; b=I3bA3ZeFDOeT0sNEGyak6V+bLxDqc4i/MkiT55d8TxLzRQABIwoOH3V8dSGMyAtt9J 3P3czEwGf/avFep87cp6xMQQhtzbTIJwTigJQKGr4rhNVctB317BzmeiFPprpE+il/S/ 3nVccS64FHHILkFjRZAoCUB/f+pXbUY3C3YNF9Mukka1r7x+8X708MHI6unmCP7ja1X1 f+vbwqD5w2Wx8FeVj3Yniic/c9bf4VGwxRO4QdsNBILHcBI9WfAzBNMnsbNQmNPx65Ws 4qp6VN36JAdubCNtbM9HZ2rVZWsi6PItp8+IZvA8l8KsPRThZZoFWtUx6aNyHcc/9hW9 uuFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ovy0PS17; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cx12si5629250qvb.37.2020.04.09.09.09.27; Thu, 09 Apr 2020 09:09:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ovy0PS17; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728416AbgDIQIb (ORCPT + 99 others); Thu, 9 Apr 2020 12:08:31 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:40526 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728247AbgDIQIa (ORCPT ); Thu, 9 Apr 2020 12:08:30 -0400 Received: by mail-pf1-f195.google.com with SMTP id c20so4308922pfi.7; Thu, 09 Apr 2020 09:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Bv5T4MVa9umd8pCEPysPH2jSGjRAmk+aGGhx29rknXE=; b=ovy0PS179BjEGMUbAV2YUjlkuVA7wmm5oMqdDajjp0TOKuVkoKJNQkBmal3FBh3iyk 6uQVZEQZEmdg0/J26gmqgI3Xbf+Y9SwaKDT64/0Z8CygXa+0ktwKWdiNPZDog7inLt6j EkNOW+ZQR5kRoBjRRrAAWzyEACYmqWpUvYZJGZKKegZXwil+zgJHu093SKQthM1j8MLC 8Rf5ULsWMKhJYVAk3C2yHu3UnAeVJgnEj0auKCeACDctiuS3MWj/DOurMbx2MkaY2pLJ LiDf/+F+qoyR8JD20gbatncLOb49n47pMUxVIU2+YzFasivC6WMkGvIWS3obeKnzK4ew qc7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=Bv5T4MVa9umd8pCEPysPH2jSGjRAmk+aGGhx29rknXE=; b=SQY7HGVwAknuUIvCYwx3fQA6qxUFcim9SAHAwNURKdchtDCsCUWwhjf2SLJlPoyVbC adGacbScVSJ5G0QZZHlcShIYviH99SwiOmvdPnN+G/cgfgwtRyGOie5gd2so2yJq14tw dzZ3VOFgqWslACuEdjhZcgWPG0YpxPQepLbTMjYjcWw0eLh+h8cg788n1hKv0RURtkD8 l8fM81RIjT9XCP5Uya2UnsvIfteCMxKN8zPDDqYzNcyrQ/tupGTvL9tMqXi/rt3TR5hE 4Ycrh4TXUyNdkdPfPwivW9yUnJ1p7GZK+9BENQGRLjIm+TxEeqKLnGM2F3/3sFenhJcO 5Mmg== X-Gm-Message-State: AGi0PuZkxMegRuG91CVEQ70EQ7DgTEFY6gl67oDyg3fUmiZgENY4CNh2 /pxGAFVSVcMFCcauJ88W0uI= X-Received: by 2002:a62:7e0e:: with SMTP id z14mr269015pfc.27.1586448510359; Thu, 09 Apr 2020 09:08:30 -0700 (PDT) Received: from google.com ([2601:647:4001:3000::50e3]) by smtp.gmail.com with ESMTPSA id k12sm5867045pgj.33.2020.04.09.09.08.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 09:08:29 -0700 (PDT) Date: Thu, 9 Apr 2020 09:08:26 -0700 From: Minchan Kim To: Christoph Hellwig Cc: Andrew Morton , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , x86@kernel.org, David Airlie , Daniel Vetter , Laura Abbott , Sumit Semwal , Sakari Ailus , Nitin Gupta , Robin Murphy , Christophe Leroy , Peter Zijlstra , linuxppc-dev@lists.ozlabs.org, linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, sergey.senozhatsky@gmail.com Subject: Re: [PATCH 10/28] mm: only allow page table mappings for built-in zsmalloc Message-ID: <20200409160826.GC247701@google.com> References: <20200408115926.1467567-1-hch@lst.de> <20200408115926.1467567-11-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200408115926.1467567-11-hch@lst.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 08, 2020 at 01:59:08PM +0200, Christoph Hellwig wrote: > This allows to unexport map_vm_area and unmap_kernel_range, which are > rather deep internal and should not be available to modules. Even though I don't know how many usecase we have using zsmalloc as module(I heard only once by dumb reason), it could affect existing users. Thus, please include concrete explanation in the patch to justify when the complain occurs. > > Signed-off-by: Christoph Hellwig > --- > mm/Kconfig | 2 +- > mm/vmalloc.c | 2 -- > 2 files changed, 1 insertion(+), 3 deletions(-) > > diff --git a/mm/Kconfig b/mm/Kconfig > index 36949a9425b8..614cc786b519 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -702,7 +702,7 @@ config ZSMALLOC > > config ZSMALLOC_PGTABLE_MAPPING > bool "Use page table mapping to access object in zsmalloc" > - depends on ZSMALLOC > + depends on ZSMALLOC=y > help > By default, zsmalloc uses a copy-based object mapping method to > access allocations that span two pages. However, if a particular > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > index 3375f9508ef6..9183fc0d365a 100644 > --- a/mm/vmalloc.c > +++ b/mm/vmalloc.c > @@ -2046,7 +2046,6 @@ void unmap_kernel_range(unsigned long addr, unsigned long size) > vunmap_page_range(addr, end); > flush_tlb_kernel_range(addr, end); > } > -EXPORT_SYMBOL_GPL(unmap_kernel_range); > > int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page **pages) > { > @@ -2058,7 +2057,6 @@ int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page **pages) > > return err > 0 ? 0 : err; > } > -EXPORT_SYMBOL_GPL(map_vm_area); > > static inline void setup_vmalloc_vm_locked(struct vm_struct *vm, > struct vmap_area *va, unsigned long flags, const void *caller) > -- > 2.25.1 >