Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752229AbeAEQlH (ORCPT + 1 other); Fri, 5 Jan 2018 11:41:07 -0500 Received: from mail-it0-f47.google.com ([209.85.214.47]:37660 "EHLO mail-it0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751609AbeAEQlF (ORCPT ); Fri, 5 Jan 2018 11:41:05 -0500 X-Google-Smtp-Source: ACJfBosrOqAfCMBwiGtzUe/0oEDQXZIBVTcZBi5IHi+BpdUmkQzQ76DOIV2alU001DwAoyjF3VTbnw== Subject: Re: [PATCH] DAC960: split up ioctl function to reduce stack size To: Arnd Bergmann Cc: Kees Cook , linux-kernel@vger.kernel.org References: <20171211121131.3921009-1-arnd@arndb.de> From: Jens Axboe Message-ID: <4deb8455-a133-5fa5-0219-74323c1fdc28@kernel.dk> Date: Fri, 5 Jan 2018 09:41:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Thunderbird/57.0 MIME-Version: 1.0 In-Reply-To: <20171211121131.3921009-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 12/11/17 5:11 AM, Arnd Bergmann wrote: > When CONFIG_KASAN is set, all the local variables in this function are > allocated on the stack together, leading to a warning about possible > kernel stack overflow: > > drivers/block/DAC960.c: In function 'DAC960_gam_ioctl': > drivers/block/DAC960.c:7061:1: error: the frame size of 2240 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] > > By splitting up the function into smaller chunks, we can avoid that and > make the code slightly more readable at the same time. The coding style > in this file is completely nonstandard, and I chose to not touch that > at all, leaving the unconventional intendation unchanged to make it > easier to review the diff. Applied, thanks Arnd. -- Jens Axboe