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.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 3BF93C2D0EA for ; Wed, 8 Apr 2020 16:04:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F300E206F5 for ; Wed, 8 Apr 2020 16:04:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="Sh3zQ4gu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F300E206F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8E1388E0010; Wed, 8 Apr 2020 12:04:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 86ABF8E0006; Wed, 8 Apr 2020 12:04:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 759118E0010; Wed, 8 Apr 2020 12:04:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0239.hostedemail.com [216.40.44.239]) by kanga.kvack.org (Postfix) with ESMTP id 5D9228E0006 for ; Wed, 8 Apr 2020 12:04:32 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 148F38012B2D for ; Wed, 8 Apr 2020 16:04:32 +0000 (UTC) X-FDA: 76685160384.25.hen51_7ed25a0fbb31f X-HE-Tag: hen51_7ed25a0fbb31f X-Filterd-Recvd-Size: 3793 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Wed, 8 Apr 2020 16:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=y4DQEwKwOH0MUomtnsRqkgQ3Zf9nXVZUuXJQ4PCZDK0=; b=Sh3zQ4guix8l2EQIJKZhE1Lrz yLT0fiMB+n4O0i+C7P0VPwU+ufEnLVUErGzSwIXrmptFOBuUw5czJ04XwhnQL0zdhoSy13kV43rJu 82WbcBn9fWYEgz9DrW9lJFOA+lTh5t1ChiKifhjhPOJ7P4/Dmq84NykyCcdnXtZn2v47dcQirQ6Hh a7TJcFZcA97Af/Setp/pqf+52MKYA/S2WaD26BT0wwGH5eVzoazup4gWe/wwdsUs/YWoID6yS0oXc usRQ4SJEUqRpP8Xs+UDgPVSfsJyg34vDTJaW4P5vGRyKHv3Z/mvREaNV3P4XglhN4nW7obgJ76tJA RnCdU8HGA==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:35708) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jMDAr-00075w-Kb; Wed, 08 Apr 2020 17:03:33 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1jMDAi-0001wo-US; Wed, 08 Apr 2020 17:03:24 +0100 Date: Wed, 8 Apr 2020 17:03:24 +0100 From: Russell King - ARM Linux admin 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 , Minchan Kim , Nitin Gupta , Christophe Leroy , linux-arch@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-s390@vger.kernel.org, Peter Zijlstra , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, bpf@vger.kernel.org, Robin Murphy , linux-arm-kernel@lists.infradead.org Subject: Re: decruft the vmalloc API Message-ID: <20200408160324.GS25745@shell.armlinux.org.uk> References: <20200408115926.1467567-1-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200408115926.1467567-1-hch@lst.de> 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: On Wed, Apr 08, 2020 at 01:58:58PM +0200, Christoph Hellwig wrote: > Hi all, > > Peter noticed that with some dumb luck you can toast the kernel address > space with exported vmalloc symbols. > > I used this as an opportunity to decruft the vmalloc.c API and make it > much more systematic. This also removes any chance to create vmalloc > mappings outside the designated areas or using executable permissions > from modules. Besides that it removes more than 300 lines of code. I haven't read all your patches yet. Have you tested it on 32-bit ARM, where the module area is located _below_ PAGE_OFFSET and outside of the vmalloc area? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up