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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 D2AC8C433E6 for ; Wed, 10 Mar 2021 23:56:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A38D64FD5 for ; Wed, 10 Mar 2021 23:56:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229485AbhCJX4T (ORCPT ); Wed, 10 Mar 2021 18:56:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:43490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbhCJX4E (ORCPT ); Wed, 10 Mar 2021 18:56:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 189DF64FC5; Wed, 10 Mar 2021 23:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1615420564; bh=UVXuRCiWw34IqJcMP9Uv9Jas9cv4G39lAIuBiEicriY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=emLhvYekhyBaZ2AfJJbUlNuRJXxCMIRvvMmTGCMfmtu3W4qCwgfn4RGHsYAbmvtml Fupl3RPBbQ9Wx7pIbmVfJT+Tavgxx7GGU17KfvQKSGsA5QPUffBps21tzjTWiNUUnC eA9ut0KtOpOisfHMMlTqywPwMQWyn8dim1tOd3TE= Date: Wed, 10 Mar 2021 15:56:02 -0800 From: Andrew Morton To: Kees Cook 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: <20210310155602.e005171dbecbc0be442f8aad@linux-foundation.org> In-Reply-To: <20210309214301.678739-2-keescook@chromium.org> References: <20210309214301.678739-1-keescook@chromium.org> <20210309214301.678739-2-keescook@chromium.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 37FF0C433E0 for ; Wed, 10 Mar 2021 23:57:35 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B2AD064FA9 for ; Wed, 10 Mar 2021 23:57:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2AD064FA9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Mime-Version:References:In-Reply-To:Message-Id: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uh66LoL6EpZnEwj5UNcEt7BYiXnIzx+3Twu7fApk5Yw=; b=YB2TfczeKOo4izpU9bMOpJ4v0 kWo/Y7urLDV2WF2Dm8knsDcELRLZID/nL4NCorRbxq62io/7Y+HB3uo5eUOJgsB86Sd4+/7Zhspwu mDVc+z6um1Md77f1R4KFtgCCoMzAQu68wIap07csryPUUSUUToFv2zMfMcRBxehPS0o6nKOL3Y78N MmyMpNZRqb0TTPbR60wS3h0UUPyTm4C5/x9iCBJ7KTvyFDufRryLRDQjCJRYt4u1+mgiprijl+zoI LTAHZy2jRwpz7hX8GZO+qmd68KgmtjSSG5UYOhufPWjvJKHuOV99VfsXRMnNxCNKZAlQVgVGL52O/ Trq1GJdOw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lK8gV-0081kp-5J; Wed, 10 Mar 2021 23:56:11 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lK8gQ-0081jU-4L for linux-arm-kernel@lists.infradead.org; Wed, 10 Mar 2021 23:56:08 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 189DF64FC5; Wed, 10 Mar 2021 23:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1615420564; bh=UVXuRCiWw34IqJcMP9Uv9Jas9cv4G39lAIuBiEicriY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=emLhvYekhyBaZ2AfJJbUlNuRJXxCMIRvvMmTGCMfmtu3W4qCwgfn4RGHsYAbmvtml Fupl3RPBbQ9Wx7pIbmVfJT+Tavgxx7GGU17KfvQKSGsA5QPUffBps21tzjTWiNUUnC eA9ut0KtOpOisfHMMlTqywPwMQWyn8dim1tOd3TE= Date: Wed, 10 Mar 2021 15:56:02 -0800 From: Andrew Morton To: Kees Cook 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: <20210310155602.e005171dbecbc0be442f8aad@linux-foundation.org> In-Reply-To: <20210309214301.678739-2-keescook@chromium.org> References: <20210309214301.678739-1-keescook@chromium.org> <20210309214301.678739-2-keescook@chromium.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210310_235606_889600_7D340E3E X-CRM114-Status: GOOD ( 11.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel