Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp893281ybb; Wed, 8 Apr 2020 11:57:52 -0700 (PDT) X-Google-Smtp-Source: APiQypI8iQh2c/4awCreU18QgBQpKLo7EqyWE67oWWjK9/VIyL6DhWMo5D+UuANb+P/xa8zgqiN7 X-Received: by 2002:a9d:3a1:: with SMTP id f30mr6595351otf.215.1586372272071; Wed, 08 Apr 2020 11:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586372272; cv=none; d=google.com; s=arc-20160816; b=Ym9l0CMxxubWzUjb+a8+YmUIiQ75SsENAF5tVSte52aT3Jv3920HGHKuec5ZLvsBi3 uXVb7bnlHPqRcIfexeWxlHwp4J8qirfCR6SAz9dQ0LJUXofVpGJX5Z4bZjiDTPy6mxAG ynEPz2f1NXcmyYo8tRYI8wtWznpgOVR9uMhtb+VTYIetxctA4Zb14Ncftdi9J6nkKipL 3ciW5BFG3gNQgIYtjiztR772QBwfyIzZZJJd8W1NVV41d8+/ezENWSxei+AY8CN0DiGC 27J3RtKcptJkGm1GS93PLUZ9WCZrrFy81pj6JlOdoh8cjHPMPQAwKRVLigbU76BPKvl/ +6WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=y4DQEwKwOH0MUomtnsRqkgQ3Zf9nXVZUuXJQ4PCZDK0=; b=FtCWuvDhnx00Xz8REBO69HSFxwGupmr2Fa1OkGyIvcPOng/XSnIUp36jktF7vkq1WU 25RYz6rPLOwtVnoeHDqHMsUKpZvwOWBnnTBJ8rmIxp1GUksCO/SGicUqpgdDoYBMbENJ LI5lC+ezcqELvHd6+QY+P4Z1wu3EjWX1rOpmI4AGij7lw0ZJbxfst/kCkEZ8rJQERwkV 5to67hnKkaxBo02OoIQgeb3d7Wb4WLvM51b8psTYm6fT5LF/MMKBW0wW7s2uaB9mu1Sv 7V36i9MqShaBKbfo0D4ge47S3ZC31VlRjSMlVOPSqmFPtUdPyDg9YZpa1kDMUR8bqY8w FkEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=Sh3zQ4gu; 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=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si2765261ota.143.2020.04.08.11.57.39; Wed, 08 Apr 2020 11:57:52 -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 (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=Sh3zQ4gu; 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=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730126AbgDHQEK (ORCPT + 99 others); Wed, 8 Apr 2020 12:04:10 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:58758 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729686AbgDHQEK (ORCPT ); Wed, 8 Apr 2020 12:04:10 -0400 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) 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: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