From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752588AbcD3UOy (ORCPT ); Sat, 30 Apr 2016 16:14:54 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37555 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751865AbcD3UOx (ORCPT ); Sat, 30 Apr 2016 16:14:53 -0400 Date: Sat, 30 Apr 2016 21:14:49 +0100 From: Matt Fleming To: Arnd Bergmann Cc: "Compostella, Jeremy" , Ingo Molnar , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] efibc: avoid stack overflow warning Message-ID: <20160430201449.GL2839@codeblueprint.co.uk> References: <1461952128-2135409-1-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461952128-2135409-1-git-send-email-arnd@arndb.de> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Apr, at 07:48:31PM, Arnd Bergmann wrote: > gcc complains about a newly added file for the EFI Bootloader Control: > > drivers/firmware/efi/efibc.c: In function 'efibc_set_variable': > drivers/firmware/efi/efibc.c:53:1: error: the frame size of 2272 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] > > The problem is the declaration of a local variable of type > struct efivar_entry, which is by itself larger than the warning > limit of 1024 bytes. > > We know that the reboot notifiers are not called from a deep stack, > so this is not an actual bug, but we should still try to rework > the code to avoid the warning. We also know that reboot notifiers > are never run concurrently on multiple CPUs, so there is no problem > in just making the variable 'static'. I assumed reboot notifiers were guaranteed to be non-concurrent too but having dug into the callers of kernel_reboot(), I couldn't find any kind of mutual exclusion. How/where is this guaranteed?