Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1338007imm; Wed, 20 Jun 2018 16:18:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIH1IJJ0s8XMMz29jRLXvjmWcngNHDGIVC8ymNsmC2o0jvDzIOPbDAjqia8oa7lwpD06QR8 X-Received: by 2002:a17:902:c3:: with SMTP id a61-v6mr25977632pla.149.1529536721166; Wed, 20 Jun 2018 16:18:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529536721; cv=none; d=google.com; s=arc-20160816; b=wIxhFy+BuIMp5RoxZcF7g86WKrG1kFXcUrDfYnZJSGLMpZFln0RC0BVpIMCXMpDwe6 DhDCZWhliozHOsdB0TI0upsz8rXhFjTTTmWUczPOpZgl8NIBagvCXCGBy/Z0oMScTFgg CaqWYOynBoXpKBYqIFd03ANaYYOMb/tgO69neiEnjPJU+VuVedGGZiICSELCc0Ftstcl nUQ8h5P2EhE+yw8TzldNLJFfcALvawhgfOPuxRQj/FKF7TVtLEyIAceJHAegQGyhBEEY fXXQrLb6iw/JBFTEdZotDN2ALj7fhm1XJIwNi2MIP3JG4GcViuOKPwJurpMo8XKH/VFU rtrw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=Pgha93p1uk2gLQMqPYJdb+ZNaSI5Au9E4sjwqK/pDAQ=; b=rpM3qUWdjPQ2YCnbo/L76Q40dt+qJST3/IrXqZLkz9YOfG0HREsatAXxxYb8YyvSha gZW+gXei5Z7EDmwP17uj4Gbxcka9CSSnXsPRS8lB/dzAQ9S4Ia4jb7gWIP4yK4PK2alC T/Q03IUUqCkMPHIGU1SNKSwEITkpVVd9aP7Hp2SWgnyCSBo85jEnIbjvJdYQspFdIMNn CDiil+WR19BiaOSNJavJTXppeUR6T9TStPib1ArKMQex/AjAY8JRqnG41KvWs4r1vi0R 3NiOvEwY9hJoznLnw8kLHGunu1oeXyQ7IJ6QV4f+/gEE63cZFIUuJSiezARPWSVT4Mem bjHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PgyJSmpz; 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 v72-v6si3325789pfa.103.2018.06.20.16.18.27; Wed, 20 Jun 2018 16:18:41 -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=PgyJSmpz; 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 S1754291AbeFTXRB (ORCPT + 99 others); Wed, 20 Jun 2018 19:17:01 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58590 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932154AbeFTXQs (ORCPT ); Wed, 20 Jun 2018 19:16:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To: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=Pgha93p1uk2gLQMqPYJdb+ZNaSI5Au9E4sjwqK/pDAQ=; b=PgyJSmpzAHUCoygydXZ48r/ec pvIpanSATyrtwL7kNdtHUO1y8CPjvuERLCbalMEXwR5mDE8gRA/lxa066ocAIn+tdpo9WGeILlFpt xuo6PN39q93jgnzM7AHJEVbpZTFOrq0qybMau/LkxQ6LWnjW2rJokcM9uLnVSSXtw6ODvSbLE7yPt MctszFhWibhMVSJhvMwRHY81ZGa+/5NzYsmGPV0EAc2xgheUB6SmpXu77/IjZ0zacFGWWw2IwaqJ7 LgqRJYhz3/AqwDus2Kouz1zDS/oAw7rqDmE+Zk9vfkK/Bbdp2r2TsmgZySswP1/MX3aHAk/xOXE37 ccGKAmprw==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=dragon.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVmLE-0003kB-8M; Wed, 20 Jun 2018 23:16:44 +0000 Subject: Re: [PATCH 1/3] vmalloc: Add __vmalloc_node_try_addr function To: Kees Cook 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" 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: Randy Dunlap Message-ID: Date: Wed, 20 Jun 2018 16:16:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/20/2018 04:05 PM, Kees Cook wrote: > 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? Thanks, I missed it. :( Looks fine. -- ~Randy