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=-0.6 required=3.0 tests=DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=ham 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 3F1A6C43140 for ; Wed, 20 Jun 2018 23:17:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9BDB20875 for ; Wed, 20 Jun 2018 23:17:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="PgyJSmpz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E9BDB20875 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754299AbeFTXRB (ORCPT ); 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