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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 D8758C433E0 for ; Mon, 15 Mar 2021 17:53:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5740664EED for ; Mon, 15 Mar 2021 17:53:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5740664EED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BA27C6B0036; Mon, 15 Mar 2021 13:53:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B52CB6B006C; Mon, 15 Mar 2021 13:53:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9D12C6B0070; Mon, 15 Mar 2021 13:53:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0239.hostedemail.com [216.40.44.239]) by kanga.kvack.org (Postfix) with ESMTP id 7B8E56B0036 for ; Mon, 15 Mar 2021 13:53:18 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 25BFB689F for ; Mon, 15 Mar 2021 17:53:18 +0000 (UTC) X-FDA: 77922855276.19.D52A36C Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by imf06.hostedemail.com (Postfix) with ESMTP id 882D2C060A53 for ; Mon, 15 Mar 2021 17:28:26 +0000 (UTC) Received: by mail-pg1-f178.google.com with SMTP id n10so20866103pgl.10 for ; Mon, 15 Mar 2021 10:28:26 -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=5VwZiNoaOawmugGkW3BliGlJHY74MeBZt4r2sMGeVQQ=; b=l7HPfSehLhWpD22iEktgmCx0tfo9/0CXqzTE6AuX6c3/5225P6lXKuk1wJ6XO5mJGB j9LyL7+uH01vGynQcMUX/DSW3aPwjvKsnHDabzLeL8nPJ7VF7NQPm1XuwiOMzrWuKnoG LqkuIan1qCRQ55XWhGn9uzB0DXbKts3oUufc8= 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=5VwZiNoaOawmugGkW3BliGlJHY74MeBZt4r2sMGeVQQ=; b=l7szs8Z2vodtE1dkTpTsi963cBIVN6ldEpVfkTAzaGWbnu1bQdqzgQ0c0DSjGtYyC9 qAgvKgUpIOUHmJYM3P0oI189K4GuOfYImPTrn66tcNN4Z/iIJzbglBiJ5T7ARCDSH8eN e4gKn5n6z9rVQ8zNBS95Il+TexlcuZ6EjqF+ty0AJDgq+2TgoMl7OE3lCLad+WXM4ZKl CITLqx1Z5wFVwNv1/hTUCe20opFUyQ35XLByRGq93PCBMXYlQ6bxUG+8RuhqLsmgWhHy 6XkOYyB3KEsyTnxpMeqHq57U2DgouCrVZlA7aJ9Reo9LqxdB1etHw1/zqXUERQ7Vl4AN ElqA== X-Gm-Message-State: AOAM531o7/O5P1lmiJOBkkgEwsF7l7xEDT+P1W89VPIq/Wl5Ohe1jmJc DLhI9ZkeX7Ki78R3Lcc4d1FBOQ== X-Google-Smtp-Source: ABdhPJxjnHWrPSehNTyXbsunhO6js/f/y7LcLoTrzXtGC7Of1Nx7WsQ3+07t7nraq6yi5lTJdFnVmQ== X-Received: by 2002:a62:3847:0:b029:202:ad05:4476 with SMTP id f68-20020a6238470000b0290202ad054476mr10941066pfa.67.1615829305471; Mon, 15 Mar 2021 10:28:25 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id n9sm205492pjq.38.2021.03.15.10.28.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 10:28:24 -0700 (PDT) Date: Mon, 15 Mar 2021 10:28:23 -0700 From: Kees Cook To: Andrew Morton Cc: Thomas Gleixner , stable@vger.kernel.org, Elena Reshetova , x86@kernel.org, Andy Lutomirski , Peter Zijlstra , Catalin Marinas , Will Deacon , Mark Rutland , Alexander Potapenko , Alexander Popov , Ard Biesheuvel , Jann Horn , kernel-hardening@lists.openwall.com, linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Vlastimil Babka , David Hildenbrand , Mike Rapoport , Jonathan Corbet , Randy Dunlap Subject: Re: [PATCH v5 1/7] mm: Restore init_on_* static branch defaults Message-ID: <202103151027.88B63D0@keescook> References: <20210309214301.678739-1-keescook@chromium.org> <20210309214301.678739-2-keescook@chromium.org> <20210310155602.e005171dbecbc0be442f8aad@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210310155602.e005171dbecbc0be442f8aad@linux-foundation.org> X-Stat-Signature: py7xoxxnaarg39m5p5tf979f37yhmrbc X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 882D2C060A53 Received-SPF: none (chromium.org>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from=""; helo=mail-pg1-f178.google.com; client-ip=209.85.215.178 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615829306-86993 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 Wed, Mar 10, 2021 at 03:56:02PM -0800, Andrew Morton wrote: > On Tue, 9 Mar 2021 13:42:55 -0800 Kees Cook wrote: > > > Choosing the initial state of static branches changes the assembly layout > > (if the condition is expected to be likely, inline, or unlikely, out of > > line via a jump). The _TRUE/_FALSE defines for CONFIG_INIT_ON_*_DEFAULT_ON > > were accidentally removed. These need to stay so that the CONFIG controls > > the pessimization of the resulting static branch NOP/JMP locations. > > Changelog doesn't really explain why anyone would want to apply this > patch. This is especially important for -stable patches. > > IOW, what is the user visible effect of the bug? Yeah, that's a good point, and in writing more details I decided this wasn't actually worth a stable patch, and should just get folded into later patches. Thanks for the sanity-check! -- Kees Cook