No description
Find a file
Arnaldo Carvalho de Melo 3690acebf7 perf ui helpline: Use strlcpy() as a shorter form of strncpy() + explicit set nul
commit 4d0f16d059 upstream.

The strncpy() function may leave the destination string buffer
unterminated, better use strlcpy() that we have a __weak fallback
implementation for systems without it.

In this case we are actually setting the null byte at the right place,
but since we pass the buffer size as the limit to strncpy() and not
it minus one, gcc ends up warning us about that, see below. So, lets
just switch to the shorter form provided by strlcpy().

This fixes this warning on an Alpine Linux Edge system with gcc 8.2:

  ui/tui/helpline.c: In function 'tui_helpline__push':
  ui/tui/helpline.c:27:2: error: 'strncpy' specified bound 512 equals destination size [-Werror=stringop-truncation]
    strncpy(ui_helpline__current, msg, sz)[sz - 1] = '\0';
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Fixes: e6e9046879 ("perf ui: Introduce struct ui_helpline")
Link: https://lkml.kernel.org/n/tip-d1wz0hjjsh19xbalw69qpytj@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 13:15:57 +02:00
arch ARM: dts: am57xx-idk: Remove support for voltage switching for SD card 2019-06-25 11:36:54 +08:00
block block, bfq: increase idling for weight-raised queues 2019-06-15 11:54:58 +02:00
certs Replace magic for trusting the secondary keyring with #define 2018-09-09 19:55:54 +02:00
crypto crypto: ccm - fix incompatibility between "ccm" and "ccm_base" 2019-05-21 18:50:20 +02:00
Documentation tcp: add tcp_min_snd_mss sysctl 2019-06-17 19:52:44 +02:00
drivers can: flexcan: fix timeout when set small bitrate 2019-06-25 11:36:54 +08:00
firmware License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fs SMB3: retry on STATUS_INSUFFICIENT_RESOURCES instead of failing write 2019-06-25 11:36:54 +08:00
include Bluetooth: Align minimum encryption key size for LE and BR/EDR connections 2019-06-25 11:36:54 +08:00
init init: initialize jump labels before command line option parsing 2019-05-16 19:42:23 +02:00
ipc ipc: prevent lockup on alloc_msg and free_msg 2019-06-15 11:54:51 +02:00
kernel tracing: Silence GCC 9 array bounds warning 2019-06-25 11:36:50 +08:00
lib test_firmware: Use correct snprintf() limit 2019-06-11 12:21:49 +02:00
mm coredump: fix race condition between collapse_huge_page() and core dumping 2019-06-22 08:16:19 +02:00
net tcp: refine memory limit test in tcp_fragment() 2019-06-27 08:15:09 +08:00
samples samples: mei: use /dev/mei0 instead of /dev/mei 2019-02-15 08:09:12 +01:00
scripts scripts/checkstack.pl: Fix arm64 wrong or unknown architecture 2019-06-25 11:36:53 +08:00
security apparmor: enforce nullbyte at end of tag string 2019-06-25 11:36:51 +08:00
sound ALSA: hda - Force polling mode on CNL for fixing codec communication 2019-06-22 08:16:17 +02:00
tools perf ui helpline: Use strlcpy() as a shorter form of strncpy() + explicit set nul 2019-07-03 13:15:57 +02:00
usr initramfs: fix initramfs rebuilds w/ compression after disabling 2017-11-03 07:39:19 -07:00
virt KVM: s390: Do not report unusabled IDs via KVM_CAP_MAX_VCPU_ID 2019-06-09 09:18:16 +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: Add Sasha as a stable branch maintainer 2018-12-01 09:42:50 +01:00
Makefile Linux 4.14.131 2019-06-27 08:15:09 +08:00
README README: add a new README file, pointing to the Documentation/ 2016-10-24 08:12:35 -02:00

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.