Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1328936imm; Wed, 20 Jun 2018 16:06:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLx4FZjI9YRGIjk0y0OWc9WJ6KsQWPgyJG/SwFAvOp68vlssajTppT2oN+YryQr8OCRIr5g X-Received: by 2002:a17:902:e187:: with SMTP id cd7-v6mr26083915plb.166.1529536013674; Wed, 20 Jun 2018 16:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529536013; cv=none; d=google.com; s=arc-20160816; b=bflTHO4EzR3wYx7T+HoWDE9k4E1ZoMyfgd9191KoLclg1S0SXqCdL7RXP0wkzTbLzX UonL2vnuSzy/mQy2XtAkxdeVuyUsx1SE5cquJQFNwzwU4CB9uh5u98GFBF/AleGlzTYZ cj4TD5R5rjdF662xBFWzh8exic5gkly+sx+9Ll6nAQJy+7MCsTdEYhJ/MXasoogiJ0Yp paSTeDivdVOjcj3ZVmzPkorljl274f+fCOulKMbirlk+R2RYw1A/h28NxpRd+K1cHUjh gzEspzI2Ao66CSdspsfJx0iQI319bOWRiVd7RUePDLCGwNGoguYTN19hgVTd9avT2MlW St/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=S2HCpZFP4Oe8GVuKL0bCH9cxVbaMdMNlqxOOmtqQHGE=; b=nizJ09zgi/XAcOFqUIwF6GGhkL/mbmnaSSJYYAUR5r0tbN1ki9gj5M6eVQjfi8NcHk eS52UtaKE6Vk5Kpq+/kilU0fa0Q5tXcqmdz4eM1DktSzVmnWMvxN1WL/8hC13nYpCLpW Ofxe0OzVCWfhZ0DUrbllphJU1lJnfQGX4GuiI5Uooh5Z0PFyQmrjy2Ui6KvjKkU9BZnB PrOacgtvu82xzywSLUedIKxbJM2nq9tEH+UMOttc5hRQS5bJGxXjV+Z9EgmO5elzFT/R mFHccPurgQuTtaFDqKMiU/qZDrhT7Yr2Qdv8VBkd9u+N7hcxPABGbsN0nN+llfcPfnwE 4acg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=Sp5JJf9W; dkim=fail header.i=@chromium.org header.s=google header.b=XgOZuwH3; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g17-v6si3325740pfj.283.2018.06.20.16.06.39; Wed, 20 Jun 2018 16:06:53 -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=@google.com header.s=20161025 header.b=Sp5JJf9W; dkim=fail header.i=@chromium.org header.s=google header.b=XgOZuwH3; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754252AbeFTXFz (ORCPT + 99 others); Wed, 20 Jun 2018 19:05:55 -0400 Received: from mail-yb0-f194.google.com ([209.85.213.194]:37265 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754210AbeFTXFx (ORCPT ); Wed, 20 Jun 2018 19:05:53 -0400 Received: by mail-yb0-f194.google.com with SMTP id h141-v6so486140ybg.4 for ; Wed, 20 Jun 2018 16:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=S2HCpZFP4Oe8GVuKL0bCH9cxVbaMdMNlqxOOmtqQHGE=; b=Sp5JJf9WXzZAw0QJV4nAqdQnU1jXM3r462IkBbtE8AYZ3dpO2qnEZNsKR23zFgc6IJ alxCuEUk3dWwPHVsIQRqug2RGkDlyWylee+1AWLV8WM/Me4lnGYAzTm+OuCDzoDAFKjD oAw2pL0iSM5MpntZV3jX3paFhFtH2CTea/2ufVq3G9bcBDFM3aQqBxGHGCt4tiJe3bfE UJx33kPp+vuaK8T6/8dGFibryWmqiHfa0FPIsF/MJ42hS0Q5QCFNK9nGihZwOYcQL16w 2+WHw93tXXkbs91X2RA5F3K4eU6XO+L7jjz8ORJTUeCwOEv47gQxpd20LxsgahFbVcUE wvbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=S2HCpZFP4Oe8GVuKL0bCH9cxVbaMdMNlqxOOmtqQHGE=; b=XgOZuwH3MNDhdg7NXzHjZsRIpQnbaXnzq5S0UROXf9zMS0a7pZBG5VBgWiCvJxDG0t ZK1YNTqSOcPWBLgg8475kngqmByK70X6/UXRNnmRAHRu2+EB49PG2nAMlharQgCPcF7C sqGJflhv0JRUh/w2LO8XJst7c9544rtA8EoIs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=S2HCpZFP4Oe8GVuKL0bCH9cxVbaMdMNlqxOOmtqQHGE=; b=YliHQEDgqJW2L+ML348EmiRFfTsziRC4CZWL0N3+2nVGX74q1lf7wNLyT4pWtVhjyt B259zODDHxQvtKyqV8vimKmAGQTZuvSHsYLvueCk84crVyIk3IGMsj7Fl1qwj+41HnTV IZuz2RGuddPF7h2fR5XZ625PGkVS7VFExgzaFi6uF229MAGw+wSy+qGeYsi41/kYb9VK wihQOpL64YFmkZRTu1mVA3dY+koOHcfQ2OBDMh/mSk/TW1VyT5q/h/qBNQA4xeMq/p66 rBmvCQkZbX5F1bPx0zxmajcm0XxA8UpJVS6Y+86R/7eErS31Dq3pAjGYocgrMRcvKjSS dDNQ== X-Gm-Message-State: APt69E10KYtfduVnQYJ1gBt1j04pupfVo/2XyB7aMvyU90IoJEdpFyWP WAodgaVB7aST2sdV99oxLxBgQ7b7Ip/maZX2XQnOGQ== X-Received: by 2002:a25:f81e:: with SMTP id u30-v6mr9591125ybd.343.1529535952688; Wed, 20 Jun 2018 16:05:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:d6c5:0:0:0:0:0 with HTTP; Wed, 20 Jun 2018 16:05:51 -0700 (PDT) In-Reply-To: <778b2a1b-d810-815b-0fba-8a1d191acd49@infradead.org> References: <1529532570-21765-1-git-send-email-rick.p.edgecombe@intel.com> <1529532570-21765-2-git-send-email-rick.p.edgecombe@intel.com> <12014310-19f7-dc31-d983-9c7e00c8b446@infradead.org> <778b2a1b-d810-815b-0fba-8a1d191acd49@infradead.org> From: Kees Cook Date: Wed, 20 Jun 2018 16:05:51 -0700 X-Google-Sender-Auth: On0H1ZWgqq01b3r0NyDD02gRnEo Message-ID: Subject: Re: [PATCH 1/3] vmalloc: Add __vmalloc_node_try_addr function To: Randy Dunlap Cc: Rick Edgecombe , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , X86 ML , LKML , Linux-MM , Kernel Hardening , kristen Accardi , Dave Hansen , "Van De Ven, Arjan" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 20, 2018 at 3:44 PM, Randy Dunlap wrote: > On 06/20/2018 03:35 PM, Kees Cook wrote: >> On Wed, Jun 20, 2018 at 3:16 PM, Randy Dunlap wrote: >>> On 06/20/2018 03:09 PM, Rick Edgecombe wrote: >>>> +void *__vmalloc_node_try_addr(unsigned long addr, unsigned long size, >>>> + gfp_t gfp_mask, pgprot_t prot, unsigned long vm_flags, >>>> + int node, const void *caller) >>>> +{ >>> >>> so this isn't optional, eh? You are going to force it on people because? >> >> RANDOMIZE_BASE isn't optional either. :) This improves the module >> address entropy with (what seems to be) no down-side, so yeah, I think >> it should be non-optional. :) > > In what kernel tree is RANDOMIZE_BASE not optional? Oh, sorry, I misspoke: on by default. It _is_ possible to turn it off. But patch #2 does check for RANDOMIZE_BASE, so it should work as expected, yes? Or did you want even this helper function to be compiled out without it? -Kees -- Kees Cook Pixel Security