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=-11.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 4CB2DC433F5 for ; Thu, 16 Sep 2021 15:57:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EC6E361241 for ; Thu, 16 Sep 2021 15:57:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EC6E361241 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 3931794000A; Thu, 16 Sep 2021 11:57:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 31B14940007; Thu, 16 Sep 2021 11:57:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1E25B94000A; Thu, 16 Sep 2021 11:57:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0236.hostedemail.com [216.40.44.236]) by kanga.kvack.org (Postfix) with ESMTP id 0B8EF940007 for ; Thu, 16 Sep 2021 11:57:40 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 9CC25181E7280 for ; Thu, 16 Sep 2021 15:57:39 +0000 (UTC) X-FDA: 78593891838.29.1B551E1 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by imf21.hostedemail.com (Postfix) with ESMTP id 456ADD02F847 for ; Thu, 16 Sep 2021 15:57:39 +0000 (UTC) Received: by mail-pl1-f174.google.com with SMTP id o8so4178430pll.1 for ; Thu, 16 Sep 2021 08:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=YzYJY52UAh/68nWSTrc1cEM4dT+Du49SY61AqvqxQpU=; b=O58e3qgZ8dyXNRM/gKLU7fYRgs3sjT3xnnFIVfnia5H6Zxeq8Ihc+x6ga3e2J3iyYc /yXwrr04UadVscFde8d5CBw4piYrq7RCyQbTdlLt3r5zSLpC4XPKi1Uk8yIjlucHfagI 5mGgFxHLryZnc7BeuYIEL8haNvClygrXclyvg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=YzYJY52UAh/68nWSTrc1cEM4dT+Du49SY61AqvqxQpU=; b=6O99kL29nmMul5/LAolhc6SqYGxB+R8b3Bfa9zljb9iBA/bo5A3MrSbhuWCcacU7Og MQhbpYxj89Q4JrPjkESTIlIouy5nz+9P4e9rHS8iE+8VnhjXFXhAL3rfMGAfny08dphP C5g/xla6nUiSPrKzSXRw50VovyUHCLdTVtQfUoeiPgvrFkbrQcMxqVwLCGz0TEbLd+nm 5Hyf3K+HUHh0yEzyy36dJhf58MacKBJ/Cr+J6gi1H4oJH+bgoA4OE+QpbYAlsvz9NjBE DiF9RAwJ6WOFoECgfYK8o1DNlCcQIrNbn+0oxrk2sLHOE7MmGU2DRAM1sLFUrN7Hw81o qRCg== X-Gm-Message-State: AOAM532v5Dk+wJiJtPkPz4sYoW3QuzboaErCn+5cdu1I77cXuGxjGptQ TjYlF/3Ps4yAAag2XltuwxwjhA== X-Google-Smtp-Source: ABdhPJxc4shLxxd4Y4gTNs087vJVz9P+5MpxZOASi22uTcRH3jYHi8noXC19Jr/6FVVVVN+AZ1ZuSg== X-Received: by 2002:a17:902:c612:b0:13c:9801:a336 with SMTP id r18-20020a170902c61200b0013c9801a336mr5417273plr.27.1631807858140; Thu, 16 Sep 2021 08:57:38 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id i8sm3447580pfo.117.2021.09.16.08.57.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 08:57:37 -0700 (PDT) Date: Thu, 16 Sep 2021 08:57:36 -0700 From: Kees Cook To: Peter Zijlstra Cc: Andrew Morton , Christoph Hellwig , Will Deacon , andreyknvl@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Mel Gorman Subject: Re: [PATCH] mm/vmalloc: Don't allow VM_NO_GUARD on vmap() Message-ID: <202109160857.8F4AAE1A19@keescook> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 456ADD02F847 X-Stat-Signature: jak99xfa9i86it58fpzdd4s9sjz8pjyu Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=O58e3qgZ; spf=pass (imf21.hostedemail.com: domain of keescook@chromium.org designates 209.85.214.174 as permitted sender) smtp.mailfrom=keescook@chromium.org; dmarc=pass (policy=none) header.from=chromium.org X-HE-Tag: 1631807859-340519 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Sep 16, 2021 at 12:41:56PM +0200, Peter Zijlstra wrote: > > The vmalloc guard pages are added on top of each allocation, thereby > isolating any two allocations from one another. The top guard of the > lower allocation is the bottom guard guard of the higher allocation > etc. > > Therefore VM_NO_GUARD is dangerous; it breaks the basic premise of > isolating separate allocations. > > There are only two in-tree users of this flag, neither of which use it > through the exported interface. Ensure it stays this way. > > Signed-off-by: Peter Zijlstra (Intel) Yes, please. :) Acked-by: Kees Cook -- Kees Cook