Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp576743ybg; Tue, 28 Jul 2020 13:14:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxodVJRygw8ZPASG/6yeYPoa7HAuoqjMBy/DEQmdVTYl+GmOYojOKFB+iljL/rCufydlZWF X-Received: by 2002:a17:906:1392:: with SMTP id f18mr18943864ejc.521.1595967298470; Tue, 28 Jul 2020 13:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595967298; cv=none; d=google.com; s=arc-20160816; b=qfXmDEr2HXBiZR2bB+Vzn5LAE+HqMqpSzDMdZh/octK21S6c2/DZRf/l57ZRxowREd f1ueZDsvXpj2USxmfgnRzGzLgSoTMZB9PRgx73U02prr0Ri2WTHFO+qR7W2YMUTUS/SS Cj0+KGqYg+KOBl4nhdAOUC+wyswG5aNjn6DvQu8MqjvWUEoogxrqw2lmWVYH3GrD1dMb 95bgKc5eBEyPphUqgsNCPD7ykb1fN9jpjsO2L5kBSqqaAYEgscV5Ym1C3Vyj6FmYK8ck cYWvLHRjfibIdC4qlqQUFngOfoFHnlQrwJygPUQkSgDCFyPgs7ckH+YWPuTSvAC42tn/ yY/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GUGq9o6dBiXsIcvPN0xvh0KVFpMCLExttXK003WiTkk=; b=A3l1vq1PBBxcJOEXzemi5gHG7OnSOre4LS0uzAbfPWyiwOp/zTdD8LQ4yrDE7nv7NE yc2vmI1ScG59MAJTbWqTMNzVRgt3Px48FpA1qoKIA1JUE1YhZFx60ez5zuErL3faXz+B Ohj6LORfuaXNu1qX76hh4uLb87sgTuKA5jBIsmj+4sxXj5nfBidogY/qumBQn5FwujMn kg8EbwzpUNTiosjTirKlR5acJovu57uMHX8DURPyiImu8FwqjL0AWxa7Fx8Q9csnXLC4 pQWYd9d62zX+cv2GSOho2LXgrM6MuIhuP3pcVMnAz3II3gwvwfTRb+x2g6RFoduiVG5o 5cbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=j+jpFrFa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v2si8663281eda.484.2020.07.28.13.14.35; Tue, 28 Jul 2020 13:14:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=j+jpFrFa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728559AbgG1UNx (ORCPT + 99 others); Tue, 28 Jul 2020 16:13:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728149AbgG1UNx (ORCPT ); Tue, 28 Jul 2020 16:13:53 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1C03C061794 for ; Tue, 28 Jul 2020 13:13:52 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id u185so11621453pfu.1 for ; Tue, 28 Jul 2020 13:13:52 -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=GUGq9o6dBiXsIcvPN0xvh0KVFpMCLExttXK003WiTkk=; b=j+jpFrFaCnHHYNU23TSLdCCXdZGUSpEQRQq6fpxpu0rQT70/xTZe47+lh4YdT86wwW B4rO3L4Ha84q6uZFMH9rFByWQMwF9tqACggZMoGvQRMzRrz4YVG8yxU0fXZLqXu2wCCF fj5KPhJJyLJ0xUu5I7O1A0JdzxedcE4TqFzoY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=GUGq9o6dBiXsIcvPN0xvh0KVFpMCLExttXK003WiTkk=; b=lds8neEHD46wzBxSHtJhUXVcbYAQCchrtJKusaSuqcI+QiWGqCktsjbSdfcjqBi4K9 06spAQjWEReuCMFHSHYxl2lVwAWPzJntk0Eyq++jDLDRrUCbbcoh8CRf8aiZ4EwcE9kH gPXg8iwAYTT91mwyIp8VkXsGGCcEHyHSe+rRRm3UwzWLeUztZv/6MxneH5td6SlfmIuP f0CMIoFxugq0Or69NHknVgsJS3D8vo4111dvFt5tXsgz7+Ph2EXFQSZ9GwDaSfv/NVQq I/SbO7SN+XyCX3mefQdUmOTcQF9VpCLcAooE4RUHKb2xwDaLhiVIdVqvODZnCRxurjBT rCsw== X-Gm-Message-State: AOAM530KhS9gyazPZqmzY0RowpmQ06bt5GyyH865vWxEKxiTWiZENCA2 84VCEVIWkpgXWNWfKJ0KLpvcfA== X-Received: by 2002:a63:ee0c:: with SMTP id e12mr24290690pgi.83.1595967232539; Tue, 28 Jul 2020 13:13:52 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id w17sm18909752pge.10.2020.07.28.13.13.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2020 13:13:51 -0700 (PDT) Date: Tue, 28 Jul 2020 13:13:50 -0700 From: Kees Cook To: Arvind Sankar Cc: x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/8] x86/kaslr: Simplify process_gb_huge_pages Message-ID: <202007281313.0C95B091@keescook> References: <20200727215047.3341098-1-nivedita@alum.mit.edu> <20200727230801.3468620-7-nivedita@alum.mit.edu> <202007281225.C24B966D7@keescook> <20200728194511.GB4150860@rani.riverdale.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200728194511.GB4150860@rani.riverdale.lan> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 28, 2020 at 03:45:11PM -0400, Arvind Sankar wrote: > But the IS_ENABLED check allows the compiler to eliminate the entire > function at compile time. Ah, I thought it'd be a const false, which would do the same... -- Kees Cook