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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 A7EF9C2BA1B for ; Mon, 6 Apr 2020 14:06:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 688BF23433 for ; Mon, 6 Apr 2020 14:06:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="FZpkeZbs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 688BF23433 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E99AB8E002A; Mon, 6 Apr 2020 10:06:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E4A338E000D; Mon, 6 Apr 2020 10:06:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D60118E002A; Mon, 6 Apr 2020 10:06:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0128.hostedemail.com [216.40.44.128]) by kanga.kvack.org (Postfix) with ESMTP id BB79B8E000D for ; Mon, 6 Apr 2020 10:06:39 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 67E44181AEF3E for ; Mon, 6 Apr 2020 14:06:39 +0000 (UTC) X-FDA: 76677605718.16.basin91_91608bcc3861d X-HE-Tag: basin91_91608bcc3861d X-Filterd-Recvd-Size: 3303 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Mon, 6 Apr 2020 14:06:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wuY9sae0NBKX23MLISqZR16SAVntvt/3s72TBLRjUI4=; b=FZpkeZbsvDsBzq7OGL80zOGfqp VjT71XyWpoJUPGxLBcSgV7LV4eUDLSqYrtSk1lAiuBdwc3XuZvx6gGSzwU9tcz79UTkCUlIkdgXIn bus14IoWCmmVbrgJB87DNgbzjN95EMp85/utaYrdQc4RefF4NTfjvyHnCDVmZazv3eYlsud77L/QS HHUb61mFhq5SCBl0Q4crbGcNBv17ox8JfINumy2hHcKYhGsqsnVasHHvN/r4hLmyU//1WPgLmJKgo yRvnko/hwMAd+fwhLagl6/QIaziyyFC6XJhgeYL/Ak3HIeVVcbVxqJIMjioK0OHMSZ+gd4VrnRlHW pcYBEfEw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jLSOa-0001I3-W3; Mon, 06 Apr 2020 14:06:37 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 68F7D304121; Mon, 6 Apr 2020 16:06:34 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 54A4C2BAC7486; Mon, 6 Apr 2020 16:06:34 +0200 (CEST) Date: Mon, 6 Apr 2020 16:06:34 +0200 From: Peter Zijlstra To: Christoph Hellwig Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, jroedel@suse.de, vbabka@suse.cz, urezki@gmail.com, Thomas Gleixner , Olof Johansson , Sakari Ailus , Mauro Carvalho Chehab Subject: Re: [PATCH] mm/vmalloc: Sanitize __get_vm_area() arguments Message-ID: <20200406140634.GM20730@hirez.programming.kicks-ass.net> 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> 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: 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. > - pcmcia/electra_cf.c is actually using it for something that is not > a vmalloc address. But it is so special that I think prohibiting > to build it as module seems fine. I think I just sent you a patch along those lines ;-)