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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 CF307C352BE for ; Fri, 17 Apr 2020 12:57:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9A07D22260 for ; Fri, 17 Apr 2020 12:57:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A07D22260 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 295AD8E0016; Fri, 17 Apr 2020 08:57:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 26E738E0001; Fri, 17 Apr 2020 08:57:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A9798E0016; Fri, 17 Apr 2020 08:57:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0065.hostedemail.com [216.40.44.65]) by kanga.kvack.org (Postfix) with ESMTP id 0534C8E0001 for ; Fri, 17 Apr 2020 08:57:42 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id BB709180ACEE4 for ; Fri, 17 Apr 2020 12:57:42 +0000 (UTC) X-FDA: 76717348764.14.badge43_26237fb323a30 X-HE-Tag: badge43_26237fb323a30 X-Filterd-Recvd-Size: 2860 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Fri, 17 Apr 2020 12:57:41 +0000 (UTC) IronPort-SDR: 9s+dqiknVc5T1uujaJaF4yFcoyboRJq5FWPZIm8zGWL7ReTDprvMfueAi0W3JJKhOuyd5F1IHX DG5RxBF8UBHw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2020 05:57:40 -0700 IronPort-SDR: EeKEeugl3hBbRh6rXGlGndnxkb9iEZCITynNpkA4RJIr2ivOTWYtNwkF0W6Xr9r3ij5alHXlXP RN6zTDTJ+6/w== X-IronPort-AV: E=Sophos;i="5.72,395,1580803200"; d="scan'208";a="279582510" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2020 05:57:38 -0700 Received: by paasikivi.fi.intel.com (Postfix, from userid 1000) id D7FA720701; Fri, 17 Apr 2020 15:57:35 +0300 (EEST) Date: Fri, 17 Apr 2020 15:57:35 +0300 From: Sakari Ailus To: Christoph Hellwig Cc: Peter Zijlstra , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, jroedel@suse.de, vbabka@suse.cz, urezki@gmail.com, Thomas Gleixner , Olof Johansson , Mauro Carvalho Chehab Subject: Re: [PATCH] mm/vmalloc: Sanitize __get_vm_area() arguments Message-ID: <20200417125735.GN27762@paasikivi.fi.intel.com> References: <20200403163253.GU20730@hirez.programming.kicks-ass.net> <20200406130155.GB29306@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200406130155.GB29306@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Christoph, On Mon, Apr 06, 2020 at 06:01:55AM -0700, Christoph Hellwig wrote: > On Fri, Apr 03, 2020 at 06:32:53PM +0200, Peter Zijlstra wrote: > > > > __get_vm_area() is an exported symbol, make sure the callers stay in > > the expected memory range. When calling this function with memory > > ranges outside of the VMALLOC range *bad* things can happen. > > > > (I noticed this when I managed to corrupt the kernel text by accident) > > Maybe it is time to unexport it? There are only two users: > > - staging/media/ipu3 really should be using vmap. And given that it > is a staging driver it really doesn't matter anyway if we break it. It's not very polite to suggest breaking other people's drivers for such a small matter, staging or not. That'd be bound to break kernel compilation for a lot of people, if for nothing else. Anyway, thanks for cc'ing me. I agree with suggestion and I'll submit a patch to address it. -- Regards, Sakari Ailus