Go to file
Linus Torvalds eaeb85d649 gcc-10: disable 'restrict' warning for now
commit adc7192096 upstream.

gcc-10 now warns about passing aliasing pointers to functions that take
restricted pointers.

That's actually a great warning, and if we ever start using 'restrict'
in the kernel, it might be quite useful.  But right now we don't, and it
turns out that the only thing this warns about is an idiom where we have
declared a few functions to be "printf-like" (which seems to make gcc
pick up the restricted pointer thing), and then we print to the same
buffer that we also use as an input.

And people do that as an odd concatenation pattern, with code like this:

    #define sysfs_show_gen_prop(buffer, fmt, ...) \
        snprintf(buffer, PAGE_SIZE, "%s"fmt, buffer, __VA_ARGS__)

where we have 'buffer' as both the destination of the final result, and
as the initial argument.

Yes, it's a bit questionable.  And outside of the kernel, people do have
standard declarations like

    int snprintf( char *restrict buffer, size_t bufsz,
                  const char *restrict format, ... );

where that output buffer is marked as a restrict pointer that cannot
alias with any other arguments.

But in the context of the kernel, that 'use snprintf() to concatenate to
the end result' does work, and the pattern shows up in multiple places.
And we have not marked our own version of snprintf() as taking restrict
pointers, so the warning is incorrect for now, and gcc picks it up on
its own.

If we do start using 'restrict' in the kernel (and it might be a good
idea if people find places where it matters), we'll need to figure out
how to avoid this issue for snprintf and friends.  But in the meantime,
this warning is not useful.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-20 08:17:11 +02:00
Documentation ALSA: doc: Document PC Beep Hidden Register on Realtek ALC256 2020-04-24 08:00:35 +02:00
arch x86/entry/64: Fix unwind hints in register clearing code 2020-05-20 08:17:08 +02:00
block block, bfq: fix use-after-free in bfq_idle_slice_timer_body 2020-04-24 08:00:30 +02:00
certs Replace magic for trusting the secondary keyring with #define 2018-09-09 19:55:54 +02:00
crypto crypto: api - Fix race condition in crypto_spawn_alg 2020-02-14 16:32:14 -05:00
drivers hwmon: (da9052) Synchronize access with mfd 2020-05-20 08:17:09 +02:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:20:30 +01:00
fs f2fs: fix to avoid memory leakage in f2fs_listxattr 2020-05-20 08:17:04 +02:00
include gcc-10 warnings: fix low-hanging fruit 2020-05-20 08:17:09 +02:00
init Stop the ad-hoc games with -Wno-maybe-initialized 2020-05-20 08:17:10 +02:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2020-05-20 08:17:07 +02:00
kernel Stop the ad-hoc games with -Wno-maybe-initialized 2020-05-20 08:17:10 +02:00
lib lib/mpi: Fix building for powerpc with clang 2020-05-10 10:29:01 +02:00
mm shmem: fix possible deadlocks on shmlock_user_lock 2020-05-20 08:17:04 +02:00
net netfilter: conntrack: avoid gcc-10 zero-length-bounds warning 2020-05-20 08:17:09 +02:00
samples samples/bpf: Don't try to remove user's homedir on clean 2020-02-14 16:32:13 -05:00
scripts scripts/decodecode: fix trapping instruction formatting 2020-05-20 08:17:01 +02:00
security selinux: properly handle multiple messages in selinux_netlink_send() 2020-05-05 19:15:53 +02:00
sound ALSA: hda/realtek - Fix S3 pop noise on Dell Wyse 2020-05-20 08:17:07 +02:00
tools objtool: Fix stack offset tracking for indirect CFAs 2020-05-20 08:17:01 +02:00
usr initramfs: restore default compression behavior 2020-04-13 10:34:19 +02:00
virt KVM: arm: vgic: Fix limit condition when writing to GICD_I[CS]ACTIVER 2020-05-20 08:16:58 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore kbuild: rpm-pkg: keep spec file until make mrproper 2018-02-13 10:19:46 +01:00
.mailmap .mailmap: Add Maciej W. Rozycki's Imagination e-mail address 2017-11-10 12:16:15 -08:00
COPYING
CREDITS MAINTAINERS: update TPM driver infrastructure changes 2017-11-09 17:58:40 -08:00
Kbuild License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
MAINTAINERS MAINTAINERS: Update drm/i915 bug filing URL 2020-02-28 16:36:12 +01:00
Makefile gcc-10: disable 'restrict' warning for now 2020-05-20 08:17:11 +02:00
README README: add a new README file, pointing to the Documentation/ 2016-10-24 08:12:35 -02:00

README

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

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

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.