From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:36718 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935072AbeCHLgB (ORCPT ); Thu, 8 Mar 2018 06:36:01 -0500 Date: Thu, 8 Mar 2018 12:33:33 +0100 From: David Sterba To: Kees Cook Cc: Andrew Morton , "David S. Miller" , gustavo@embeddedor.com, Chris Mason , Josef Bacik , Sergey Senozhatsky , rostedt@goodmis.org, Peter Zijlstra , Randy Dunlap , Ingo Molnar , Pantelis Antoniou , Thomas Gleixner , Hideaki YOSHIFUJI , Andy Shevchenko , kernel-hardening@lists.openwall.com, corbet@lwn.net, Ian Abbott , Alexey Kuznetsov , Josh Poimboeuf , Masahiro Yamada , Petr Mladek , Borislav Petkov , "Tobin C. Harding" , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 3/3] btrfs: tree-checker: Avoid accidental stack VLA Message-ID: <20180308113333.GM23693@suse.cz> Reply-To: dsterba@suse.cz References: <1520479847-39174-1-git-send-email-keescook@chromium.org> <1520479847-39174-4-git-send-email-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1520479847-39174-4-git-send-email-keescook@chromium.org> Sender: linux-btrfs-owner@vger.kernel.org List-ID: On Wed, Mar 07, 2018 at 07:30:47PM -0800, Kees Cook wrote: > In the quest to remove all stack VLAs from the kernel[1], this refactors > the stack array size calculation to avoid using max(), which makes the > compiler think the size isn't fixed. > > [1] https://lkml.org/lkml/2018/3/7/621 > > Signed-off-by: Kees Cook Acked-by: David Sterba for whatever name you decide for the max macro. From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Sterba Subject: Re: [PATCH 3/3] btrfs: tree-checker: Avoid accidental stack VLA Date: Thu, 8 Mar 2018 12:33:33 +0100 Message-ID: <20180308113333.GM23693@suse.cz> References: <1520479847-39174-1-git-send-email-keescook@chromium.org> <1520479847-39174-4-git-send-email-keescook@chromium.org> Reply-To: dsterba@suse.cz Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , "David S. Miller" , gustavo@embeddedor.com, Chris Mason , Josef Bacik , Sergey Senozhatsky , rostedt@goodmis.org, Peter Zijlstra , Randy Dunlap , Ingo Molnar , Pantelis Antoniou , Thomas Gleixner , Hideaki YOSHIFUJI , Andy Shevchenko , kernel-hardening@lists.openwall.com, corbet@lwn.net, Ian Abbott , Alexey Kuznetsov , Josh Poimboeuf , Masahiro Yamada , Petr Mladek Return-path: Content-Disposition: inline In-Reply-To: <1520479847-39174-4-git-send-email-keescook@chromium.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Wed, Mar 07, 2018 at 07:30:47PM -0800, Kees Cook wrote: > In the quest to remove all stack VLAs from the kernel[1], this refactors > the stack array size calculation to avoid using max(), which makes the > compiler think the size isn't fixed. > > [1] https://lkml.org/lkml/2018/3/7/621 > > Signed-off-by: Kees Cook Acked-by: David Sterba for whatever name you decide for the max macro.