No description
Find a file
Arnd Bergmann 25d99f7baa fs/select: rework stack allocation hack for clang
[ Upstream commit ddb9fd7a54 ]

A while ago, we changed the way that select() and poll() preallocate
a temporary buffer just under the size of the static warning limit of
1024 bytes, as clang was frequently going slightly above that limit.

The warnings have recently returned and I took another look. As it turns
out, clang is not actually inherently worse at reserving stack space,
it just happens to inline do_select() into core_sys_select(), while gcc
never inlines it.

Annotate do_select() to never be inlined and in turn remove the special
case for the allocation size. This should give the same behavior for
both clang and gcc all the time and once more avoids those warnings.

Fixes: ad312f95d4 ("fs/select: avoid clang stack usage warning")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240216202352.2492798-1-arnd@kernel.org
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:21:15 -04:00
arch s390/dasd: add autoquiesce feature 2024-03-26 18:21:14 -04:00
block block: sed-opal: handle empty atoms when parsing response 2024-03-26 18:21:13 -04:00
certs
crypto
Documentation
drivers nbd: null check for nla_nest_start 2024-03-26 18:21:14 -04:00
fs fs/select: rework stack allocation hack for clang 2024-03-26 18:21:15 -04:00
include fs/select: rework stack allocation hack for clang 2024-03-26 18:21:15 -04:00
init
io_uring
ipc
kernel
lib
LICENSES
mm
net Bluetooth: rfcomm: Fix null-ptr-deref in rfcomm_check_security 2024-03-26 18:21:13 -04:00
samples
scripts gen_compile_commands: fix invalid escape sequence warning 2024-03-26 18:21:12 -04:00
security
sound ASoC: wm8962: Fix up incorrect error message in wm8962_set_fll 2024-03-26 18:21:14 -04:00
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.