No description
Find a file
Lukas Hannen 39ff83f2f6 time: Handle negative seconds correctly in timespec64_to_ns()
timespec64_ns() prevents multiplication overflows by comparing the seconds
value of the timespec to KTIME_SEC_MAX. If the value is greater or equal it
returns KTIME_MAX.

But that check casts the signed seconds value to unsigned which makes the
comparision true for all negative values and therefore return wrongly
KTIME_MAX.

Negative second values are perfectly valid and required in some places,
e.g. ptp_clock_adjtime().

Remove the cast and add a check for the negative boundary which is required
to prevent undefined behaviour due to multiplication underflow.

Fixes: cb47755725 ("time: Prevent undefined behaviour in timespec64_to_ns()")'
Signed-off-by: Lukas Hannen <lukas.hannen@opensource.tttech-industrial.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/AM6PR01MB541637BD6F336B8FFB72AF80EEC69@AM6PR01MB5416.eurprd01.prod.exchangelabs.com
2021-09-08 17:44:26 +02:00
arch A set of updates for the 86 reboot code: 2021-08-30 15:27:15 -07:00
block Updates to the interrupt core and driver subsystems: 2021-08-30 14:38:37 -07:00
certs certs: Add support for using elliptic curve keys for signing modules 2021-08-23 19:55:42 +03:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2021-08-30 12:57:10 -07:00
Documentation Updates for timekeeping, timers and related drivers: 2021-08-30 15:31:33 -07:00
drivers Updates for timekeeping, timers and related drivers: 2021-08-30 15:31:33 -07:00
fs Updates for timekeeping, timers and related drivers: 2021-08-30 15:31:33 -07:00
include time: Handle negative seconds correctly in timespec64_to_ns() 2021-09-08 17:44:26 +02:00
init Scheduler changes for v5.15 are: 2021-08-30 13:42:10 -07:00
ipc Merge branch 'akpm' (patches from Andrew) 2021-07-02 12:08:10 -07:00
kernel Updates for timekeeping, timers and related drivers: 2021-08-30 15:31:33 -07:00
lib Updates for locking and atomics: 2021-08-30 14:26:36 -07:00
LICENSES LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" 2021-07-15 06:31:24 -06:00
mm SMP core updates: 2021-08-30 14:10:07 -07:00
net This is a one-liner fix for a serious bug that can cause the server to 2021-08-26 13:26:40 -07:00
samples Networking fixes for 5.14-rc2, including fixes from bpf and netfilter. 2021-07-14 09:24:32 -07:00
scripts Linux 5.14-rc6 2021-08-17 16:16:29 +02:00
security A handful of EFI changes for this cycle: 2021-08-30 13:57:55 -07:00
sound another sound-fixes for 5.14-rc7 2021-08-20 12:31:10 -07:00
tools Merge branch 'core-rcu.2021.08.28a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu 2021-08-30 12:48:01 -07:00
usr
virt KVM: Do not leak memory for duplicate debugfs directories 2021-08-04 06:02:03 -04:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap m68k updates for v5.14 2021-06-28 14:01:03 -07:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: exfat: update my email address 2021-08-25 12:25:12 -07:00
Makefile Linux 5.14 2021-08-29 15:04:50 -07:00
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.