Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5128306imb; Thu, 7 Mar 2019 08:20:32 -0800 (PST) X-Google-Smtp-Source: APXvYqzVeEmJNolHvZ3qTPjXvQ4VhJDM9NvH40nYsbgEGoI5FBvdOqXNxtcxeWP24SCQXo97XSkw X-Received: by 2002:a17:902:bd96:: with SMTP id q22mr13769009pls.7.1551975632504; Thu, 07 Mar 2019 08:20:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551975632; cv=none; d=google.com; s=arc-20160816; b=uwf//nDtoP65t+8NE4gTTO+WIaubqVvdXIr7qGpxB6Yn0D8M/ZzsRp5Lykr0yK3KtG ox3QEw6XJE1oSQeygICoFShU/l6K9HqM5KgAUhZcn0oeUJKPxWRLvVg3RzY4SffUFkET ZE4lnIGcQI1FafTBPZmqQhT626G8Ztu9CISJL2yAfminMCptQUexLU27d8jS+2uxLq7A bY9ETbkuXOXd+TWM+Ox8095hQh/0FphupZbibtLNttcmUO6SkEUDYXyW5KTZZqc9pzv6 YJsWN+1uF73/BwrNxTTUy3xI3U+m+VeetspdiFKMCXIWtGNkuJvi1Vq469saiwmypl2V zETg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6i5YGh5miRgmWAMHiez90Ocm0fT3Gxps/uSTnsX2yA0=; b=kzJ99SdA14EA1QJYl1+ACKMyN+tfvIc6MowMUv9kUDQbYFwCSufsTghZauDtXaCpBL sXXOurHO1d3ZBZu5giA4sSnN+XRPpgZPw4YnSNRorKELY5uSrdc3aE7/Jt74KNuNI+YC KZak+Kplg72qZgy2b1hMl79AErv9QJBPM87owHRzXLejvtt5CJJl5GEGb4+SQbc7cEL2 AFDrzch3sXotmoLlVEqs8DKjMQ6Wh+VxXL5BEi+72kzb8Z+gZmgAEsGBvvmoxPQ+gFW8 ZzI068dZyp/UQcJpaa/IFKWSInJTGKvuXF4Wx2c+MhBhZizihdXon0Zwd5QXuZfsEnIY Pusw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si4640241pla.52.2019.03.07.08.20.16; Thu, 07 Mar 2019 08:20:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726234AbfCGQT5 (ORCPT + 99 others); Thu, 7 Mar 2019 11:19:57 -0500 Received: from mga12.intel.com ([192.55.52.136]:22766 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbfCGQT4 (ORCPT ); Thu, 7 Mar 2019 11:19:56 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2019 08:19:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,451,1544515200"; d="scan'208";a="120467065" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.137]) by orsmga007.jf.intel.com with ESMTP; 07 Mar 2019 08:19:55 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id DFE713013CC; Thu, 7 Mar 2019 08:19:55 -0800 (PST) Date: Thu, 7 Mar 2019 08:19:55 -0800 From: Andi Kleen To: Arnd Bergmann Cc: linux-fsdevel@vger.kernel.org, Nick Desaulniers , Alexander Viro , Andrew Morton , Christoph Hellwig , Eric Dumazet , "Darrick J. Wong" , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs/select: avoid clang stack usage warning Message-ID: <20190307161955.GD7535@tassilo.jf.intel.com> References: <20190307090146.1874906-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190307090146.1874906-1-arnd@arndb.de> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 07, 2019 at 10:01:36AM +0100, Arnd Bergmann wrote: > The select() implementation is carefully tuned to put a sensible amount > of data on the stack for holding a copy of the user space fd_set, > but not too large to risk overflowing the kernel stack. > > When building a 32-bit kernel with clang, we need a little more space > than with gcc, which often triggers a warning: > > fs/select.c:619:5: error: stack frame size of 1048 bytes in function 'core_sys_select' [-Werror,-Wframe-larger-than=] > int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp, > > I experimentally found that for 32-bit ARM, reducing the maximum > stack usage by 64 bytes keeps us reliably under the warning limit > again. Could just use 768 bytes unconditionally. I doubt a few bytes more or less will make too much difference. Other than that Reviewed-by: Andi Kleen -Andi