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 X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BBB8C2BA2B for ; Thu, 9 Apr 2020 16:08:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30AF320768 for ; Thu, 9 Apr 2020 16:08:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586448512; bh=KLP/ssYnTmf/126cousEZsCnYvpDIdA61+pzjG77Eoo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=0PIFjcmPoiJha7CUwdLNxj3F0eo0nq/kSzUTjU1OLZyM0pOHVuxe0s40yV6Q4XRBB GLK6dihn58ghVTtfqwb+rGd+0R5oNcZvBqZp0I0NAaHEWXFzPaPPeO6s0gRRbEyNUv QbvAo/9WbpT6cBQ0SzbyShewerjLwWZtTNgAjRDM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728368AbgDIQIb (ORCPT ); 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-Google-Smtp-Source: APiQypJFLGcG6dVXLdib9gF5oJvHoXpdIxKhy+0DVfXFFx+ZgGNqEvh6DF50PGrfKmNfspKnDLZDsQ== 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: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@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 > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Minchan Kim Subject: Re: [PATCH 10/28] mm: only allow page table mappings for built-in zsmalloc Date: Thu, 9 Apr 2020 09:08:26 -0700 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 Return-path: Content-Disposition: inline In-Reply-To: <20200408115926.1467567-11-hch@lst.de> Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-arch.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 > 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 X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, FSL_HELO_FAKE,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 677B3C2BB55 for ; Thu, 9 Apr 2020 17:26:47 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3BDB620771 for ; Thu, 9 Apr 2020 17:26:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ovy0PS17" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3BDB620771 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9464786B77; Thu, 9 Apr 2020 17:26:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oWz4P7wb1f2x; Thu, 9 Apr 2020 17:26:45 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 44E3486B34; Thu, 9 Apr 2020 17:26:44 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 24DEBC1D7E; Thu, 9 Apr 2020 17:26:44 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 885F6C0177 for ; Thu, 9 Apr 2020 16:08:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 74A9486B12 for ; Thu, 9 Apr 2020 16:08:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SFXmPhFyAdq3 for ; Thu, 9 Apr 2020 16:08:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by fraxinus.osuosl.org (Postfix) with ESMTPS id D584186B18 for ; Thu, 9 Apr 2020 16:08:30 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id n10so4328071pff.3 for ; 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=AiffSkmkRXU9mpu5tUg4UAzXx1U4uxw4JI8o9cizme7W7d8+NG4VBasUsw3sRoP8uv R4WdYUlz7jFlYaX2GhCCMyIHN4ADdsGkzHnM9lmG2/hoXjQBrYseCjql7iwZJUHx4ojz fVoDPb15mMMlq9ymFX/GEgjW1APICPmPSLfJGoWqCfetrFyuXzPwHMjlYHY3jxy91Hov 3b9CvGleG0bThKtFO8excJRYGWG4eRF1M9Me4Nn4OL/CiO1uQvkD7FVAh682MZhI7LBt crrD4qM2wTZlxd1I1AnRPIW06VxYrnTSxCMly8AwSH+qosRUWczMyE5cSawCYfboxsQH vdRw== X-Gm-Message-State: AGi0Pua8E1wGp0+CpztAIRi4aUeSlQaHXDXKbTTM3ptSqJdBzpuPkxBY VyV+mSwEH4o2Qkmm4slQf2w= X-Google-Smtp-Source: APiQypJFLGcG6dVXLdib9gF5oJvHoXpdIxKhy+0DVfXFFx+ZgGNqEvh6DF50PGrfKmNfspKnDLZDsQ== 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 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-Disposition: inline In-Reply-To: <20200408115926.1467567-11-hch@lst.de> X-Mailman-Approved-At: Thu, 09 Apr 2020 17:26:42 +0000 Cc: linux-hyperv@vger.kernel.org, David Airlie , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, "K. Y. Srinivasan" , Sumit Semwal , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Wei Liu , Stephen Hemminger , x86@kernel.org, Peter Zijlstra , Laura Abbott , Nitin Gupta , Daniel Vetter , Haiyang Zhang , linaro-mm-sig@lists.linaro.org, bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Christophe Leroy , Robin Murphy , linux-kernel@vger.kernel.org, sergey.senozhatsky@gmail.com, iommu@lists.linux-foundation.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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 > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, FSL_HELO_FAKE,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 309F4C2BB55 for ; Thu, 9 Apr 2020 16:10:32 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D4930218AC for ; Thu, 9 Apr 2020 16:10:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ovy0PS17" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D4930218AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48ymMT1bTfzDrMJ for ; Fri, 10 Apr 2020 02:10:29 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::443; helo=mail-pf1-x443.google.com; envelope-from=minchan.kim@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ovy0PS17; dkim-atps=neutral Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48ymKF66n4zDrFP for ; Fri, 10 Apr 2020 02:08:33 +1000 (AEST) Received: by mail-pf1-x443.google.com with SMTP id v23so4966714pfm.1 for ; Thu, 09 Apr 2020 09:08:33 -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=SgDAxR8BH8d63amo8M0ImtA04ZWHwboos27apmlDZKKsWpoWHlSDjApS/5mWLDBHoO eNSGT5YDUlWGsKneWJrCs46nD+Sgt+AFv65dVBx+kjanvboy+8TKymVuOcq3HvVcrita xcNujxzuvj+JBtWCG0AdxxiceQ/spjGo13V61GbbVlN66vI/MyoQyW/aYVtTSpWbItwc ZpSH0/ZmJMVELE2YESPHZMQJOKy4J6Hpjl0tET0S5MphU2K21apDfcDCknDKTFxDNZdw ODpVg33lId96AXIG+9mg7Ue6c9aAqoBEjVzzO8aPqiQqJBkiWHXV0/704/xxiONXfv8w xPQQ== X-Gm-Message-State: AGi0Pua+2CB897D60M3C2/wlSRWGHqraWaKnRVDJI+HUAYqzKdzpOBRE DoKR2qYbP+7qaSOYq1Z5uw0= X-Google-Smtp-Source: APiQypJFLGcG6dVXLdib9gF5oJvHoXpdIxKhy+0DVfXFFx+ZgGNqEvh6DF50PGrfKmNfspKnDLZDsQ== 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 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> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-hyperv@vger.kernel.org, David Airlie , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, "K. Y. Srinivasan" , Sumit Semwal , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Wei Liu , Stephen Hemminger , x86@kernel.org, Peter Zijlstra , Laura Abbott , Nitin Gupta , Daniel Vetter , Haiyang Zhang , linaro-mm-sig@lists.linaro.org, bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Robin Murphy , linux-kernel@vger.kernel.org, sergey.senozhatsky@gmail.com, iommu@lists.linux-foundation.org, Sakari Ailus , Andrew Morton , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 > 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 X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,FSL_HELO_FAKE,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5B9BC2BA2B for ; Thu, 9 Apr 2020 16:08:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7730A208FE for ; Thu, 9 Apr 2020 16:08:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="f3fG67A3"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ovy0PS17" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7730A208FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CV+EjMLW1f0RXH+yF+MWNRAYF/TL2D9bUNU1BOIXteg=; b=f3fG67A3q0iryf 4dDkBpO6YKSrARs/IrEcSA9Izb9DhL6TVLEgQ27FB4Cw06g+WpLYmm4B5vH60xMSnIq7vrqvTRs8R yBly2xyBiBc5v2TSvNw8K3rdN4c2Nt4f/o7muj3Ysm7456zupcJE9L+zOsGAl2mJC/VPprxSNco1l X9gMeo7Ry8xENQVOpUiA5UDa3HS3HOUt5AYxjflOJ4MldeOiNFCyWxW76eA8/RshNQMH1IhXKq4P2 F9NxL27hmk/BQCs89D4TBVCJbC7zI7qbqy54G5dfzuiBoQSa2oNLthRYp0hr+H5kEGAqU666HZEW1 /oBQHdV2YHhIOMhibiaA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jMZjG-0000px-M5; Thu, 09 Apr 2020 16:08:34 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jMZjD-0000pZ-1x for linux-arm-kernel@lists.infradead.org; Thu, 09 Apr 2020 16:08:32 +0000 Received: by mail-pf1-x441.google.com with SMTP id q3so4303705pff.13 for ; 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=auIKBO9BgMlCnNTtRiC8BQu/D7Vua68HIRbMu046AbCTX0sgc/Ma1jSyb7JxUt1tg1 h0BjNSocA5JS6trwks6GnK+1qS+msHZt2XHfpdfRjYrdVQS+i17f1WkvT6Mdd6vhGypZ KFO5RBnxFF2QlKwYUU1KR9giisslB4PX704vBDuylJSKmVShbfV4Yt4YpJYqnAy8UZbT 0Da2HdyOVt+suMXJCr8i6ey7u/NU1ERV00R7SeTXvJB/SkxAsnBMMRmcObTBKw4vkdRn d4V4FqYf+gcjH3mLxw97lq9U3FcRQwBu44PgjOubZp3+ZRf8l/StH+qWnH/mVnui/RRo w0eA== X-Gm-Message-State: AGi0PuY1a2H7TTTnEBYrdbRNbeONO5OP5E2+KM4DH5hmjDTuIVjHa1ck ef0w+p4mSXtNP3M2lK3kL/Y= X-Google-Smtp-Source: APiQypJFLGcG6dVXLdib9gF5oJvHoXpdIxKhy+0DVfXFFx+ZgGNqEvh6DF50PGrfKmNfspKnDLZDsQ== 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 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-Disposition: inline In-Reply-To: <20200408115926.1467567-11-hch@lst.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200409_090831_122200_8225D2B1 X-CRM114-Status: GOOD ( 18.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-hyperv@vger.kernel.org, David Airlie , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, "K. Y. Srinivasan" , Sumit Semwal , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Wei Liu , Stephen Hemminger , x86@kernel.org, Peter Zijlstra , Laura Abbott , Nitin Gupta , Daniel Vetter , Haiyang Zhang , linaro-mm-sig@lists.linaro.org, bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Christophe Leroy , Robin Murphy , linux-kernel@vger.kernel.org, sergey.senozhatsky@gmail.com, iommu@lists.linux-foundation.org, Sakari Ailus , Andrew Morton , linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, FSL_HELO_FAKE,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F624C2BB86 for ; Thu, 9 Apr 2020 16:08:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4292C20768 for ; Thu, 9 Apr 2020 16:08:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ovy0PS17" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4292C20768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E42906E245; Thu, 9 Apr 2020 16:08:31 +0000 (UTC) Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id D5A536E245 for ; Thu, 9 Apr 2020 16:08:30 +0000 (UTC) Received: by mail-pf1-x443.google.com with SMTP id u65so4316245pfb.4 for ; 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=bxtinGObXCi7yJJUbGI8OXLffGksriALKUjkHwdGxtNrxxu0LFywQvfAEsfWY2vqf8 AEQzAjut57q6K160P+KbU5g/L02cvB3oohiBLIq3WG8SNcsh3nFK41tz1W0ixpSGhKL7 tpK/RBG53cfWHquVD7fVrBZxC0rIW1h6pYrIN1IywX2mrqrtG0CfcLUI4YQb2UiHALWI H/zZ1nulGPl7GV7bzZ1tH3G2eqqMN2LzT4yQp555P1zoCjl6co4DgWmN8Eys+/wR63as N5o4CuuKRE/6ptdW9aZbswMhdBmEb8/r4SDQXYjXRfH20wBidrHet0rr3samX6xHU3wB DRNw== X-Gm-Message-State: AGi0PuZHwARVuk/wNC0y4CuHpHL+oVXbIn5Ccy5XqAUm3jiCWYVOpcAH QxsLcoyvK2u8YWdWmDMCNkj3Dmzz X-Google-Smtp-Source: APiQypJFLGcG6dVXLdib9gF5oJvHoXpdIxKhy+0DVfXFFx+ZgGNqEvh6DF50PGrfKmNfspKnDLZDsQ== 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 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-Disposition: inline In-Reply-To: <20200408115926.1467567-11-hch@lst.de> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-hyperv@vger.kernel.org, David Airlie , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, "K. Y. Srinivasan" , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Wei Liu , Stephen Hemminger , x86@kernel.org, Peter Zijlstra , Laura Abbott , Nitin Gupta , Haiyang Zhang , linaro-mm-sig@lists.linaro.org, bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Christophe Leroy , Robin Murphy , linux-kernel@vger.kernel.org, sergey.senozhatsky@gmail.com, iommu@lists.linux-foundation.org, Sakari Ailus , Andrew Morton , linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel