Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp532977ybb; Wed, 8 Apr 2020 05:02:49 -0700 (PDT) X-Google-Smtp-Source: APiQypL5sA5iH/HHpvotmGsBKzFu9dmkz2AY6rLip1bhB5nbPm+MaEicYkW8CXODbWqfCGkJuX6y X-Received: by 2002:a9d:171a:: with SMTP id i26mr5505814ota.170.1586347368881; Wed, 08 Apr 2020 05:02:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586347368; cv=none; d=google.com; s=arc-20160816; b=JWR293KNLtKGn+lHEsuEjhtAitHzCsqWSOTQnEM21QbNonLcWJQnbTzh22Jue3vWwE ku+22fokijRWGzy8MFKx/JpijyJyj6FX0mgxIM+FxmVezzjI+dkwstm2SQboBTtcJfCw 0/jkUzLextq3/4LYYfPlN4kVKw9wbGzQBvSADMuIKgBPPHmCYP2vkiyad8KiRFDmguQE DGbY9+sIId7+Whqv8LPIa2adA0C/T9kI+7bqVJGnM63R47oKPFS/A+3A0qIPMmjllqdO XqzOgUCtsF6NljfGqCyz6LDKGEtZWPvJ16I144DYEUiK869Xj0CffuKzS0XNJ8RU4T2G 46pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=D4AVwc5A5TrYE1qiofwcyRs9OblgHBTIRND69C8WOt0=; b=wWkJUjnPPASnxXMEnQKz+jL20hwbNBMstMBPPtRuiCRgfBKO75J6773gOvUuYLpR5o 9STV1m5dTsJQefNjkVlNvCh55gTQllRNfuOzqI8SZWh83rS96sSFurJJ6s8Zz4DTsp/j eKUxhS7L7iI1zNM6pTslwQUsT+Gh5kg/5olsQEuuqI35ntiafYsaWT9DWgmQfI48gEDg D4B18i8syTx7iuh8LAXJt8Qil6AdACsZxjAuIhaXvMs7eDOaNlGDaZxH8rHbsJHcVYQx SudcB8Fwjs19++qifwGxQvLAmr/LVhP9pQk+BeFirvIZNc8oYlNahFdEAByccKuA7n65 EtMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=QxIpR9Yc; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si2360525ota.143.2020.04.08.05.02.30; Wed, 08 Apr 2020 05:02:48 -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 header.i=@infradead.org header.s=bombadil.20170209 header.b=QxIpR9Yc; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728633AbgDHL7x (ORCPT + 99 others); Wed, 8 Apr 2020 07:59:53 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:45930 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726594AbgDHL7w (ORCPT ); Wed, 8 Apr 2020 07:59:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=D4AVwc5A5TrYE1qiofwcyRs9OblgHBTIRND69C8WOt0=; b=QxIpR9YcW4zlQv0D1PVx1O4w+e 6AoH6P9DiQVnTVyvjUFva7uacxcWbVMzi8tT0sThE3M71M9cEiBynkFmchCvGJciEPmeo3/uQvlYR wtFUjR78EFF5ZyjMMkVUsanIFNIoeODac3xPuGtXF4l5LbiIBWKxhIDjLLLc1Q/GLriiDWQze3R+Q HzQxNu0emx30OMndXqf/TY05OZsMHUiUKaWMhp5bxRFdmw1Sri71kup0Kj2ZHNawF6DygdV6PDlKu t+Fxg7riz+HXeU7gVyNlLyFQTkfoS6xNo8kPMIJc0+vSNMB1EinNIuq4wvueXomTQU22Nkr4yCLgo zR0nVTaA==; Received: from [2001:4bb8:180:5765:65b6:f11e:f109:b151] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jM9Mf-0001Xh-5a; Wed, 08 Apr 2020 11:59:29 +0000 From: Christoph Hellwig To: 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 Cc: 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 Subject: decruft the vmalloc API Date: Wed, 8 Apr 2020 13:58:58 +0200 Message-Id: <20200408115926.1467567-1-hch@lst.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. A git tree is also available here: git://git.infradead.org/users/hch/misc.git sanitize-vmalloc-api Gitweb: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/sanitize-vmalloc-api