Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932670AbdHVL5P (ORCPT ); Tue, 22 Aug 2017 07:57:15 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:33853 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932546AbdHVL5N (ORCPT ); Tue, 22 Aug 2017 07:57:13 -0400 MIME-Version: 1.0 In-Reply-To: <20170822210849.0edb91cc@kryten> References: <20170726185219.GA57833@beast> <20170801120438.1582336-1-arnd@arndb.de> <20170822210849.0edb91cc@kryten> From: Arnd Bergmann Date: Tue, 22 Aug 2017 13:57:12 +0200 X-Google-Sender-Auth: IBzIliibF-FjwXnyWsUJlewBPjc Message-ID: Subject: Re: [PATCH 1/2] ext4: fix warning about stack corruption To: Anton Blanchard Cc: "Theodore Ts'o" , Andreas Dilger , Kees Cook , Andrew Morton , Jan Kara , Chandan Rajendra , linux-ext4@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 679 Lines: 16 On Tue, Aug 22, 2017 at 1:08 PM, Anton Blanchard wrote: > Hi Arnd, >> >> Note that while clang won't allow certain kinds of variable-length >> arrays in structures, this particular instance is fine, as the array >> is at the end of the structure, and the size is strictly bounded. > > Unfortunately it doesn't appear to work, at least with ppc64le clang: > > fs/ext4/mballoc.c:2303:17: error: fields must have a constant size: 'variable length array in structure' extension will never be supported > ext4_grpblk_t counters[blocksize_bits + 2]; My fix for this is in the ext4/dev branch in linux-next, I hope it still makes it into v4.13. Arnd