for build kernel-4.14.24

This commit is contained in:
Ertuğrul Erata
2018-03-09 23:08:15 +03:00
parent 9fe5969b2c
commit edb50afaaa
56 changed files with 5839 additions and 638 deletions
@@ -1,6 +1,6 @@
# #
# Automatically generated file; DO NOT EDIT. # Automatically generated file; DO NOT EDIT.
# Linux/x86_64 4.14.23 Kernel Configuration # Linux/x86_64 4.14.24 Kernel Configuration
# #
CONFIG_64BIT=y CONFIG_64BIT=y
CONFIG_X86_64=y CONFIG_X86_64=y
@@ -75,7 +75,7 @@ CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y CONFIG_POSIX_MQUEUE_SYSCTL=y
CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_CROSS_MEMORY_ATTACH=y
CONFIG_FHANDLE=y CONFIG_FHANDLE=y
CONFIG_USELIB=y # CONFIG_USELIB is not set
CONFIG_AUDIT=y CONFIG_AUDIT=y
CONFIG_HAVE_ARCH_AUDITSYSCALL=y CONFIG_HAVE_ARCH_AUDITSYSCALL=y
CONFIG_AUDITSYSCALL=y CONFIG_AUDITSYSCALL=y
@@ -146,8 +146,8 @@ CONFIG_RCU_NEED_SEGCBLIST=y
CONFIG_BUILD_BIN2C=y CONFIG_BUILD_BIN2C=y
CONFIG_IKCONFIG=y CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=17 CONFIG_LOG_BUF_SHIFT=18
CONFIG_LOG_CPU_MAX_BUF_SHIFT=13 CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13 CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
@@ -175,7 +175,6 @@ CONFIG_PROC_PID_CPUSET=y
CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y CONFIG_CGROUP_PERF=y
# CONFIG_CGROUP_BPF is not set
CONFIG_SOCK_CGROUP_DATA=y CONFIG_SOCK_CGROUP_DATA=y
# CONFIG_CHECKPOINT_RESTORE is not set # CONFIG_CHECKPOINT_RESTORE is not set
CONFIG_NAMESPACES=y CONFIG_NAMESPACES=y
@@ -193,8 +192,8 @@ CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y CONFIG_RD_LZMA=y
CONFIG_RD_XZ=y CONFIG_RD_XZ=y
# CONFIG_RD_LZO is not set CONFIG_RD_LZO=y
# CONFIG_RD_LZ4 is not set CONFIG_RD_LZ4=y
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y CONFIG_SYSCTL=y
@@ -225,12 +224,11 @@ CONFIG_EPOLL=y
CONFIG_SIGNALFD=y CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y CONFIG_TIMERFD=y
CONFIG_EVENTFD=y CONFIG_EVENTFD=y
CONFIG_BPF_SYSCALL=y # CONFIG_BPF_SYSCALL is not set
# CONFIG_BPF_JIT_ALWAYS_ON is not set
CONFIG_SHMEM=y CONFIG_SHMEM=y
CONFIG_AIO=y CONFIG_AIO=y
CONFIG_ADVISE_SYSCALLS=y CONFIG_ADVISE_SYSCALLS=y
CONFIG_USERFAULTFD=y # CONFIG_USERFAULTFD is not set
CONFIG_PCI_QUIRKS=y CONFIG_PCI_QUIRKS=y
CONFIG_MEMBARRIER=y CONFIG_MEMBARRIER=y
# CONFIG_EMBEDDED is not set # CONFIG_EMBEDDED is not set
@@ -253,7 +251,7 @@ CONFIG_TRACEPOINTS=y
CONFIG_CRASH_CORE=y CONFIG_CRASH_CORE=y
CONFIG_KEXEC_CORE=y CONFIG_KEXEC_CORE=y
CONFIG_OPROFILE=m CONFIG_OPROFILE=m
# CONFIG_OPROFILE_EVENT_MULTIPLEX is not set CONFIG_OPROFILE_EVENT_MULTIPLEX=y
CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_OPROFILE=y
CONFIG_OPROFILE_NMI_TIMER=y CONFIG_OPROFILE_NMI_TIMER=y
CONFIG_KPROBES=y CONFIG_KPROBES=y
@@ -301,9 +299,9 @@ CONFIG_SECCOMP_FILTER=y
CONFIG_HAVE_GCC_PLUGINS=y CONFIG_HAVE_GCC_PLUGINS=y
# CONFIG_GCC_PLUGINS is not set # CONFIG_GCC_PLUGINS is not set
CONFIG_HAVE_CC_STACKPROTECTOR=y CONFIG_HAVE_CC_STACKPROTECTOR=y
CONFIG_CC_STACKPROTECTOR=y # CONFIG_CC_STACKPROTECTOR is not set
# CONFIG_CC_STACKPROTECTOR_NONE is not set CONFIG_CC_STACKPROTECTOR_NONE=y
CONFIG_CC_STACKPROTECTOR_REGULAR=y # CONFIG_CC_STACKPROTECTOR_REGULAR is not set
# CONFIG_CC_STACKPROTECTOR_STRONG is not set # CONFIG_CC_STACKPROTECTOR_STRONG is not set
CONFIG_THIN_ARCHIVES=y CONFIG_THIN_ARCHIVES=y
CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y
@@ -1540,7 +1538,6 @@ CONFIG_CGROUP_NET_CLASSID=y
CONFIG_NET_RX_BUSY_POLL=y CONFIG_NET_RX_BUSY_POLL=y
CONFIG_BQL=y CONFIG_BQL=y
CONFIG_BPF_JIT=y CONFIG_BPF_JIT=y
# CONFIG_BPF_STREAM_PARSER is not set
CONFIG_NET_FLOW_LIMIT=y CONFIG_NET_FLOW_LIMIT=y
# #
@@ -2095,6 +2092,7 @@ CONFIG_SCSI_INITIO=m
CONFIG_SCSI_INIA100=m CONFIG_SCSI_INIA100=m
# CONFIG_SCSI_PPA is not set # CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set # CONFIG_SCSI_IMM is not set
# CONFIG_PPSCSI is not set
CONFIG_SCSI_STEX=m CONFIG_SCSI_STEX=m
CONFIG_SCSI_SYM53C8XX_2=m CONFIG_SCSI_SYM53C8XX_2=m
CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
@@ -6335,7 +6333,7 @@ CONFIG_GOOGLE_SMI=m
# #
# EFI (Extensible Firmware Interface) Support # EFI (Extensible Firmware Interface) Support
# #
CONFIG_EFI_VARS=y CONFIG_EFI_VARS=m
CONFIG_EFI_ESRT=y CONFIG_EFI_ESRT=y
CONFIG_EFI_VARS_PSTORE=m CONFIG_EFI_VARS_PSTORE=m
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set # CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
@@ -6359,11 +6357,11 @@ CONFIG_EFI_DEV_PATH_PARSER=y
# #
CONFIG_DCACHE_WORD_ACCESS=y CONFIG_DCACHE_WORD_ACCESS=y
CONFIG_FS_IOMAP=y CONFIG_FS_IOMAP=y
CONFIG_EXT2_FS=y CONFIG_EXT2_FS=m
CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_XATTR=y
# CONFIG_EXT2_FS_POSIX_ACL is not set # CONFIG_EXT2_FS_POSIX_ACL is not set
CONFIG_EXT2_FS_SECURITY=y CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT3_FS=y CONFIG_EXT3_FS=m
CONFIG_EXT3_FS_POSIX_ACL=y CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y CONFIG_EXT3_FS_SECURITY=y
CONFIG_EXT4_FS=y CONFIG_EXT4_FS=y
@@ -6375,18 +6373,18 @@ CONFIG_EXT4_FS_ENCRYPTION=y
CONFIG_JBD2=y CONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not set # CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y CONFIG_FS_MBCACHE=y
CONFIG_REISERFS_FS=y CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set # CONFIG_REISERFS_CHECK is not set
CONFIG_REISERFS_PROC_INFO=y CONFIG_REISERFS_PROC_INFO=y
CONFIG_REISERFS_FS_XATTR=y CONFIG_REISERFS_FS_XATTR=y
CONFIG_REISERFS_FS_POSIX_ACL=y CONFIG_REISERFS_FS_POSIX_ACL=y
CONFIG_REISERFS_FS_SECURITY=y CONFIG_REISERFS_FS_SECURITY=y
CONFIG_JFS_FS=y CONFIG_JFS_FS=m
CONFIG_JFS_POSIX_ACL=y CONFIG_JFS_POSIX_ACL=y
CONFIG_JFS_SECURITY=y CONFIG_JFS_SECURITY=y
# CONFIG_JFS_DEBUG is not set # CONFIG_JFS_DEBUG is not set
# CONFIG_JFS_STATISTICS is not set # CONFIG_JFS_STATISTICS is not set
CONFIG_XFS_FS=y CONFIG_XFS_FS=m
CONFIG_XFS_QUOTA=y CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y CONFIG_XFS_POSIX_ACL=y
# CONFIG_XFS_RT is not set # CONFIG_XFS_RT is not set
@@ -6475,9 +6473,7 @@ CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="ascii" CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
# CONFIG_FAT_DEFAULT_UTF8 is not set # CONFIG_FAT_DEFAULT_UTF8 is not set
CONFIG_NTFS_FS=m # CONFIG_NTFS_FS is not set
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set
# #
# Pseudo filesystems # Pseudo filesystems
@@ -6809,7 +6805,6 @@ CONFIG_STACK_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_KPROBE_EVENTS=y CONFIG_KPROBE_EVENTS=y
CONFIG_UPROBE_EVENTS=y CONFIG_UPROBE_EVENTS=y
CONFIG_BPF_EVENTS=y
CONFIG_PROBE_EVENTS=y CONFIG_PROBE_EVENTS=y
CONFIG_DYNAMIC_FTRACE=y CONFIG_DYNAMIC_FTRACE=y
CONFIG_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_DYNAMIC_FTRACE_WITH_REGS=y
@@ -6968,7 +6963,7 @@ CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_NULL2=y
CONFIG_CRYPTO_PCRYPT=m CONFIG_CRYPTO_PCRYPT=m
CONFIG_CRYPTO_WORKQUEUE=y CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_CRYPTO_CRYPTD=m CONFIG_CRYPTO_CRYPTD=y
CONFIG_CRYPTO_MCRYPTD=m CONFIG_CRYPTO_MCRYPTD=m
CONFIG_CRYPTO_AUTHENC=m CONFIG_CRYPTO_AUTHENC=m
CONFIG_CRYPTO_TEST=m CONFIG_CRYPTO_TEST=m
@@ -6982,7 +6977,7 @@ CONFIG_CRYPTO_ENGINE=m
# #
CONFIG_CRYPTO_CCM=m CONFIG_CRYPTO_CCM=m
CONFIG_CRYPTO_GCM=m CONFIG_CRYPTO_GCM=m
CONFIG_CRYPTO_CHACHA20POLY1305=m # CONFIG_CRYPTO_CHACHA20POLY1305 is not set
CONFIG_CRYPTO_SEQIV=y CONFIG_CRYPTO_SEQIV=y
CONFIG_CRYPTO_ECHAINIV=m CONFIG_CRYPTO_ECHAINIV=m
@@ -7043,7 +7038,7 @@ CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m
# Ciphers # Ciphers
# #
CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_AES_TI=m # CONFIG_CRYPTO_AES_TI is not set
CONFIG_CRYPTO_AES_X86_64=m CONFIG_CRYPTO_AES_X86_64=m
CONFIG_CRYPTO_AES_NI_INTEL=m CONFIG_CRYPTO_AES_NI_INTEL=m
CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_ANUBIS=m
@@ -7099,11 +7094,11 @@ CONFIG_CRYPTO_DRBG_HMAC=y
# CONFIG_CRYPTO_DRBG_CTR is not set # CONFIG_CRYPTO_DRBG_CTR is not set
CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG=y
CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_JITTERENTROPY=y
CONFIG_CRYPTO_USER_API=m CONFIG_CRYPTO_USER_API=y
CONFIG_CRYPTO_USER_API_HASH=m CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_SKCIPHER=m CONFIG_CRYPTO_USER_API_SKCIPHER=y
CONFIG_CRYPTO_USER_API_RNG=m CONFIG_CRYPTO_USER_API_RNG=m
CONFIG_CRYPTO_USER_API_AEAD=m # CONFIG_CRYPTO_USER_API_AEAD is not set
CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HASH_INFO=y
CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_HW=y
CONFIG_CRYPTO_DEV_PADLOCK=m CONFIG_CRYPTO_DEV_PADLOCK=m
@@ -7183,7 +7178,7 @@ CONFIG_CRC32_SLICEBY8=y
# CONFIG_CRC32_BIT is not set # CONFIG_CRC32_BIT is not set
# CONFIG_CRC4 is not set # CONFIG_CRC4 is not set
# CONFIG_CRC7 is not set # CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=y CONFIG_LIBCRC32C=m
CONFIG_CRC8=m CONFIG_CRC8=m
CONFIG_XXHASH=m CONFIG_XXHASH=m
# CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set # CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set
@@ -7194,7 +7189,7 @@ CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y CONFIG_LZO_DECOMPRESS=y
CONFIG_LZ4_COMPRESS=m CONFIG_LZ4_COMPRESS=m
CONFIG_LZ4HC_COMPRESS=m CONFIG_LZ4HC_COMPRESS=m
CONFIG_LZ4_DECOMPRESS=m CONFIG_LZ4_DECOMPRESS=y
CONFIG_ZSTD_COMPRESS=m CONFIG_ZSTD_COMPRESS=m
CONFIG_ZSTD_DECOMPRESS=m CONFIG_ZSTD_DECOMPRESS=m
CONFIG_XZ_DEC=y CONFIG_XZ_DEC=y
@@ -7210,6 +7205,8 @@ CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y CONFIG_DECOMPRESS_LZMA=y
CONFIG_DECOMPRESS_XZ=y CONFIG_DECOMPRESS_XZ=y
CONFIG_DECOMPRESS_LZO=y
CONFIG_DECOMPRESS_LZ4=y
CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ALLOCATOR=y
CONFIG_REED_SOLOMON=m CONFIG_REED_SOLOMON=m
CONFIG_REED_SOLOMON_ENC8=y CONFIG_REED_SOLOMON_ENC8=y
@@ -7253,11 +7250,3 @@ CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE=y
CONFIG_SBITMAP=y CONFIG_SBITMAP=y
CONFIG_PARMAN=m CONFIG_PARMAN=m
# CONFIG_STRING_SELFTEST is not set # CONFIG_STRING_SELFTEST is not set
#
# Unofficial 3rd party kernel additions
#
CONFIG_VIAHSS=m
CONFIG_NDISWRAPPER=m
CONFIG_RTL8723DE=m
CONFIG_RTL8812AU=m
Binary file not shown.
@@ -0,0 +1,34 @@
From: Hans de Goede <hdegoede@redhat.com>
Subject: [PATCH 2/2] PCI: Add function 1 DMA alias quirk for Highpoint RocketRAID 644L
Date: Fri, 2 Mar 2018 11:36:33 +0100
The Highpoint RocketRAID 644L uses a Marvel 88SE9235 controller, as with
other Marvel controllers this needs a function 1 DMA alias quirk.
Note the RocketRAID 642L uses the same Marvel 88SE9235 controller and
already is listed with a function 1 DMA alias quirk.
Cc: stable@vger.kernel.org
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1534106
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/pci/quirks.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 8b14bd326d4a..46d47bd6ca1f 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -3908,6 +3908,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9230,
quirk_dma_func1_alias);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TTI, 0x0642,
quirk_dma_func1_alias);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TTI, 0x0645,
+ quirk_dma_func1_alias);
/* https://bugs.gentoo.org/show_bug.cgi?id=497630 */
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_JMICRON,
PCI_DEVICE_ID_JMICRON_JMB388_ESD,
--
2.14.3
@@ -0,0 +1,46 @@
From 863204cfdae98626a92535ac928ad79f4d6b74ff Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 6 Dec 2017 14:17:17 +0100
Subject: [PATCH] ARM: omap2: hide omap3_save_secure_ram on non-OMAP3 builds
In configurations without CONFIG_OMAP3 but with secure RAM support,
we now run into a link failure:
arch/arm/mach-omap2/omap-secure.o: In function `omap3_save_secure_ram':
omap-secure.c:(.text+0x130): undefined reference to `save_secure_ram_context'
The omap3_save_secure_ram() function is only called from the OMAP34xx
power management code, so we can simply hide that function in the
appropriate #ifdef.
Fixes: d09220a887f7 ("ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context")
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-omap2/omap-secure.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-omap2/omap-secure.c b/arch/arm/mach-omap2/omap-secure.c
index 9ff92050053c..fa7f308c9027 100644
--- a/arch/arm/mach-omap2/omap-secure.c
+++ b/arch/arm/mach-omap2/omap-secure.c
@@ -73,6 +73,7 @@ phys_addr_t omap_secure_ram_mempool_base(void)
return omap_secure_memblock_base;
}
+#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
u32 omap3_save_secure_ram(void __iomem *addr, int size)
{
u32 ret;
@@ -91,6 +92,7 @@ u32 omap3_save_secure_ram(void __iomem *addr, int size)
return ret;
}
+#endif
/**
* rx51_secure_dispatcher: Routine to dispatch secure PPA API calls
--
2.16.2
@@ -0,0 +1,37 @@
From: Hans de Goede <hdegoede@redhat.com>
Subject: [PATCH 1/2] ahci: Add PCI-id for the Highpoint Rocketraid 644L card
Date: Fri, 2 Mar 2018 11:36:32 +0100
Like the Highpoint Rocketraid 642L and cards using a Marvel 88SE9235
controller in general, this RAID card also supports AHCI mode and short
of a custom driver, this is the only way to make it work under Linux.
Note that even though the card is called to 644L, it has a product-id
of 0x0645.
Cc: stable@vger.kernel.org
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1534106
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/ata/ahci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 355a95a83a34..1ff17799769d 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -550,7 +550,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
.driver_data = board_ahci_yes_fbs },
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9230),
.driver_data = board_ahci_yes_fbs },
- { PCI_DEVICE(PCI_VENDOR_ID_TTI, 0x0642),
+ { PCI_DEVICE(PCI_VENDOR_ID_TTI, 0x0642), /* highpoint rocketraid 642L */
+ .driver_data = board_ahci_yes_fbs },
+ { PCI_DEVICE(PCI_VENDOR_ID_TTI, 0x0645), /* highpoint rocketraid 644L */
.driver_data = board_ahci_yes_fbs },
/* Promise */
--
2.14.3
@@ -90,7 +90,7 @@
fs/aufs/wkq.c | 378 ++++ fs/aufs/wkq.c | 378 ++++
fs/aufs/wkq.h | 81 + fs/aufs/wkq.h | 81 +
fs/aufs/xattr.c | 343 ++++ fs/aufs/xattr.c | 343 ++++
fs/aufs/xino.c | 1406 +++++++++++++++ fs/aufs/xino.c | 1457 +++++++++++++++
fs/dcache.c | 2 +- fs/dcache.c | 2 +-
fs/fcntl.c | 4 +- fs/fcntl.c | 4 +-
fs/inode.c | 2 +- fs/inode.c | 2 +-
@@ -117,7 +117,7 @@
mm/mmap.c | 33 +- mm/mmap.c | 33 +-
mm/nommu.c | 10 +- mm/nommu.c | 10 +-
mm/prfile.c | 86 + mm/prfile.c | 86 +
119 files changed, 35967 insertions(+), 31 deletions(-) 119 files changed, 36018 insertions(+), 31 deletions(-)
diff --git a/Documentation/ABI/testing/debugfs-aufs b/Documentation/ABI/testing/debugfs-aufs diff --git a/Documentation/ABI/testing/debugfs-aufs b/Documentation/ABI/testing/debugfs-aufs
new file mode 100644 new file mode 100644
@@ -34595,10 +34595,10 @@ index 000000000000..dbe452868cd5
+} +}
diff --git a/fs/aufs/xino.c b/fs/aufs/xino.c diff --git a/fs/aufs/xino.c b/fs/aufs/xino.c
new file mode 100644 new file mode 100644
index 000000000000..74aecb7193ab index 000000000000..eea2c34cabf4
--- /dev/null --- /dev/null
+++ b/fs/aufs/xino.c +++ b/fs/aufs/xino.c
@@ -0,0 +1,1406 @@ @@ -0,0 +1,1457 @@
+/* +/*
+ * SPDX-License-Identifier: GPL-2.0 + * SPDX-License-Identifier: GPL-2.0
+ * Copyright (C) 2005-2017 Junjiro R. Okajima + * Copyright (C) 2005-2017 Junjiro R. Okajima
@@ -34612,6 +34612,9 @@ index 000000000000..74aecb7193ab
+#include <linux/statfs.h> +#include <linux/statfs.h>
+#include "aufs.h" +#include "aufs.h"
+ +
+static ssize_t xino_fread_wkq(vfs_readf_t func, struct file *file, void *buf,
+ size_t size, loff_t *pos);
+
+/* todo: unnecessary to support mmap_sem since kernel-space? */ +/* todo: unnecessary to support mmap_sem since kernel-space? */
+ssize_t xino_fread(vfs_readf_t func, struct file *file, void *kbuf, size_t size, +ssize_t xino_fread(vfs_readf_t func, struct file *file, void *kbuf, size_t size,
+ loff_t *pos) + loff_t *pos)
@@ -34622,14 +34625,26 @@ index 000000000000..74aecb7193ab
+ void *k; + void *k;
+ char __user *u; + char __user *u;
+ } buf; + } buf;
+ int i;
+ const int prevent_endless = 10;
+ +
+ i = 0;
+ buf.k = kbuf; + buf.k = kbuf;
+ oldfs = get_fs(); + oldfs = get_fs();
+ set_fs(KERNEL_DS); + set_fs(KERNEL_DS);
+ do { + do {
+ /* todo: signal_pending? */
+ err = func(file, buf.u, size, pos); + err = func(file, buf.u, size, pos);
+ } while (err == -EAGAIN || err == -EINTR); + if (err == -EINTR
+ && !au_wkq_test()
+ && fatal_signal_pending(current)) {
+ set_fs(oldfs);
+ err = xino_fread_wkq(func, file, kbuf, size, pos);
+ BUG_ON(err == -EINTR);
+ oldfs = get_fs();
+ set_fs(KERNEL_DS);
+ }
+ } while (i++ < prevent_endless
+ && (err == -EAGAIN || err == -EINTR));
+ set_fs(oldfs); + set_fs(oldfs);
+ +
+#if 0 /* reserved for future use */ +#if 0 /* reserved for future use */
@@ -34640,6 +34655,42 @@ index 000000000000..74aecb7193ab
+ return err; + return err;
+} +}
+ +
+struct xino_fread_args {
+ ssize_t *errp;
+ vfs_readf_t func;
+ struct file *file;
+ void *buf;
+ size_t size;
+ loff_t *pos;
+};
+
+static void call_xino_fread(void *args)
+{
+ struct xino_fread_args *a = args;
+ *a->errp = xino_fread(a->func, a->file, a->buf, a->size, a->pos);
+}
+
+static ssize_t xino_fread_wkq(vfs_readf_t func, struct file *file, void *buf,
+ size_t size, loff_t *pos)
+{
+ ssize_t err;
+ int wkq_err;
+ struct xino_fread_args args = {
+ .errp = &err,
+ .func = func,
+ .file = file,
+ .buf = buf,
+ .size = size,
+ .pos = pos
+ };
+
+ wkq_err = au_wkq_wait(call_xino_fread, &args);
+ if (unlikely(wkq_err))
+ err = wkq_err;
+
+ return err;
+}
+
+/* ---------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- */
+ +
+static ssize_t xino_fwrite_wkq(vfs_writef_t func, struct file *file, void *buf, +static ssize_t xino_fwrite_wkq(vfs_writef_t func, struct file *file, void *buf,
@@ -0,0 +1,18 @@
--- a/drivers/input/touchscreen/goodix.c
+++ a/drivers/input/touchscreen/goodix.c
@@ -947,6 +954,7 @@ static SIMPLE_DEV_PM_OPS(goodix_pm_ops, goodix_suspend, goodix_resume);
static const struct i2c_device_id goodix_ts_id[] = {
{ "GDIX1001:00", 0 },
+ { "GDIX1002:00", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, goodix_ts_id);
@@ -954,6 +962,7 @@ MODULE_DEVICE_TABLE(i2c, goodix_ts_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id goodix_acpi_match[] = {
{ "GDIX1001", 0 },
+ { "GDIX1002", 0 },
{ }
};
MODULE_DEVICE_TABLE(acpi, goodix_acpi_match);
@@ -0,0 +1,60 @@
From faec44b6838312484d63e82286087cf2d5ebb891 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Fri, 12 Jan 2018 00:36:48 -0800
Subject: [PATCH] Input: goodix - disable IRQs while suspended
We should not try to do any i2c transfers before the controller is
resumed (which happens before our resume method gets called).
So we need to disable our IRQ while suspended to enforce this. The
code paths for devices with GPIOs for the int and reset pins already
disable the IRQ the through goodix_free_irq().
This commit also disables the IRQ while suspended for devices without
GPIOs for the int and reset pins.
This fixes the i2c bus sometimes getting stuck after a suspend/resume
causing the touchscreen to sometimes not work after a suspend/resume.
This has been tested on a GPD pocked device.
BugLink: https://github.com/nexus511/gpd-ubuntu-packages/issues/10
BugLink: https://www.reddit.com/r/GPDPocket/comments/7niut2/fix_for_broken_touch_after_resume_all_linux/
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/touchscreen/goodix.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
index 69d0b8cbc71f..ecec8eb17f28 100644
--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -878,8 +878,10 @@ static int __maybe_unused goodix_suspend(struct device *dev)
int error;
/* We need gpio pins to suspend/resume */
- if (!ts->gpiod_int || !ts->gpiod_rst)
+ if (!ts->gpiod_int || !ts->gpiod_rst) {
+ disable_irq(client->irq);
return 0;
+ }
wait_for_completion(&ts->firmware_loading_complete);
@@ -919,8 +921,10 @@ static int __maybe_unused goodix_resume(struct device *dev)
struct goodix_ts_data *ts = i2c_get_clientdata(client);
int error;
- if (!ts->gpiod_int || !ts->gpiod_rst)
+ if (!ts->gpiod_int || !ts->gpiod_rst) {
+ enable_irq(client->irq);
return 0;
+ }
/*
* Exit sleep mode by outputting HIGH level to INT pin
--
2.16.2
@@ -1,6 +1,6 @@
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/allowedips.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/allowedips.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,327 @@ @@ -0,0 +1,328 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
+ * Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. + * Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
@@ -142,7 +142,8 @@
+/* This could be much faster if it actually just compared the common bits properly, +/* This could be much faster if it actually just compared the common bits properly,
+ * by precomputing a mask bswap(~0 << (32 - cidr)), and the rest, but it turns out that + * by precomputing a mask bswap(~0 << (32 - cidr)), and the rest, but it turns out that
+ * common_bits is already super fast on modern processors, even taking into account + * common_bits is already super fast on modern processors, even taking into account
+ * the unfortunate bswap. So, we just inline it like this instead. */ + * the unfortunate bswap. So, we just inline it like this instead.
+ */
+#define prefix_matches(node, key, bits) (common_bits(node, key, bits) >= node->cidr) +#define prefix_matches(node, key, bits) (common_bits(node, key, bits) >= node->cidr)
+ +
+static __always_inline struct allowedips_node *find_node(struct allowedips_node *trie, u8 bits, const u8 *key) +static __always_inline struct allowedips_node *find_node(struct allowedips_node *trie, u8 bits, const u8 *key)
@@ -328,8 +329,8 @@
+} +}
+ +
+#include "selftest/allowedips.h" +#include "selftest/allowedips.h"
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/cookie.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/cookie.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,195 @@ @@ -0,0 +1,195 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -526,8 +527,8 @@
+out: +out:
+ peer_put(entry->peer); + peer_put(entry->peer);
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/device.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/device.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,421 @@ @@ -0,0 +1,421 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -950,8 +951,8 @@
+#endif +#endif
+ rcu_barrier_bh(); + rcu_barrier_bh();
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/hashtables.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/hashtables.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,168 @@ @@ -0,0 +1,168 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -1121,8 +1122,8 @@
+ rcu_read_unlock_bh(); + rcu_read_unlock_bh();
+ return entry; + return entry;
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/main.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/main.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,69 @@ @@ -0,0 +1,69 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -1193,8 +1194,8 @@
+MODULE_VERSION(WIREGUARD_VERSION); +MODULE_VERSION(WIREGUARD_VERSION);
+MODULE_ALIAS_RTNL_LINK(KBUILD_MODNAME); +MODULE_ALIAS_RTNL_LINK(KBUILD_MODNAME);
+MODULE_ALIAS_GENL_FAMILY(WG_GENL_NAME); +MODULE_ALIAS_GENL_FAMILY(WG_GENL_NAME);
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/netlink.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/netlink.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,517 @@ @@ -0,0 +1,517 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -1713,8 +1714,8 @@
+{ +{
+ genl_unregister_family(&genl_family); + genl_unregister_family(&genl_family);
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/noise.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/noise.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,635 @@ @@ -0,0 +1,635 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -2351,8 +2352,8 @@
+ up_write(&handshake->lock); + up_write(&handshake->lock);
+ return false; + return false;
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/peer.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/peer.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,136 @@ @@ -0,0 +1,136 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -2490,8 +2491,8 @@
+ list_for_each_entry_safe(peer, temp, &wg->peer_list, peer_list) + list_for_each_entry_safe(peer, temp, &wg->peer_list, peer_list)
+ peer_remove(peer); + peer_remove(peer);
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/queueing.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/queueing.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -2539,8 +2540,8 @@
+ WARN_ON(!ptr_ring_empty_bh(&queue->ring)); + WARN_ON(!ptr_ring_empty_bh(&queue->ring));
+ ptr_ring_cleanup(&queue->ring, NULL); + ptr_ring_cleanup(&queue->ring, NULL);
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/ratelimiter.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/ratelimiter.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,199 @@ @@ -0,0 +1,199 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -2741,8 +2742,8 @@
+} +}
+ +
+#include "selftest/ratelimiter.h" +#include "selftest/ratelimiter.h"
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/receive.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/receive.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,490 @@ @@ -0,0 +1,490 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -3234,8 +3235,8 @@
+err: +err:
+ dev_kfree_skb(skb); + dev_kfree_skb(skb);
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/send.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/send.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,348 @@ @@ -0,0 +1,348 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -3585,8 +3586,8 @@
+ */ + */
+ packet_send_queued_handshake_initiation(peer, false); + packet_send_queued_handshake_initiation(peer, false);
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/socket.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/socket.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,393 @@ @@ -0,0 +1,393 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -3981,8 +3982,8 @@
+ sock_free(old4); + sock_free(old4);
+ sock_free(old6); + sock_free(old6);
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/timers.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/timers.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,199 @@ @@ -0,0 +1,199 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -4183,8 +4184,8 @@
+ del_timer_sync(&peer->timer_persistent_keepalive); + del_timer_sync(&peer->timer_persistent_keepalive);
+ flush_work(&peer->clear_peer_work); + flush_work(&peer->clear_peer_work);
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/allowedips.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/allowedips.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -4230,8 +4231,8 @@
+#endif +#endif
+ +
+#endif /* _WG_ALLOWEDIPS_H */ +#endif /* _WG_ALLOWEDIPS_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/cookie.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/cookie.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,52 @@ @@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -4285,8 +4286,8 @@
+void cookie_message_consume(struct message_handshake_cookie *src, struct wireguard_device *wg); +void cookie_message_consume(struct message_handshake_cookie *src, struct wireguard_device *wg);
+ +
+#endif /* _WG_COOKIE_H */ +#endif /* _WG_COOKIE_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/device.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/device.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,64 @@ @@ -0,0 +1,64 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -4352,8 +4353,8 @@
+void device_uninit(void); +void device_uninit(void);
+ +
+#endif /* _WG_DEVICE_H */ +#endif /* _WG_DEVICE_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/hashtables.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/hashtables.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,52 @@ @@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -4407,9 +4408,9 @@
+struct index_hashtable_entry *index_hashtable_lookup(struct index_hashtable *table, const enum index_hashtable_type type_mask, const __le32 index); +struct index_hashtable_entry *index_hashtable_lookup(struct index_hashtable *table, const enum index_hashtable_type type_mask, const __le32 index);
+ +
+#endif /* _WG_HASHTABLES_H */ +#endif /* _WG_HASHTABLES_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/messages.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/messages.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,129 @@ @@ -0,0 +1,128 @@
+/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: GPL-2.0 */
+/* +/*
+ * Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. + * Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
@@ -4472,8 +4473,7 @@
+ MESSAGE_HANDSHAKE_INITIATION = 1, + MESSAGE_HANDSHAKE_INITIATION = 1,
+ MESSAGE_HANDSHAKE_RESPONSE = 2, + MESSAGE_HANDSHAKE_RESPONSE = 2,
+ MESSAGE_HANDSHAKE_COOKIE = 3, + MESSAGE_HANDSHAKE_COOKIE = 3,
+ MESSAGE_DATA = 4, + MESSAGE_DATA = 4
+ MESSAGE_TOTAL = 5
+}; +};
+ +
+struct message_header { +struct message_header {
@@ -4539,8 +4539,8 @@
+}; +};
+ +
+#endif /* _WG_MESSAGES_H */ +#endif /* _WG_MESSAGES_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/netlink.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/netlink.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -4554,8 +4554,8 @@
+void genetlink_uninit(void); +void genetlink_uninit(void);
+ +
+#endif /* _WG_NETLINK_H */ +#endif /* _WG_NETLINK_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/noise.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/noise.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,117 @@ @@ -0,0 +1,117 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -4613,10 +4613,10 @@
+}; +};
+ +
+struct noise_static_identity { +struct noise_static_identity {
+ bool has_identity;
+ u8 static_public[NOISE_PUBLIC_KEY_LEN]; + u8 static_public[NOISE_PUBLIC_KEY_LEN];
+ u8 static_private[NOISE_PUBLIC_KEY_LEN]; + u8 static_private[NOISE_PUBLIC_KEY_LEN];
+ struct rw_semaphore lock; + struct rw_semaphore lock;
+ bool has_identity;
+}; +};
+ +
+enum noise_handshake_state { +enum noise_handshake_state {
@@ -4668,14 +4668,14 @@
+bool noise_handshake_create_initiation(struct message_handshake_initiation *dst, struct noise_handshake *handshake); +bool noise_handshake_create_initiation(struct message_handshake_initiation *dst, struct noise_handshake *handshake);
+struct wireguard_peer *noise_handshake_consume_initiation(struct message_handshake_initiation *src, struct wireguard_device *wg); +struct wireguard_peer *noise_handshake_consume_initiation(struct message_handshake_initiation *src, struct wireguard_device *wg);
+ +
+bool noise_handshake_create_response(struct message_handshake_response *dst, struct noise_handshake *peer); +bool noise_handshake_create_response(struct message_handshake_response *dst, struct noise_handshake *handshake);
+struct wireguard_peer *noise_handshake_consume_response(struct message_handshake_response *src, struct wireguard_device *wg); +struct wireguard_peer *noise_handshake_consume_response(struct message_handshake_response *src, struct wireguard_device *wg);
+ +
+bool noise_handshake_begin_session(struct noise_handshake *handshake, struct noise_keypairs *keypairs); +bool noise_handshake_begin_session(struct noise_handshake *handshake, struct noise_keypairs *keypairs);
+ +
+#endif /* _WG_NOISE_H */ +#endif /* _WG_NOISE_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/peer.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/peer.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,73 @@ @@ -0,0 +1,73 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -4750,8 +4750,8 @@
+struct wireguard_peer *peer_lookup_by_index(struct wireguard_device *wg, u32 index); +struct wireguard_peer *peer_lookup_by_index(struct wireguard_device *wg, u32 index);
+ +
+#endif /* _WG_PEER_H */ +#endif /* _WG_PEER_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/queueing.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/queueing.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,142 @@ @@ -0,0 +1,142 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -4818,7 +4818,7 @@
+ +
+static inline void skb_reset(struct sk_buff *skb) +static inline void skb_reset(struct sk_buff *skb)
+{ +{
+ skb_scrub_packet(skb, false); + skb_scrub_packet(skb, true);
+ memset(&skb->headers_start, 0, offsetof(struct sk_buff, headers_end) - offsetof(struct sk_buff, headers_start)); + memset(&skb->headers_start, 0, offsetof(struct sk_buff, headers_end) - offsetof(struct sk_buff, headers_start));
+ skb->queue_mapping = 0; + skb->queue_mapping = 0;
+ skb->nohdr = 0; + skb->nohdr = 0;
@@ -4895,8 +4895,8 @@
+#endif +#endif
+ +
+#endif /* _WG_QUEUEING_H */ +#endif /* _WG_QUEUEING_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/ratelimiter.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/ratelimiter.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -4917,8 +4917,8 @@
+#endif +#endif
+ +
+#endif /* _WG_RATELIMITER_H */ +#endif /* _WG_RATELIMITER_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/socket.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/socket.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -4955,8 +4955,8 @@
+#endif +#endif
+ +
+#endif /* _WG_SOCKET_H */ +#endif /* _WG_SOCKET_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/timers.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/timers.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -4979,12 +4979,12 @@
+void timers_any_authenticated_packet_traversal(struct wireguard_peer *peer); +void timers_any_authenticated_packet_traversal(struct wireguard_peer *peer);
+ +
+#endif /* _WG_TIMERS_H */ +#endif /* _WG_TIMERS_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/version.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/version.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1 @@ @@ -0,0 +1 @@
+#define WIREGUARD_VERSION "0.0.20180218" +#define WIREGUARD_VERSION "0.0.20180304"
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/uapi/wireguard.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/uapi/wireguard.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,182 @@ @@ -0,0 +1,182 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT) +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT)
+ * + *
@@ -5168,8 +5168,8 @@
+#define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1) +#define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1)
+ +
+#endif /* _WG_UAPI_WIREGUARD_H */ +#endif /* _WG_UAPI_WIREGUARD_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/selftest/allowedips.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/selftest/allowedips.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,514 @@ @@ -0,0 +1,514 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -5685,8 +5685,8 @@
+#undef init_peer +#undef init_peer
+ +
+#endif +#endif
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/selftest/blake2s.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/selftest/blake2s.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,559 @@ @@ -0,0 +1,559 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -6247,8 +6247,8 @@
+ return success; + return success;
+} +}
+#endif +#endif
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/selftest/chacha20poly1305.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/selftest/chacha20poly1305.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,333 @@ @@ -0,0 +1,333 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -6583,8 +6583,8 @@
+ return success; + return success;
+} +}
+#endif +#endif
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/selftest/counter.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/selftest/counter.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,92 @@ @@ -0,0 +1,92 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -6678,8 +6678,8 @@
+ return success; + return success;
+} +}
+#endif +#endif
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/selftest/curve25519.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/selftest/curve25519.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,103 @@ @@ -0,0 +1,103 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -6784,8 +6784,8 @@
+ return success; + return success;
+} +}
+#endif +#endif
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/selftest/poly1305.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/selftest/poly1305.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,1566 @@ @@ -0,0 +1,1566 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -8353,8 +8353,8 @@
+ return success; + return success;
+} +}
+#endif +#endif
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/selftest/ratelimiter.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/selftest/ratelimiter.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,157 @@ @@ -0,0 +1,157 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -8513,8 +8513,8 @@
+ return ret; + return ret;
+} +}
+#endif +#endif
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/blake2s.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/blake2s.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,294 @@ @@ -0,0 +1,294 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -8631,8 +8631,8 @@
+#include <asm/processor.h> +#include <asm/processor.h>
+#include <asm/fpu/api.h> +#include <asm/fpu/api.h>
+#include <asm/simd.h> +#include <asm/simd.h>
+static bool blake2s_use_avx __read_mostly; +static bool blake2s_use_avx __ro_after_init;
+static bool blake2s_use_avx512 __read_mostly; +static bool blake2s_use_avx512 __ro_after_init;
+void __init blake2s_fpu_init(void) +void __init blake2s_fpu_init(void)
+{ +{
+#ifndef CONFIG_UML +#ifndef CONFIG_UML
@@ -8810,8 +8810,8 @@
+} +}
+ +
+#include "../selftest/blake2s.h" +#include "../selftest/blake2s.h"
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/chacha20poly1305.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/chacha20poly1305.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,852 @@ @@ -0,0 +1,852 @@
+/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0) +/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0)
+ * + *
@@ -8853,11 +8853,11 @@
+asmlinkage void poly1305_blocks_avx512(void *ctx, const u8 *inp, size_t len, u32 padbit); +asmlinkage void poly1305_blocks_avx512(void *ctx, const u8 *inp, size_t len, u32 padbit);
+#endif +#endif
+ +
+static bool chacha20poly1305_use_ssse3 __read_mostly; +static bool chacha20poly1305_use_ssse3 __ro_after_init;
+static bool chacha20poly1305_use_avx __read_mostly; +static bool chacha20poly1305_use_avx __ro_after_init;
+static bool chacha20poly1305_use_avx2 __read_mostly; +static bool chacha20poly1305_use_avx2 __ro_after_init;
+static bool chacha20poly1305_use_avx512 __read_mostly; +static bool chacha20poly1305_use_avx512 __ro_after_init;
+static bool chacha20poly1305_use_avx512vl __read_mostly; +static bool chacha20poly1305_use_avx512vl __ro_after_init;
+ +
+void __init chacha20poly1305_fpu_init(void) +void __init chacha20poly1305_fpu_init(void)
+{ +{
@@ -8889,7 +8889,7 @@
+asmlinkage void poly1305_emit_neon(void *ctx, u8 mac[16], const u32 nonce[4]); +asmlinkage void poly1305_emit_neon(void *ctx, u8 mac[16], const u32 nonce[4]);
+asmlinkage void chacha20_neon(u8 *out, const u8 *in, size_t len, const u32 key[8], const u32 counter[4]); +asmlinkage void chacha20_neon(u8 *out, const u8 *in, size_t len, const u32 key[8], const u32 counter[4]);
+#endif +#endif
+static bool chacha20poly1305_use_neon __read_mostly; +static bool chacha20poly1305_use_neon __ro_after_init;
+void __init chacha20poly1305_fpu_init(void) +void __init chacha20poly1305_fpu_init(void)
+{ +{
+#if defined(CONFIG_ARM64) +#if defined(CONFIG_ARM64)
@@ -9665,8 +9665,8 @@
+ +
+#include "../selftest/chacha20poly1305.h" +#include "../selftest/chacha20poly1305.h"
+#include "../selftest/poly1305.h" +#include "../selftest/poly1305.h"
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/curve25519.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/curve25519.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,81 @@ @@ -0,0 +1,81 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -9749,8 +9749,8 @@
+} +}
+ +
+#include "../selftest/curve25519.h" +#include "../selftest/curve25519.h"
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/blake2s.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/blake2s.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,94 @@ @@ -0,0 +1,94 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -9846,8 +9846,8 @@
+#endif +#endif
+ +
+#endif /* _WG_BLAKE2S_H */ +#endif /* _WG_BLAKE2S_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/chacha20poly1305.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/chacha20poly1305.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,93 @@ @@ -0,0 +1,93 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -9942,8 +9942,8 @@
+#endif +#endif
+ +
+#endif /* _WG_CHACHA20POLY1305_H */ +#endif /* _WG_CHACHA20POLY1305_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/curve25519-arm.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/curve25519-arm.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -9954,13 +9954,13 @@
+#include <asm/neon.h> +#include <asm/neon.h>
+#include <asm/simd.h> +#include <asm/simd.h>
+asmlinkage void curve25519_neon(u8 mypublic[CURVE25519_POINT_SIZE], const u8 secret[CURVE25519_POINT_SIZE], const u8 basepoint[CURVE25519_POINT_SIZE]); +asmlinkage void curve25519_neon(u8 mypublic[CURVE25519_POINT_SIZE], const u8 secret[CURVE25519_POINT_SIZE], const u8 basepoint[CURVE25519_POINT_SIZE]);
+static bool curve25519_use_neon __read_mostly; +static bool curve25519_use_neon __ro_after_init;
+void __init curve25519_fpu_init(void) +void __init curve25519_fpu_init(void)
+{ +{
+ curve25519_use_neon = elf_hwcap & HWCAP_NEON; + curve25519_use_neon = elf_hwcap & HWCAP_NEON;
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/curve25519-fiat32.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/curve25519-fiat32.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,838 @@ @@ -0,0 +1,838 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -10800,8 +10800,8 @@
+ memzero_explicit(&tmp1l, sizeof(tmp1l)); + memzero_explicit(&tmp1l, sizeof(tmp1l));
+ memzero_explicit(&e, sizeof(e)); + memzero_explicit(&e, sizeof(e));
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/curve25519.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/curve25519.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -10828,8 +10828,8 @@
+#endif +#endif
+ +
+#endif /* _WG_CURVE25519_H */ +#endif /* _WG_CURVE25519_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/curve25519-hacl64.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/curve25519-hacl64.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,751 @@ @@ -0,0 +1,751 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -11582,9 +11582,9 @@
+ } + }
+ memzero_explicit(buf0, sizeof(buf0)); + memzero_explicit(buf0, sizeof(buf0));
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/curve25519-x86_64.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/curve25519-x86_64.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,175 @@ @@ -0,0 +1,176 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
+ * Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. + * Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
@@ -11596,7 +11596,8 @@
+#include <asm/processor.h> +#include <asm/processor.h>
+#include <asm/fpu/api.h> +#include <asm/fpu/api.h>
+#include <asm/simd.h> +#include <asm/simd.h>
+static bool curve25519_use_avx __read_mostly; +
+static bool curve25519_use_avx __ro_after_init;
+void __init curve25519_fpu_init(void) +void __init curve25519_fpu_init(void)
+{ +{
+#ifndef CONFIG_UML +#ifndef CONFIG_UML
@@ -11760,8 +11761,8 @@
+ memzero_explicit(x_51, sizeof(x_51)); + memzero_explicit(x_51, sizeof(x_51));
+ memzero_explicit(z_51, sizeof(z_51)); + memzero_explicit(z_51, sizeof(z_51));
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/blake2s-x86_64.S 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/blake2s-x86_64.S 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,685 @@ @@ -0,0 +1,685 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -12448,8 +12449,8 @@
+ retq + retq
+ENDPROC(blake2s_compress_avx512) +ENDPROC(blake2s_compress_avx512)
+#endif /* CONFIG_AS_AVX512 */ +#endif /* CONFIG_AS_AVX512 */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/chacha20-arm64.S 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/chacha20-arm64.S 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,1940 @@ @@ -0,0 +1,1940 @@
+/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0) +/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0)
+ * + *
@@ -14391,8 +14392,8 @@
+.Labort_neon: +.Labort_neon:
+ ret + ret
+ENDPROC(chacha20_neon) +ENDPROC(chacha20_neon)
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/chacha20-arm.S 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/chacha20-arm.S 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,1471 @@ @@ -0,0 +1,1471 @@
+/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0) +/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0)
+ * + *
@@ -15865,8 +15866,8 @@
+.Lno_data_arm: +.Lno_data_arm:
+ ldmia sp!,{r4-r11,pc} + ldmia sp!,{r4-r11,pc}
+ENDPROC(chacha20_arm) +ENDPROC(chacha20_arm)
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/chacha20-x86_64.S 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/chacha20-x86_64.S 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,2630 @@ @@ -0,0 +1,2630 @@
+/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0) +/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0)
+ * + *
@@ -18498,8 +18499,8 @@
+ENDPROC(chacha20_avx512vl) +ENDPROC(chacha20_avx512vl)
+ +
+#endif /* CONFIG_AS_AVX512 */ +#endif /* CONFIG_AS_AVX512 */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/curve25519-arm.S 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/curve25519-arm.S 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,2110 @@ @@ -0,0 +1,2110 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -20611,8 +20612,8 @@
+ bx lr + bx lr
+ENDPROC(curve25519_neon) +ENDPROC(curve25519_neon)
+#endif +#endif
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/curve25519-x86_64.S 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/curve25519-x86_64.S 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,3261 @@ @@ -0,0 +1,3261 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -23875,8 +23876,8 @@
+ ret + ret
+ENDPROC(curve25519_sandy2x_ladder_base) +ENDPROC(curve25519_sandy2x_ladder_base)
+#endif /* CONFIG_AS_AVX */ +#endif /* CONFIG_AS_AVX */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/poly1305-arm64.S 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/poly1305-arm64.S 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,820 @@ @@ -0,0 +1,820 @@
+/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0) +/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0)
+ * + *
@@ -24698,8 +24699,8 @@
+.align 5 +.align 5
+.Lzeros: +.Lzeros:
+.long 0,0,0,0,0,0,0,0 +.long 0,0,0,0,0,0,0,0
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/poly1305-arm.S 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/poly1305-arm.S 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,1115 @@ @@ -0,0 +1,1115 @@
+/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0) +/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0)
+ * + *
@@ -25816,8 +25817,8 @@
+.Lzeros: +.Lzeros:
+.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+#endif +#endif
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/poly1305-mips64.S 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/poly1305-mips64.S 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,357 @@ @@ -0,0 +1,357 @@
+/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0) +/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0)
+ * + *
@@ -26176,8 +26177,8 @@
+ +
+ jr $31 + jr $31
+.end poly1305_emit_mips +.end poly1305_emit_mips
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/crypto/poly1305-x86_64.S 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/crypto/poly1305-x86_64.S 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,2803 @@ @@ -0,0 +1,2803 @@
+/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0) +/* SPDX-License-Identifier: OpenSSL OR (BSD-3-Clause OR GPL-2.0)
+ * + *
@@ -28982,8 +28983,8 @@
+ +
+ENDPROC(poly1305_blocks_avx512) +ENDPROC(poly1305_blocks_avx512)
+#endif /* CONFIG_AS_AVX512 */ +#endif /* CONFIG_AS_AVX512 */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/Makefile 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/Makefile 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
+# SPDX-License-Identifier: GPL-2.0 +# SPDX-License-Identifier: GPL-2.0
+# +#
@@ -29004,13 +29005,14 @@
+include $(src)/compat/Makefile.include +include $(src)/compat/Makefile.include
+ +
+obj-$(if $(KBUILD_EXTMOD),m,$(CONFIG_WIREGUARD)) := wireguard.o +obj-$(if $(KBUILD_EXTMOD),m,$(CONFIG_WIREGUARD)) := wireguard.o
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/Kconfig 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/Kconfig 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,30 @@ @@ -0,0 +1,31 @@
+config WIREGUARD +config WIREGUARD
+ tristate "IP: WireGuard secure network tunnel" + tristate "IP: WireGuard secure network tunnel"
+ depends on NET && INET + depends on NET && INET
+ select NET_UDP_TUNNEL + select NET_UDP_TUNNEL
+ select DST_CACHE
+ select CRYPTO_BLKCIPHER + select CRYPTO_BLKCIPHER
+ select VFP + select VFP
+ select VFPv3 + select VFPv3
@@ -29037,12 +29039,12 @@
+ only useful for debugging. + only useful for debugging.
+ +
+ Say N here unless you know what you're doing. + Say N here unless you know what you're doing.
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/simd/include/asm/simd.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/simd/include/asm/simd.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1 @@ @@ -0,0 +1 @@
+#include <asm/i387.h> +#include <asm/i387.h>
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/udp_tunnel/udp_tunnel_partial_compat.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/udp_tunnel/udp_tunnel_partial_compat.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,226 @@ @@ -0,0 +1,226 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -29270,8 +29272,8 @@
+#define udp_port_cfg udp_port_cfg_new +#define udp_port_cfg udp_port_cfg_new
+#define udp_sock_create(a, b, c) udp_sock_create_new(a, b, c) +#define udp_sock_create(a, b, c) udp_sock_create_new(a, b, c)
+#endif +#endif
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/udp_tunnel/include/net/udp_tunnel.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/udp_tunnel/include/net/udp_tunnel.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,94 @@ @@ -0,0 +1,94 @@
+#ifndef _WG_NET_UDP_TUNNEL_H +#ifndef _WG_NET_UDP_TUNNEL_H
+#define _WG_NET_UDP_TUNNEL_H +#define _WG_NET_UDP_TUNNEL_H
@@ -29367,8 +29369,8 @@
+void udp_tunnel_sock_release(struct socket *sock); +void udp_tunnel_sock_release(struct socket *sock);
+ +
+#endif /* _WG_NET_UDP_TUNNEL_H */ +#endif /* _WG_NET_UDP_TUNNEL_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/udp_tunnel/udp_tunnel.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/udp_tunnel/udp_tunnel.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,385 @@ @@ -0,0 +1,385 @@
+#include <linux/module.h> +#include <linux/module.h>
+#include <linux/errno.h> +#include <linux/errno.h>
@@ -29755,12 +29757,12 @@
+ return 0; + return 0;
+} +}
+#endif +#endif
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/fpu/include/asm/fpu/api.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/fpu/include/asm/fpu/api.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1 @@ @@ -0,0 +1 @@
+#include <asm/i387.h> +#include <asm/i387.h>
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/checksum/checksum_partial_compat.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/checksum/checksum_partial_compat.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,208 @@ @@ -0,0 +1,208 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -29970,21 +29972,22 @@
+ } + }
+ return err; + return err;
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/Makefile.include 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/Makefile.include 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,70 @@ @@ -0,0 +1,71 @@
+# SPDX-License-Identifier: GPL-2.0 +# SPDX-License-Identifier: GPL-2.0
+# +#
+# Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. +# Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
+ +
+ifeq ($(wildcard $(src)/compat/compat.h),) +ifeq ($(wildcard $(src)/compat/compat.h),)
+ccflags-y += -include $(srctree)/$(src)/compat/compat.h +cmd_include_path_prefix := $(srctree)/$(src)
+asflags-y += -include $(srctree)/$(src)/compat/compat-asm.h
+else +else
+ccflags-y += -include $(src)/compat/compat.h +cmd_include_path_prefix := $(src)
+asflags-y += -include $(src)/compat/compat-asm.h
+endif +endif
+ +
+ccflags-y += -include $(cmd_include_path_prefix)/compat/compat.h
+asflags-y += -include $(cmd_include_path_prefix)/compat/compat-asm.h
+
+ifeq ($(wildcard $(srctree)/include/linux/ptr_ring.h),) +ifeq ($(wildcard $(srctree)/include/linux/ptr_ring.h),)
+ccflags-y += -I$(src)/compat/ptr_ring/include +ccflags-y += -I$(src)/compat/ptr_ring/include
+endif +endif
@@ -30017,7 +30020,7 @@
+endif +endif
+ +
+ifeq ($(shell grep -F "int crypto_memneq" "$(srctree)/include/crypto/algapi.h"),) +ifeq ($(shell grep -F "int crypto_memneq" "$(srctree)/include/crypto/algapi.h"),)
+ccflags-y += -include $(src)/compat/memneq/include.h +ccflags-y += -include $(cmd_include_path_prefix)/compat/memneq/include.h
+wireguard-y += compat/memneq/memneq.o +wireguard-y += compat/memneq/memneq.o
+endif +endif
+ +
@@ -30043,8 +30046,8 @@
+ asflags-y += $(avx512_instr) + asflags-y += $(avx512_instr)
+ endif + endif
+endif +endif
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/siphash/siphash.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/siphash/siphash.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,539 @@ @@ -0,0 +1,539 @@
+/* Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. +/* Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
+ * + *
@@ -30585,8 +30588,8 @@
+ HPOSTAMBLE + HPOSTAMBLE
+} +}
+#endif +#endif
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/siphash/include/linux/siphash.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/siphash/include/linux/siphash.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,140 @@ @@ -0,0 +1,140 @@
+/* Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. +/* Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
+ * + *
@@ -30728,8 +30731,8 @@
+} +}
+ +
+#endif /* _WG_LINUX_SIPHASH_H */ +#endif /* _WG_LINUX_SIPHASH_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/intel-family/include/asm/intel-family.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/intel-family/include/asm/intel-family.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,73 @@ @@ -0,0 +1,73 @@
+/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_X86_INTEL_FAMILY_H +#ifndef _ASM_X86_INTEL_FAMILY_H
@@ -30804,8 +30807,8 @@
+#define INTEL_FAM6_XEON_PHI_KNM 0x85 /* Knights Mill */ +#define INTEL_FAM6_XEON_PHI_KNM 0x85 /* Knights Mill */
+ +
+#endif /* _ASM_X86_INTEL_FAMILY_H */ +#endif /* _ASM_X86_INTEL_FAMILY_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/compat.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/compat.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,632 @@ @@ -0,0 +1,632 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -31291,7 +31294,7 @@
+#else +#else
+#define ___COMPAT_NETLINK_DUMP_BLOCK return get_device_dump_real(skb, cb); +#define ___COMPAT_NETLINK_DUMP_BLOCK return get_device_dump_real(skb, cb);
+#endif +#endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 14) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) || LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 63) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
+#define get_device_dump(a, b) get_device_dump_real(a, b); \ +#define get_device_dump(a, b) get_device_dump_real(a, b); \
+static int get_device_dump(a, b) { \ +static int get_device_dump(a, b) { \
+ struct wireguard_device *wg = (struct wireguard_device *)cb->args[0]; \ + struct wireguard_device *wg = (struct wireguard_device *)cb->args[0]; \
@@ -31439,8 +31442,8 @@
+#endif +#endif
+ +
+#endif /* _WG_COMPAT_H */ +#endif /* _WG_COMPAT_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/ptr_ring/include/linux/ptr_ring.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/ptr_ring/include/linux/ptr_ring.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,640 @@ @@ -0,0 +1,640 @@
+/* +/*
+ * Definitions for the 'struct ptr_ring' datastructure. + * Definitions for the 'struct ptr_ring' datastructure.
@@ -32082,16 +32085,16 @@
+} +}
+ +
+#endif /* _LINUX_PTR_RING_H */ +#endif /* _LINUX_PTR_RING_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/memneq/include.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/memneq/include.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
+extern noinline unsigned long __crypto_memneq(const void *a, const void *b, size_t size); +extern noinline unsigned long __crypto_memneq(const void *a, const void *b, size_t size);
+static inline int crypto_memneq(const void *a, const void *b, size_t size) +static inline int crypto_memneq(const void *a, const void *b, size_t size)
+{ +{
+ return __crypto_memneq(a, b, size) != 0UL ? 1 : 0; + return __crypto_memneq(a, b, size) != 0UL ? 1 : 0;
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/memneq/memneq.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/memneq/memneq.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,170 @@ @@ -0,0 +1,170 @@
+/* +/*
+ * Constant-time equality testing of memory regions. + * Constant-time equality testing of memory regions.
@@ -32157,7 +32160,7 @@
+#include <crypto/algapi.h> +#include <crypto/algapi.h>
+ +
+/* Make the optimizer believe the variable can be manipulated arbitrarily. */ +/* Make the optimizer believe the variable can be manipulated arbitrarily. */
+#define COMPILER_OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "=r" (var) : "0" (var)) +#define COMPILER_OPTIMIZER_HIDE_VAR(var) asm("" : "=r" (var) : "0" (var))
+ +
+#ifndef __HAVE_ARCH_CRYPTO_MEMNEQ +#ifndef __HAVE_ARCH_CRYPTO_MEMNEQ
+ +
@@ -32263,8 +32266,8 @@
+} +}
+ +
+#endif /* __HAVE_ARCH_CRYPTO_MEMNEQ */ +#endif /* __HAVE_ARCH_CRYPTO_MEMNEQ */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/dst_cache/dst_cache.c 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/dst_cache/dst_cache.c 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,175 @@ @@ -0,0 +1,175 @@
+/* +/*
+ * net/core/dst_cache.c - dst entry cache + * net/core/dst_cache.c - dst entry cache
@@ -32441,8 +32444,8 @@
+ +
+ free_percpu(dst_cache->cache); + free_percpu(dst_cache->cache);
+} +}
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/dst_cache/include/net/dst_cache.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/dst_cache/include/net/dst_cache.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,97 @@ @@ -0,0 +1,97 @@
+#ifndef _WG_NET_DST_CACHE_H +#ifndef _WG_NET_DST_CACHE_H
+#define _WG_NET_DST_CACHE_H +#define _WG_NET_DST_CACHE_H
@@ -32541,8 +32544,8 @@
+void dst_cache_destroy(struct dst_cache *dst_cache); +void dst_cache_destroy(struct dst_cache *dst_cache);
+ +
+#endif /* _WG_NET_DST_CACHE_H */ +#endif /* _WG_NET_DST_CACHE_H */
--- /dev/null 2018-02-18 13:06:28.903837808 +0200 --- /dev/null 2018-03-04 21:55:12.891724619 +0200
+++ b/net/wireguard/compat/compat-asm.h 2018-02-18 22:22:31.000000000 +0200 +++ b/net/wireguard/compat/compat-asm.h 2018-03-04 19:51:33.000000000 +0200
@@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0
+ * + *
@@ -0,0 +1,84 @@
From 57ebd808a97d7c5b1e1afb937c2db22beba3c1f8 Mon Sep 17 00:00:00 2001
From: Florian Westphal <fw@strlen.de>
Date: Wed, 7 Feb 2018 13:46:25 +0100
Subject: [PATCH] netfilter: add back stackpointer size checks
The rationale for removing the check is only correct for rulesets
generated by ip(6)tables.
In iptables, a jump can only occur to a user-defined chain, i.e.
because we size the stack based on number of user-defined chains we
cannot exceed stack size.
However, the underlying binary format has no such restriction,
and the validation step only ensures that the jump target is a
valid rule start point.
IOW, its possible to build a rule blob that has no user-defined
chains but does contain a jump.
If this happens, no jump stack gets allocated and crash occurs
because no jumpstack was allocated.
Fixes: 7814b6ec6d0d6 ("netfilter: xtables: don't save/restore jumpstack offset")
Reported-by: syzbot+e783f671527912cd9403@syzkaller.appspotmail.com
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/ipv4/netfilter/arp_tables.c | 4 ++++
net/ipv4/netfilter/ip_tables.c | 7 ++++++-
net/ipv6/netfilter/ip6_tables.c | 4 ++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index 4ffe302f9b82..e3e420f3ba7b 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -252,6 +252,10 @@ unsigned int arpt_do_table(struct sk_buff *skb,
}
if (table_base + v
!= arpt_next_entry(e)) {
+ if (unlikely(stackidx >= private->stacksize)) {
+ verdict = NF_DROP;
+ break;
+ }
jumpstack[stackidx++] = e;
}
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 9a71f3149507..e38395a8dcf2 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -330,8 +330,13 @@ ipt_do_table(struct sk_buff *skb,
continue;
}
if (table_base + v != ipt_next_entry(e) &&
- !(e->ip.flags & IPT_F_GOTO))
+ !(e->ip.flags & IPT_F_GOTO)) {
+ if (unlikely(stackidx >= private->stacksize)) {
+ verdict = NF_DROP;
+ break;
+ }
jumpstack[stackidx++] = e;
+ }
e = get_entry(table_base, v);
continue;
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index af4c917e0836..62358b93bbac 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -352,6 +352,10 @@ ip6t_do_table(struct sk_buff *skb,
}
if (table_base + v != ip6t_next_entry(e) &&
!(e->ipv6.flags & IP6T_F_GOTO)) {
+ if (unlikely(stackidx >= private->stacksize)) {
+ verdict = NF_DROP;
+ break;
+ }
jumpstack[stackidx++] = e;
}
--
2.16.2
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
From 3b7711fd3adb7d6b812a33da4a4639ddce6522b6 Mon Sep 17 00:00:00 2001 From 3b7711fd3adb7d6b812a33da4a4639ddce6522b6 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Fri, 19 Jan 2018 13:46:20 +0100 Date: Fri, 19 Jan 2018 13:46:20 +0100
Subject: [PATCH 01/31] x86/asm-offsets: Move TSS_sp0 and TSS_sp1 to Subject: [PATCH 01/34] x86/asm-offsets: Move TSS_sp0 and TSS_sp1 to
asm-offsets.c asm-offsets.c
These offsets will be used in 32 bit assembly code as well, These offsets will be used in 32 bit assembly code as well,
@@ -40,5 +40,5 @@ index bf51e51d808d..d2eba73a5f8a 100644
#ifdef CONFIG_CC_STACKPROTECTOR #ifdef CONFIG_CC_STACKPROTECTOR
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From 52806123bdb0b558a5b4fbfa132bae32e53b008a Mon Sep 17 00:00:00 2001 From 52806123bdb0b558a5b4fbfa132bae32e53b008a Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Mon, 15 Jan 2018 18:20:15 +0100 Date: Mon, 15 Jan 2018 18:20:15 +0100
Subject: [PATCH 02/31] x86/entry/32: Rename TSS_sysenter_sp0 to Subject: [PATCH 02/34] x86/entry/32: Rename TSS_sysenter_sp0 to
TSS_entry_stack TSS_entry_stack
The stack address doesn't need to be stored in tss.sp0 if The stack address doesn't need to be stored in tss.sp0 if
@@ -44,5 +44,5 @@ index fa1261eefa16..f452bfdc485a 100644
#ifdef CONFIG_CC_STACKPROTECTOR #ifdef CONFIG_CC_STACKPROTECTOR
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From b696a2c46d9b9937b816b11ff2ec72aa0b65f204 Mon Sep 17 00:00:00 2001 From b696a2c46d9b9937b816b11ff2ec72aa0b65f204 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Fri, 19 Jan 2018 13:33:37 +0100 Date: Fri, 19 Jan 2018 13:33:37 +0100
Subject: [PATCH 03/31] x86/entry/32: Load task stack from x86_tss.sp1 in Subject: [PATCH 03/34] x86/entry/32: Load task stack from x86_tss.sp1 in
SYSENTER handler SYSENTER handler
We want x86_tss.sp0 point to the entry stack later to use We want x86_tss.sp0 point to the entry stack later to use
@@ -45,5 +45,5 @@ index 5224c6099184..097d36a64889 100644
/* /*
* Restore %gs if needed (which is common) * Restore %gs if needed (which is common)
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From 7c97243c7694dc1c0e0ad73bc17bdc2c553225ac Mon Sep 17 00:00:00 2001 From 7c97243c7694dc1c0e0ad73bc17bdc2c553225ac Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 31 Jan 2018 10:50:02 +0100 Date: Wed, 31 Jan 2018 10:50:02 +0100
Subject: [PATCH 04/31] x86/entry/32: Put ESPFIX code into a macro Subject: [PATCH 04/34] x86/entry/32: Put ESPFIX code into a macro
This makes it easier to split up the shared iret code path. This makes it easier to split up the shared iret code path.
@@ -133,5 +133,5 @@ index e65977615616..0289bde37a08 100644
.macro FIXUP_ESPFIX_STACK .macro FIXUP_ESPFIX_STACK
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From c66ec22d03296d1311197aaef753c1c320eed225 Mon Sep 17 00:00:00 2001 From c66ec22d03296d1311197aaef753c1c320eed225 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 31 Jan 2018 10:58:38 +0100 Date: Wed, 31 Jan 2018 10:58:38 +0100
Subject: [PATCH 05/31] x86/entry/32: Unshare NMI return path Subject: [PATCH 05/34] x86/entry/32: Unshare NMI return path
NMI will no longer use most of the shared return path, NMI will no longer use most of the shared return path,
because NMI needs special handling when the CR3 switches for because NMI needs special handling when the CR3 switches for
@@ -39,5 +39,5 @@ index 0289bde37a08..00ae759a7c44 100644
#ifdef CONFIG_X86_ESPFIX32 #ifdef CONFIG_X86_ESPFIX32
.Lnmi_espfix_stack: .Lnmi_espfix_stack:
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From 916e5e906873de859d8a87c1ffb0323e167d1a44 Mon Sep 17 00:00:00 2001 From 916e5e906873de859d8a87c1ffb0323e167d1a44 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 31 Jan 2018 11:07:32 +0100 Date: Wed, 31 Jan 2018 11:07:32 +0100
Subject: [PATCH 06/31] x86/entry/32: Split off return-to-kernel path Subject: [PATCH 06/34] x86/entry/32: Split off return-to-kernel path
Use a separate return path when we know we are returning to Use a separate return path when we know we are returning to
the kernel. This allows us to put the PTI cr3-switch and the the kernel. This allows us to put the PTI cr3-switch and the
@@ -51,5 +51,5 @@ index 00ae759a7c44..9bd77183965f 100644
ENTRY(iret_exc ) ENTRY(iret_exc )
pushl $0 # no error code pushl $0 # no error code
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From c19ad15b16ec8908794459f28b44eca889a925f7 Mon Sep 17 00:00:00 2001 From c19ad15b16ec8908794459f28b44eca889a925f7 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 31 Jan 2018 11:29:59 +0100 Date: Wed, 31 Jan 2018 11:29:59 +0100
Subject: [PATCH 07/31] x86/entry/32: Restore segments before int registers Subject: [PATCH 07/34] x86/entry/32: Restore segments before int registers
Restoring the segments can cause exceptions that need to be Restoring the segments can cause exceptions that need to be
handled. With PTI enabled, we still need to be on kernel cr3 handled. With PTI enabled, we still need to be on kernel cr3
@@ -27,18 +27,18 @@ diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index 9bd77183965f..b39c5e210b43 100644 index 9bd77183965f..b39c5e210b43 100644
--- a/arch/x86/entry/entry_32.S --- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S
@@ -92,11 +92,6 @@ @@ -91,11 +91,6 @@
/* unfortunately push/pop can't be no-op */
.macro PUSH_GS .macro PUSH_GS
pushl $0 pushl $0
.endm -.endm
-.macro POP_GS pop=0 -.macro POP_GS pop=0
- addl $(4 + \pop), %esp - addl $(4 + \pop), %esp
-.endm -.endm
-.macro POP_GS_EX -.macro POP_GS_EX
-.endm .endm
/* all the rest are no-op */ /* all the rest are no-op */
.macro PTGS_TO_GS
@@ -116,20 +111,6 @@ @@ -116,20 +111,6 @@
pushl %gs pushl %gs
.endm .endm
@@ -107,5 +107,5 @@ index 9bd77183965f..b39c5e210b43 100644
.macro CHECK_AND_APPLY_ESPFIX .macro CHECK_AND_APPLY_ESPFIX
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From d9dc2b83bdfc2a9265302cc90b32739ac579f8cc Mon Sep 17 00:00:00 2001 From 288a2a6b31018ab9172598a39477404582ae29fa Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 10:55:52 +0100 Date: Tue, 16 Jan 2018 10:55:52 +0100
Subject: [PATCH 08/31] x86/entry/32: Enter the kernel via trampoline stack Subject: [PATCH 08/34] x86/entry/32: Enter the kernel via trampoline stack
Use the entry-stack as a trampoline to enter the kernel. The Use the entry-stack as a trampoline to enter the kernel. The
entry-stack is already in the cpu_entry_area and will be entry-stack is already in the cpu_entry_area and will be
@@ -9,16 +9,16 @@ mapped to userspace when PTI is enabled.
Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Joerg Roedel <jroedel@suse.de>
--- ---
arch/x86/entry/entry_32.S | 135 +++++++++++++++++++++++++++++++-------- arch/x86/entry/entry_32.S | 136 +++++++++++++++++++++++++++++++--------
arch/x86/include/asm/switch_to.h | 6 +- arch/x86/include/asm/switch_to.h | 6 +-
arch/x86/kernel/asm-offsets.c | 1 + arch/x86/kernel/asm-offsets.c | 1 +
arch/x86/kernel/cpu/common.c | 5 +- arch/x86/kernel/cpu/common.c | 5 +-
arch/x86/kernel/process.c | 2 - arch/x86/kernel/process.c | 2 -
arch/x86/kernel/process_32.c | 10 +-- arch/x86/kernel/process_32.c | 10 +--
6 files changed, 120 insertions(+), 39 deletions(-) 6 files changed, 121 insertions(+), 39 deletions(-)
diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index b39c5e210b43..e714b53b1eaa 100644 index b39c5e210b43..1737da2e4517 100644
--- a/arch/x86/entry/entry_32.S --- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S
@@ -135,25 +135,36 @@ @@ -135,25 +135,36 @@
@@ -65,7 +65,7 @@ index b39c5e210b43..e714b53b1eaa 100644
.endm .endm
/* /*
@@ -261,6 +272,71 @@ @@ -261,6 +272,72 @@
.Lend_\@: .Lend_\@:
#endif /* CONFIG_X86_ESPFIX32 */ #endif /* CONFIG_X86_ESPFIX32 */
.endm .endm
@@ -128,8 +128,9 @@ index b39c5e210b43..e714b53b1eaa 100644
+ * We are now on the task-stack and can safely copy over the + * We are now on the task-stack and can safely copy over the
+ * stack-frame + * stack-frame
+ */ + */
+ shrl $2, %ecx
+ cld + cld
+ rep movsb + rep movsl
+ +
+.Lend_\@: +.Lend_\@:
+.endm +.endm
@@ -137,7 +138,7 @@ index b39c5e210b43..e714b53b1eaa 100644
/* /*
* %eax: prev task * %eax: prev task
* %edx: next task * %edx: next task
@@ -454,6 +530,7 @@ ENTRY(xen_sysenter_target) @@ -454,6 +531,7 @@ ENTRY(xen_sysenter_target)
*/ */
ENTRY(entry_SYSENTER_32) ENTRY(entry_SYSENTER_32)
movl TSS_entry_stack(%esp), %esp movl TSS_entry_stack(%esp), %esp
@@ -145,7 +146,7 @@ index b39c5e210b43..e714b53b1eaa 100644
.Lsysenter_past_esp: .Lsysenter_past_esp:
pushl $__USER_DS /* pt_regs->ss */ pushl $__USER_DS /* pt_regs->ss */
pushl %ebp /* pt_regs->sp (stashed in bp) */ pushl %ebp /* pt_regs->sp (stashed in bp) */
@@ -462,7 +539,7 @@ ENTRY(entry_SYSENTER_32) @@ -462,7 +540,7 @@ ENTRY(entry_SYSENTER_32)
pushl $__USER_CS /* pt_regs->cs */ pushl $__USER_CS /* pt_regs->cs */
pushl $0 /* pt_regs->ip = 0 (placeholder) */ pushl $0 /* pt_regs->ip = 0 (placeholder) */
pushl %eax /* pt_regs->orig_ax */ pushl %eax /* pt_regs->orig_ax */
@@ -154,7 +155,7 @@ index b39c5e210b43..e714b53b1eaa 100644
/* /*
* SYSENTER doesn't filter flags, so we need to clear NT, AC * SYSENTER doesn't filter flags, so we need to clear NT, AC
@@ -573,7 +650,8 @@ ENDPROC(entry_SYSENTER_32) @@ -573,7 +651,8 @@ ENDPROC(entry_SYSENTER_32)
ENTRY(entry_INT80_32) ENTRY(entry_INT80_32)
ASM_CLAC ASM_CLAC
pushl %eax /* pt_regs->orig_ax */ pushl %eax /* pt_regs->orig_ax */
@@ -164,7 +165,7 @@ index b39c5e210b43..e714b53b1eaa 100644
/* /*
* User mode is traced as though IRQs are on, and the interrupt gate * User mode is traced as though IRQs are on, and the interrupt gate
@@ -665,7 +743,8 @@ END(irq_entries_start) @@ -665,7 +744,8 @@ END(irq_entries_start)
common_interrupt: common_interrupt:
ASM_CLAC ASM_CLAC
addl $-0x80, (%esp) /* Adjust vector into the [-256, -1] range */ addl $-0x80, (%esp) /* Adjust vector into the [-256, -1] range */
@@ -174,7 +175,7 @@ index b39c5e210b43..e714b53b1eaa 100644
ENCODE_FRAME_POINTER ENCODE_FRAME_POINTER
TRACE_IRQS_OFF TRACE_IRQS_OFF
movl %esp, %eax movl %esp, %eax
@@ -673,16 +752,16 @@ common_interrupt: @@ -673,16 +753,16 @@ common_interrupt:
jmp ret_from_intr jmp ret_from_intr
ENDPROC(common_interrupt) ENDPROC(common_interrupt)
@@ -201,7 +202,7 @@ index b39c5e210b43..e714b53b1eaa 100644
ENDPROC(name) ENDPROC(name)
#define BUILD_INTERRUPT(name, nr) \ #define BUILD_INTERRUPT(name, nr) \
@@ -908,16 +987,20 @@ common_exception: @@ -908,16 +988,20 @@ common_exception:
pushl %es pushl %es
pushl %ds pushl %ds
pushl %eax pushl %eax
@@ -224,7 +225,7 @@ index b39c5e210b43..e714b53b1eaa 100644
UNWIND_ESPFIX_STACK UNWIND_ESPFIX_STACK
GS_TO_REG %ecx GS_TO_REG %ecx
movl PT_GS(%esp), %edi # get the function address movl PT_GS(%esp), %edi # get the function address
@@ -925,9 +1008,6 @@ common_exception: @@ -925,9 +1009,6 @@ common_exception:
movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart
REG_TO_PTGS %ecx REG_TO_PTGS %ecx
SET_KERNEL_GS %ecx SET_KERNEL_GS %ecx
@@ -234,7 +235,7 @@ index b39c5e210b43..e714b53b1eaa 100644
TRACE_IRQS_OFF TRACE_IRQS_OFF
movl %esp, %eax # pt_regs pointer movl %esp, %eax # pt_regs pointer
CALL_NOSPEC %edi CALL_NOSPEC %edi
@@ -946,6 +1026,7 @@ ENTRY(debug) @@ -946,6 +1027,7 @@ ENTRY(debug)
*/ */
ASM_CLAC ASM_CLAC
pushl $-1 # mark this as an int pushl $-1 # mark this as an int
@@ -242,7 +243,7 @@ index b39c5e210b43..e714b53b1eaa 100644
SAVE_ALL SAVE_ALL
ENCODE_FRAME_POINTER ENCODE_FRAME_POINTER
xorl %edx, %edx # error code 0 xorl %edx, %edx # error code 0
@@ -981,6 +1062,7 @@ END(debug) @@ -981,6 +1063,7 @@ END(debug)
*/ */
ENTRY(nmi) ENTRY(nmi)
ASM_CLAC ASM_CLAC
@@ -250,7 +251,7 @@ index b39c5e210b43..e714b53b1eaa 100644
#ifdef CONFIG_X86_ESPFIX32 #ifdef CONFIG_X86_ESPFIX32
pushl %eax pushl %eax
movl %ss, %eax movl %ss, %eax
@@ -1048,7 +1130,8 @@ END(nmi) @@ -1048,7 +1131,8 @@ END(nmi)
ENTRY(int3) ENTRY(int3)
ASM_CLAC ASM_CLAC
pushl $-1 # mark this as an int pushl $-1 # mark this as an int
@@ -351,5 +352,5 @@ index 097d36a64889..3f3a8c620c63 100644
/* /*
-- --
2.13.6 2.16.2
@@ -1,29 +1,30 @@
From 4a06e416cfe4d173f8ed65799e112f77ecb12be8 Mon Sep 17 00:00:00 2001 From af8c0db250e710c6ecd19a83bd8b57da44662041 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 11:28:30 +0100 Date: Tue, 16 Jan 2018 11:28:30 +0100
Subject: [PATCH 09/31] x86/entry/32: Leave the kernel via trampoline stack Subject: [PATCH 09/34] x86/entry/32: Leave the kernel via trampoline stack
Switch back to the trampoline stack before returning to Switch back to the trampoline stack before returning to
userspace. userspace.
Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Joerg Roedel <jroedel@suse.de>
--- ---
arch/x86/entry/entry_32.S | 55 +++++++++++++++++++++++++++++++++++++++++++++++ arch/x86/entry/entry_32.S | 79 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 55 insertions(+) 1 file changed, 77 insertions(+), 2 deletions(-)
diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index e714b53b1eaa..ba3d8c2886ed 100644 index 1737da2e4517..1b5656d7040e 100644
--- a/arch/x86/entry/entry_32.S --- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S
@@ -338,6 +338,59 @@ @@ -338,6 +338,60 @@
.Lend_\@:
.endm .endm
/* +/*
+ * Switch back from the kernel stack to the entry stack. + * Switch back from the kernel stack to the entry stack.
+ * + *
+ * The %esp register must point to pt_regs on the task stack. It will + * The %esp register must point to pt_regs on the task stack. It will
+ * first calculate the size of the stack-frame to copy, depending on + * first calculate the size of the stack-frame to copy, depending on
+ * whether we return to VM86 mode or not. With that it uses 'rep movsb' + * whether we return to VM86 mode or not. With that it uses 'rep movsl'
+ * to copy the contents of the stack over to the entry stack. + * to copy the contents of the stack over to the entry stack.
+ * + *
+ * We must be very careful here, as we can't trust the contents of the + * We must be very careful here, as we can't trust the contents of the
@@ -55,11 +56,12 @@ index e714b53b1eaa..ba3d8c2886ed 100644
+ movl %esp, %esi + movl %esp, %esi
+ +
+ /* Save future stack pointer in %ebx */ + /* Save future stack pointer in %ebx */
+ movl %edi, %ebx + movl %edi, %ebx
+ +
+ /* Copy over the stack-frame */ + /* Copy over the stack-frame */
+ shrl $2, %ecx
+ cld + cld
+ rep movsb + rep movsl
+ +
+ /* + /*
+ * Switch to entry-stack - needs to happen after everything is + * Switch to entry-stack - needs to happen after everything is
@@ -71,19 +73,58 @@ index e714b53b1eaa..ba3d8c2886ed 100644
+.Lend_\@: +.Lend_\@:
+.endm +.endm
+ +
+/* /*
* %eax: prev task * %eax: prev task
* %edx: next task * %edx: next task
*/ @@ -579,25 +633,45 @@ ENTRY(entry_SYSENTER_32)
@@ -578,6 +631,7 @@ ENTRY(entry_SYSENTER_32)
/* Opportunistic SYSEXIT */ /* Opportunistic SYSEXIT */
TRACE_IRQS_ON /* User mode traces as IRQs on. */ TRACE_IRQS_ON /* User mode traces as IRQs on. */
+ SWITCH_TO_ENTRY_STACK /* Switch to per-cpu entry stack */ +
+ /*
+ * Setup entry stack - we keep the pointer in %eax and do the
+ * switch after almost all user-state is restored.
+ */
+
+ /* Load entry stack pointer and allocate frame for eflags/eax */
+ movl PER_CPU_VAR(cpu_tss_rw + TSS_sp0), %eax
+ subl $(2*4), %eax
+
+ /* Copy eflags and eax to entry stack */
+ movl PT_EFLAGS(%esp), %edi
+ movl PT_EAX(%esp), %esi
+ movl %edi, (%eax)
+ movl %esi, 4(%eax)
+
+ /* Restore user registers and segments */
movl PT_EIP(%esp), %edx /* pt_regs->ip */ movl PT_EIP(%esp), %edx /* pt_regs->ip */
movl PT_OLDESP(%esp), %ecx /* pt_regs->sp */ movl PT_OLDESP(%esp), %ecx /* pt_regs->sp */
1: mov PT_FS(%esp), %fs 1: mov PT_FS(%esp), %fs
@@ -665,6 +719,7 @@ ENTRY(entry_INT80_32) PTGS_TO_GS
+
popl %ebx /* pt_regs->bx */
addl $2*4, %esp /* skip pt_regs->cx and pt_regs->dx */
popl %esi /* pt_regs->si */
popl %edi /* pt_regs->di */
popl %ebp /* pt_regs->bp */
- popl %eax /* pt_regs->ax */
+
+ /* Switch to entry stack */
+ movl %eax, %esp
/*
* Restore all flags except IF. (We restore IF separately because
* STI gives a one-instruction window in which we won't be interrupted,
* whereas POPF does not.)
*/
- addl $PT_EFLAGS-PT_DS, %esp /* point esp at pt_regs->flags */
btr $X86_EFLAGS_IF_BIT, (%esp)
popfl
+ popl %eax
/*
* Return back to the vDSO, which will pop ecx and edx.
@@ -666,6 +740,7 @@ ENTRY(entry_INT80_32)
restore_all: restore_all:
TRACE_IRQS_IRET TRACE_IRQS_IRET
@@ -92,5 +133,5 @@ index e714b53b1eaa..ba3d8c2886ed 100644
CHECK_AND_APPLY_ESPFIX CHECK_AND_APPLY_ESPFIX
.Lrestore_nocheck: .Lrestore_nocheck:
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From 26b38ec7dd2591f092eb359a5a59752d799ab60d Mon Sep 17 00:00:00 2001 From 49a15ace3cbe2fba45548538ede04c1599b33fb9 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 31 Jan 2018 16:35:42 +0100 Date: Wed, 31 Jan 2018 16:35:42 +0100
Subject: [PATCH 10/31] x86/entry/32: Introduce SAVE_ALL_NMI and Subject: [PATCH 10/34] x86/entry/32: Introduce SAVE_ALL_NMI and
RESTORE_ALL_NMI RESTORE_ALL_NMI
These macros will be used in the NMI handler code and These macros will be used in the NMI handler code and
@@ -14,7 +14,7 @@ Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 file changed, 19 insertions(+), 4 deletions(-) 1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index ba3d8c2886ed..be1d814bd056 100644 index 1b5656d7040e..bb0bd896c74b 100644
--- a/arch/x86/entry/entry_32.S --- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S
@@ -167,6 +167,9 @@ @@ -167,6 +167,9 @@
@@ -46,7 +46,7 @@ index ba3d8c2886ed..be1d814bd056 100644
.macro CHECK_AND_APPLY_ESPFIX .macro CHECK_AND_APPLY_ESPFIX
#ifdef CONFIG_X86_ESPFIX32 #ifdef CONFIG_X86_ESPFIX32
#define GDT_ESPFIX_SS PER_CPU_VAR(gdt_page) + (GDT_ENTRY_ESPFIX_SS * 8) #define GDT_ESPFIX_SS PER_CPU_VAR(gdt_page) + (GDT_ENTRY_ESPFIX_SS * 8)
@@ -1127,7 +1142,7 @@ ENTRY(nmi) @@ -1148,7 +1163,7 @@ ENTRY(nmi)
#endif #endif
pushl %eax # pt_regs->orig_ax pushl %eax # pt_regs->orig_ax
@@ -55,7 +55,7 @@ index ba3d8c2886ed..be1d814bd056 100644
ENCODE_FRAME_POINTER ENCODE_FRAME_POINTER
xorl %edx, %edx # zero error code xorl %edx, %edx # zero error code
movl %esp, %eax # pt_regs pointer movl %esp, %eax # pt_regs pointer
@@ -1155,7 +1170,7 @@ ENTRY(nmi) @@ -1176,7 +1191,7 @@ ENTRY(nmi)
.Lnmi_return: .Lnmi_return:
CHECK_AND_APPLY_ESPFIX CHECK_AND_APPLY_ESPFIX
@@ -64,7 +64,7 @@ index ba3d8c2886ed..be1d814bd056 100644
jmp .Lirq_return jmp .Lirq_return
#ifdef CONFIG_X86_ESPFIX32 #ifdef CONFIG_X86_ESPFIX32
@@ -1171,12 +1186,12 @@ ENTRY(nmi) @@ -1192,12 +1207,12 @@ ENTRY(nmi)
pushl 16(%esp) pushl 16(%esp)
.endr .endr
pushl %eax pushl %eax
@@ -80,5 +80,5 @@ index ba3d8c2886ed..be1d814bd056 100644
jmp .Lirq_return jmp .Lirq_return
#endif #endif
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From a98c3fa3166e37c6f66f5b7e221b9c0cf1455806 Mon Sep 17 00:00:00 2001 From bbad1145165d4ed4452913df109ee3429a10dd90 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 31 Jan 2018 20:48:02 +0100 Date: Wed, 31 Jan 2018 20:48:02 +0100
Subject: [PATCH 13/31] x86/entry/32: Handle Entry from Kernel-Mode on Subject: [PATCH 11/34] x86/entry/32: Handle Entry from Kernel-Mode on
Entry-Stack Entry-Stack
It can happen that we enter the kernel from kernel-mode and It can happen that we enter the kernel from kernel-mode and
@@ -33,14 +33,14 @@ to it.
Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Joerg Roedel <jroedel@suse.de>
--- ---
arch/x86/entry/entry_32.S | 109 +++++++++++++++++++++++++++++++++++++++++++++- arch/x86/entry/entry_32.S | 110 +++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 108 insertions(+), 1 deletion(-) 1 file changed, 109 insertions(+), 1 deletion(-)
diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index b5ef00302316..d94dab68b526 100644 index bb0bd896c74b..3a84945fa3b6 100644
--- a/arch/x86/entry/entry_32.S --- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S
@@ -358,6 +358,9 @@ @@ -299,6 +299,9 @@
* copied there. So allocate the stack-frame on the task-stack and * copied there. So allocate the stack-frame on the task-stack and
* switch to it before we do any copying. * switch to it before we do any copying.
*/ */
@@ -50,7 +50,7 @@ index b5ef00302316..d94dab68b526 100644
.macro SWITCH_TO_KERNEL_STACK .macro SWITCH_TO_KERNEL_STACK
ALTERNATIVE "", "jmp .Lend_\@", X86_FEATURE_XENPV ALTERNATIVE "", "jmp .Lend_\@", X86_FEATURE_XENPV
@@ -381,6 +384,10 @@ @@ -320,6 +323,10 @@
/* Load top of task-stack into %edi */ /* Load top of task-stack into %edi */
movl TSS_entry_stack(%edi), %edi movl TSS_entry_stack(%edi), %edi
@@ -61,7 +61,7 @@ index b5ef00302316..d94dab68b526 100644
/* Bytes to copy */ /* Bytes to copy */
movl $PTREGS_SIZE, %ecx movl $PTREGS_SIZE, %ecx
@@ -394,8 +401,8 @@ @@ -333,8 +340,8 @@
*/ */
addl $(4 * 4), %ecx addl $(4 * 4), %ecx
@@ -71,9 +71,9 @@ index b5ef00302316..d94dab68b526 100644
/* Allocate frame on task-stack */ /* Allocate frame on task-stack */
subl %ecx, %edi subl %ecx, %edi
@@ -410,6 +417,56 @@ @@ -350,6 +357,56 @@
cld cld
rep movsb rep movsl
+ jmp .Lend_\@ + jmp .Lend_\@
+ +
@@ -128,10 +128,11 @@ index b5ef00302316..d94dab68b526 100644
.Lend_\@: .Lend_\@:
.endm .endm
@@ -467,6 +524,55 @@ @@ -407,6 +464,56 @@
.Lend_\@:
.endm .endm
/* +/*
+ * This macro handles the case when we return to kernel-mode on the iret + * This macro handles the case when we return to kernel-mode on the iret
+ * path and have to switch back to the entry stack. + * path and have to switch back to the entry stack.
+ * + *
@@ -172,19 +173,19 @@ index b5ef00302316..d94dab68b526 100644
+ movl %edi, %ebx + movl %edi, %ebx
+ +
+ /* Do the copy */ + /* Do the copy */
+ shrl $2, %ecx
+ cld + cld
+ rep movsb + rep movsl
+ +
+ /* Safe to switch to entry-stack now */ + /* Safe to switch to entry-stack now */
+ movl %ebx, %esp + movl %ebx, %esp
+ +
+.Lend_\@: +.Lend_\@:
+.endm +.endm
+/* /*
* %eax: prev task * %eax: prev task
* %edx: next task * %edx: next task
*/ @@ -765,6 +872,7 @@ restore_all:
@@ -837,6 +943,7 @@ restore_all:
restore_all_kernel: restore_all_kernel:
TRACE_IRQS_IRET TRACE_IRQS_IRET
@@ -193,5 +194,5 @@ index b5ef00302316..d94dab68b526 100644
jmp .Lirq_return jmp .Lirq_return
-- --
2.13.6 2.16.2
@@ -1,122 +0,0 @@
From 883518e6e2b618c2ee49ac822057712090784eda Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 31 Jan 2018 17:22:10 +0100
Subject: [PATCH 12/31] x86/entry/32: Add PTI cr3 switch to non-NMI entry/exit
points
Add unconditional cr3 switches between user and kernel cr3
to all non-NMI entry and exit points.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
arch/x86/entry/entry_32.S | 59 ++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 58 insertions(+), 1 deletion(-)
diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index 9693485c901a..b5ef00302316 100644
--- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S
@@ -328,6 +328,25 @@
#endif /* CONFIG_X86_ESPFIX32 */
.endm
+/* Unconditionally switch to user cr3 */
+.macro SWITCH_TO_USER_CR3 scratch_reg:req
+ ALTERNATIVE "jmp .Lend_\@", "", X86_FEATURE_PTI
+
+ movl %cr3, \scratch_reg
+ orl $PTI_SWITCH_MASK, \scratch_reg
+ movl \scratch_reg, %cr3
+.Lend_\@:
+.endm
+
+/* Unconditionally switch to kernel cr3 */
+.macro SWITCH_TO_KERNEL_CR3 scratch_reg:req
+ ALTERNATIVE "jmp .Lend_\@", "", X86_FEATURE_PTI
+ movl %cr3, \scratch_reg
+ andl $(~PTI_SWITCH_MASK), \scratch_reg
+ movl \scratch_reg, %cr3
+.Lend_\@:
+.endm
+
/*
* Called with pt_regs fully populated and kernel segments loaded,
@@ -343,6 +362,8 @@
ALTERNATIVE "", "jmp .Lend_\@", X86_FEATURE_XENPV
+ SWITCH_TO_KERNEL_CR3 scratch_reg=%eax
+
/* Are we on the entry stack? Bail out if not! */
movl PER_CPU_VAR(cpu_entry_area), %edi
addl $CPU_ENTRY_AREA_entry_stack, %edi
@@ -637,6 +658,18 @@ ENTRY(xen_sysenter_target)
* 0(%ebp) arg6
*/
ENTRY(entry_SYSENTER_32)
+ /*
+ * On entry-stack with all userspace-regs live - save and
+ * restore eflags and %eax to use it as scratch-reg for the cr3
+ * switch.
+ */
+ pushfl
+ pushl %eax
+ SWITCH_TO_KERNEL_CR3 scratch_reg=%eax
+ popl %eax
+ popfl
+
+ /* Stack empty again, switch to task stack */
movl TSS_entry_stack(%esp), %esp
.Lsysenter_past_esp:
@@ -691,6 +724,10 @@ ENTRY(entry_SYSENTER_32)
movl PT_OLDESP(%esp), %ecx /* pt_regs->sp */
1: mov PT_FS(%esp), %fs
PTGS_TO_GS
+
+ /* Segments are restored - switch to user cr3 */
+ SWITCH_TO_USER_CR3 scratch_reg=%eax
+
popl %ebx /* pt_regs->bx */
addl $2*4, %esp /* skip pt_regs->cx and pt_regs->dx */
popl %esi /* pt_regs->si */
@@ -778,7 +815,23 @@ restore_all:
.Lrestore_all_notrace:
CHECK_AND_APPLY_ESPFIX
.Lrestore_nocheck:
- RESTORE_REGS 4 # skip orig_eax/error_code
+ /*
+ * First restore user segments. This can cause exceptions, so we
+ * run it with kernel cr3.
+ */
+ RESTORE_SEGMENTS
+
+ /*
+ * Segments are restored - no more exceptions from here on except on
+ * iret, but that handled safely.
+ */
+ SWITCH_TO_USER_CR3 scratch_reg=%eax
+
+ /* Restore rest */
+ RESTORE_INT_REGS
+
+ /* Unwind stack to the iret frame */
+ RESTORE_SKIP_SEGMENTS 4 # skip orig_eax/error_code
.Lirq_return:
INTERRUPT_RETURN
@@ -1139,6 +1192,10 @@ ENTRY(debug)
SAVE_ALL
ENCODE_FRAME_POINTER
+
+ /* Make sure we are running on kernel cr3 */
+ SWITCH_TO_KERNEL_CR3 scratch_reg=%eax
+
xorl %edx, %edx # error code 0
movl %esp, %eax # pt_regs pointer
--
2.13.6
@@ -0,0 +1,69 @@
From 8743506d5153928d0a0fb4106470a6581d03796d Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de>
Date: Thu, 1 Mar 2018 14:48:16 +0100
Subject: [PATCH 12/34] x86/entry/32: Simplify debug entry point
The common exception entry code now handles the
entry-from-sysenter stack situation and makes sure to leave
with the same stack as it entered the kernel.
So there is no need anymore for the special handling in the
debug entry code.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
arch/x86/entry/entry_32.S | 35 +++--------------------------------
1 file changed, 3 insertions(+), 32 deletions(-)
diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index 3a84945fa3b6..b1a5f34eeb27 100644
--- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S
@@ -1215,41 +1215,12 @@ END(common_exception)
ENTRY(debug)
/*
- * #DB can happen at the first instruction of
- * entry_SYSENTER_32 or in Xen's SYSENTER prologue. If this
- * happens, then we will be running on a very small stack. We
- * need to detect this condition and switch to the thread
- * stack before calling any C code at all.
- *
- * If you edit this code, keep in mind that NMIs can happen in here.
+ * Entry from sysenter is now handled in common_exception
*/
ASM_CLAC
pushl $-1 # mark this as an int
-
- SAVE_ALL
- ENCODE_FRAME_POINTER
- xorl %edx, %edx # error code 0
- movl %esp, %eax # pt_regs pointer
-
- /* Are we currently on the SYSENTER stack? */
- movl PER_CPU_VAR(cpu_entry_area), %ecx
- addl $CPU_ENTRY_AREA_entry_stack + SIZEOF_entry_stack, %ecx
- subl %eax, %ecx /* ecx = (end of entry_stack) - esp */
- cmpl $SIZEOF_entry_stack, %ecx
- jb .Ldebug_from_sysenter_stack
-
- TRACE_IRQS_OFF
- call do_debug
- jmp ret_from_exception
-
-.Ldebug_from_sysenter_stack:
- /* We're on the SYSENTER stack. Switch off. */
- movl %esp, %ebx
- movl PER_CPU_VAR(cpu_current_top_of_stack), %esp
- TRACE_IRQS_OFF
- call do_debug
- movl %ebx, %esp
- jmp ret_from_exception
+ pushl $do_debug
+ jmp common_exception
END(debug)
/*
--
2.16.2
@@ -1,7 +1,7 @@
From d7f5719fe456d24dd01fdcc281aac44dacfa57b2 Mon Sep 17 00:00:00 2001 From 41bc2c77864b5464134c3ec722225a9ae4701968 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 31 Jan 2018 16:58:57 +0100 Date: Wed, 31 Jan 2018 16:58:57 +0100
Subject: [PATCH 11/31] x86/entry/32: Add PTI cr3 switches to NMI handler code Subject: [PATCH 13/34] x86/entry/32: Add PTI cr3 switches to NMI handler code
The NMI handler is special, as it needs to leave with the The NMI handler is special, as it needs to leave with the
same cr3 as it was entered with. We need to do this because same cr3 as it was entered with. We need to do this because
@@ -14,7 +14,7 @@ Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 file changed, 46 insertions(+), 6 deletions(-) 1 file changed, 46 insertions(+), 6 deletions(-)
diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index be1d814bd056..9693485c901a 100644 index b1a5f34eeb27..35379e5f60c6 100644
--- a/arch/x86/entry/entry_32.S --- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S
@@ -77,6 +77,8 @@ @@ -77,6 +77,8 @@
@@ -89,7 +89,7 @@ index be1d814bd056..9693485c901a 100644
/* Restore integer registers and unwind stack to iret frame */ /* Restore integer registers and unwind stack to iret frame */
RESTORE_INT_REGS RESTORE_INT_REGS
RESTORE_SKIP_SEGMENTS \pop RESTORE_SKIP_SEGMENTS \pop
@@ -1142,7 +1182,7 @@ ENTRY(nmi) @@ -1242,7 +1282,7 @@ ENTRY(nmi)
#endif #endif
pushl %eax # pt_regs->orig_ax pushl %eax # pt_regs->orig_ax
@@ -98,7 +98,7 @@ index be1d814bd056..9693485c901a 100644
ENCODE_FRAME_POINTER ENCODE_FRAME_POINTER
xorl %edx, %edx # zero error code xorl %edx, %edx # zero error code
movl %esp, %eax # pt_regs pointer movl %esp, %eax # pt_regs pointer
@@ -1170,7 +1210,7 @@ ENTRY(nmi) @@ -1270,7 +1310,7 @@ ENTRY(nmi)
.Lnmi_return: .Lnmi_return:
CHECK_AND_APPLY_ESPFIX CHECK_AND_APPLY_ESPFIX
@@ -107,7 +107,7 @@ index be1d814bd056..9693485c901a 100644
jmp .Lirq_return jmp .Lirq_return
#ifdef CONFIG_X86_ESPFIX32 #ifdef CONFIG_X86_ESPFIX32
@@ -1186,12 +1226,12 @@ ENTRY(nmi) @@ -1286,12 +1326,12 @@ ENTRY(nmi)
pushl 16(%esp) pushl 16(%esp)
.endr .endr
pushl %eax pushl %eax
@@ -123,5 +123,5 @@ index be1d814bd056..9693485c901a 100644
jmp .Lirq_return jmp .Lirq_return
#endif #endif
-- --
2.13.6 2.16.2
@@ -0,0 +1,187 @@
From d40791fdb56c15767c7c65a1a2e0c8736f3db0af Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 31 Jan 2018 17:22:10 +0100
Subject: [PATCH 14/34] x86/entry/32: Add PTI cr3 switch to non-NMI entry/exit
points
Add unconditional cr3 switches between user and kernel cr3
to all non-NMI entry and exit points.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
arch/x86/entry/entry_32.S | 91 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 88 insertions(+), 3 deletions(-)
diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index 35379e5f60c6..8f78abcf1f9c 100644
--- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S
@@ -328,6 +328,30 @@
#endif /* CONFIG_X86_ESPFIX32 */
.endm
+/* Unconditionally switch to user cr3 */
+.macro SWITCH_TO_USER_CR3 scratch_reg:req
+ ALTERNATIVE "jmp .Lend_\@", "", X86_FEATURE_PTI
+
+ movl %cr3, \scratch_reg
+ orl $PTI_SWITCH_MASK, \scratch_reg
+ movl \scratch_reg, %cr3
+.Lend_\@:
+.endm
+
+/* Unconditionally switch to kernel cr3 */
+.macro SWITCH_TO_KERNEL_CR3 scratch_reg:req
+ ALTERNATIVE "jmp .Lend_\@", "", X86_FEATURE_PTI
+ movl %cr3, \scratch_reg
+ /* Test if we are already on kernel CR3 */
+ testl $PTI_SWITCH_MASK, \scratch_reg
+ jz .Lend_\@
+ andl $(~PTI_SWITCH_MASK), \scratch_reg
+ movl \scratch_reg, %cr3
+ /* Return original CR3 in \scratch_reg */
+ orl $PTI_SWITCH_MASK, \scratch_reg
+.Lend_\@:
+.endm
+
/*
* Called with pt_regs fully populated and kernel segments loaded,
@@ -341,11 +365,19 @@
*/
#define CS_FROM_ENTRY_STACK (1 << 31)
+#define CS_FROM_USER_CR3 (1 << 30)
.macro SWITCH_TO_KERNEL_STACK
ALTERNATIVE "", "jmp .Lend_\@", X86_FEATURE_XENPV
+ SWITCH_TO_KERNEL_CR3 scratch_reg=%eax
+
+ /*
+ * %eax now contains the entry cr3 and we carry it forward in
+ * that register for the time this macro runs
+ */
+
/* Are we on the entry stack? Bail out if not! */
movl PER_CPU_VAR(cpu_entry_area), %edi
addl $CPU_ENTRY_AREA_entry_stack, %edi
@@ -408,7 +440,8 @@
* but switch back to the entry-stack again when we approach
* iret and return to the interrupted code-path. This usually
* happens when we hit an exception while restoring user-space
- * segment registers on the way back to user-space.
+ * segment registers on the way back to user-space or when the
+ * sysenter handler runs with eflags.tf set.
*
* When we switch to the task-stack here, we can't trust the
* contents of the entry-stack anymore, as the exception handler
@@ -425,6 +458,7 @@
*
* %esi: Entry-Stack pointer (same as %esp)
* %edi: Top of the task stack
+ * %eax: CR3 on kernel entry
*/
/* Calculate number of bytes on the entry stack in %ecx */
@@ -440,6 +474,14 @@
/* Mark stackframe as coming from entry stack */
orl $CS_FROM_ENTRY_STACK, PT_CS(%esp)
+ /*
+ * Test the cr3 used to enter the kernel and add a marker
+ * so that we can switch back to it before iret.
+ */
+ testl $PTI_SWITCH_MASK, %eax
+ jz .Lcopy_pt_regs_\@
+ orl $CS_FROM_USER_CR3, PT_CS(%esp)
+
/*
* %esi and %edi are unchanged, %ecx contains the number of
* bytes to copy. The code at .Lcopy_pt_regs_\@ will allocate
@@ -506,7 +548,7 @@
/*
* This macro handles the case when we return to kernel-mode on the iret
- * path and have to switch back to the entry stack.
+ * path and have to switch back to the entry stack and/or user-cr3
*
* See the comments below the .Lentry_from_kernel_\@ label in the
* SWITCH_TO_KERNEL_STACK macro for more details.
@@ -552,6 +594,18 @@
/* Safe to switch to entry-stack now */
movl %ebx, %esp
+ /*
+ * We came from entry-stack and need to check if we also need to
+ * switch back to user cr3.
+ */
+ testl $CS_FROM_USER_CR3, PT_CS(%esp)
+ jz .Lend_\@
+
+ /* Clear marker from stack-frame */
+ andl $(~CS_FROM_USER_CR3), PT_CS(%esp)
+
+ SWITCH_TO_USER_CR3 scratch_reg=%eax
+
.Lend_\@:
.endm
/*
@@ -746,6 +800,18 @@ ENTRY(xen_sysenter_target)
* 0(%ebp) arg6
*/
ENTRY(entry_SYSENTER_32)
+ /*
+ * On entry-stack with all userspace-regs live - save and
+ * restore eflags and %eax to use it as scratch-reg for the cr3
+ * switch.
+ */
+ pushfl
+ pushl %eax
+ SWITCH_TO_KERNEL_CR3 scratch_reg=%eax
+ popl %eax
+ popfl
+
+ /* Stack empty again, switch to task stack */
movl TSS_entry_stack(%esp), %esp
.Lsysenter_past_esp:
@@ -826,6 +892,9 @@ ENTRY(entry_SYSENTER_32)
/* Switch to entry stack */
movl %eax, %esp
+ /* Now ready to switch the cr3 */
+ SWITCH_TO_USER_CR3 scratch_reg=%eax
+
/*
* Restore all flags except IF. (We restore IF separately because
* STI gives a one-instruction window in which we won't be interrupted,
@@ -906,7 +975,23 @@ restore_all:
.Lrestore_all_notrace:
CHECK_AND_APPLY_ESPFIX
.Lrestore_nocheck:
- RESTORE_REGS 4 # skip orig_eax/error_code
+ /*
+ * First restore user segments. This can cause exceptions, so we
+ * run it with kernel cr3.
+ */
+ RESTORE_SEGMENTS
+
+ /*
+ * Segments are restored - no more exceptions from here on except on
+ * iret, but that handled safely.
+ */
+ SWITCH_TO_USER_CR3 scratch_reg=%eax
+
+ /* Restore rest */
+ RESTORE_INT_REGS
+
+ /* Unwind stack to the iret frame */
+ RESTORE_SKIP_SEGMENTS 4 # skip orig_eax/error_code
.Lirq_return:
INTERRUPT_RETURN
--
2.16.2
@@ -0,0 +1,81 @@
From 55797d951b45c9eb709a4e7483eef89d738c2427 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de>
Date: Thu, 1 Mar 2018 13:40:39 +0100
Subject: [PATCH 15/34] x86/pgtable: Rename pti_set_user_pgd to
pti_set_user_pgtbl
With the way page-table folding is implemented on 32 bit, we
are not only setting PGDs with this functions, but also PUDs
and even PMDs. Give the function a more generic name to
reflect that.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
arch/x86/include/asm/pgtable_64.h | 12 ++++++------
arch/x86/mm/pti.c | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 81462e9a34f6..b68bda56db67 100644
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -195,21 +195,21 @@ static inline bool pgdp_maps_userspace(void *__ptr)
}
#ifdef CONFIG_PAGE_TABLE_ISOLATION
-pgd_t __pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd);
+pgd_t __pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd);
/*
* Take a PGD location (pgdp) and a pgd value that needs to be set there.
* Populates the user and returns the resulting PGD that must be set in
* the kernel copy of the page tables.
*/
-static inline pgd_t pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd)
+static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd)
{
if (!static_cpu_has(X86_FEATURE_PTI))
return pgd;
- return __pti_set_user_pgd(pgdp, pgd);
+ return __pti_set_user_pgtbl(pgdp, pgd);
}
#else
-static inline pgd_t pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd)
+static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd)
{
return pgd;
}
@@ -218,7 +218,7 @@ static inline pgd_t pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd)
static inline void native_set_p4d(p4d_t *p4dp, p4d_t p4d)
{
#if defined(CONFIG_PAGE_TABLE_ISOLATION) && !defined(CONFIG_X86_5LEVEL)
- p4dp->pgd = pti_set_user_pgd(&p4dp->pgd, p4d.pgd);
+ p4dp->pgd = pti_set_user_pgtbl(&p4dp->pgd, p4d.pgd);
#else
*p4dp = p4d;
#endif
@@ -236,7 +236,7 @@ static inline void native_p4d_clear(p4d_t *p4d)
static inline void native_set_pgd(pgd_t *pgdp, pgd_t pgd)
{
#ifdef CONFIG_PAGE_TABLE_ISOLATION
- *pgdp = pti_set_user_pgd(pgdp, pgd);
+ *pgdp = pti_set_user_pgtbl(pgdp, pgd);
#else
*pgdp = pgd;
#endif
diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
index ce38f165489b..8f53d2101f64 100644
--- a/arch/x86/mm/pti.c
+++ b/arch/x86/mm/pti.c
@@ -102,7 +102,7 @@ void __init pti_check_boottime_disable(void)
setup_force_cpu_cap(X86_FEATURE_PTI);
}
-pgd_t __pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd)
+pgd_t __pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd)
{
/*
* Changes to the high (kernel) portion of the kernelmode page
--
2.16.2
@@ -1,7 +1,7 @@
From cc4fcd3fae72f6a72d9f275366b7165fa4ac3f71 Mon Sep 17 00:00:00 2001 From 5439accd9f31dacdfbf67a18440d5805e8a0bfad Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Fri, 2 Feb 2018 10:41:36 +0100 Date: Fri, 2 Feb 2018 10:41:36 +0100
Subject: [PATCH 14/31] x86/pgtable/pae: Unshare kernel PMDs when PTI is Subject: [PATCH 16/34] x86/pgtable/pae: Unshare kernel PMDs when PTI is
enabled enabled
With PTI we need to map the per-process LDT into the kernel With PTI we need to map the per-process LDT into the kernel
@@ -31,5 +31,5 @@ index 876b4c77d983..ed8a200ecdaf 100644
/* /*
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From 5ea0338f46add135a70678a6eba2e402310e7b26 Mon Sep 17 00:00:00 2001 From 35cdf0541e9d5c7a47b59530fc8a42ac9ab767f8 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 13:10:57 +0100 Date: Tue, 16 Jan 2018 13:10:57 +0100
Subject: [PATCH 15/31] x86/pgtable/32: Allocate 8k page-tables when PTI is Subject: [PATCH 17/34] x86/pgtable/32: Allocate 8k page-tables when PTI is
enabled enabled
Allocate a kernel and a user page-table root when PTI is Allocate a kernel and a user page-table root when PTI is
@@ -94,5 +94,5 @@ index 004abf9ebf12..a81d42e48922 100644
kmem_cache_free(pgd_cache, pgd); kmem_cache_free(pgd_cache, pgd);
} }
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From eaacd465ad0f08807b151d2d27b0cad27b9de076 Mon Sep 17 00:00:00 2001 From 69dfcb6ee23f6841982e059f58cc9be921b669dc Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 11:53:38 +0100 Date: Tue, 16 Jan 2018 11:53:38 +0100
Subject: [PATCH 16/31] x86/pgtable: Move pgdp kernel/user conversion functions Subject: [PATCH 18/34] x86/pgtable: Move pgdp kernel/user conversion functions
to pgtable.h to pgtable.h
Make them available on 32 bit and clone_pgd_range() happy. Make them available on 32 bit and clone_pgd_range() happy.
@@ -73,7 +73,7 @@ index e42b8943cb1a..0a9f746cbdc1 100644
* clone_pgd_range(pgd_t *dst, pgd_t *src, int count); * clone_pgd_range(pgd_t *dst, pgd_t *src, int count);
* *
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 81462e9a34f6..58d7f10e937d 100644 index b68bda56db67..5e680838761d 100644
--- a/arch/x86/include/asm/pgtable_64.h --- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h
@@ -131,55 +131,6 @@ static inline pud_t native_pudp_get_and_clear(pud_t *xp) @@ -131,55 +131,6 @@ static inline pud_t native_pudp_get_and_clear(pud_t *xp)
@@ -133,5 +133,5 @@ index 81462e9a34f6..58d7f10e937d 100644
* Page table pages are page-aligned. The lower half of the top * Page table pages are page-aligned. The lower half of the top
* level is used for userspace and the top half for the kernel. * level is used for userspace and the top half for the kernel.
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From 82dd2440260533d518a810905c5492ba4f422a6f Mon Sep 17 00:00:00 2001 From 88eb961770b7b265bf4725f0d687af8c9cf33467 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 15:50:39 +0100 Date: Tue, 16 Jan 2018 15:50:39 +0100
Subject: [PATCH 17/31] x86/pgtable: Move pti_set_user_pgd() to pgtable.h Subject: [PATCH 19/34] x86/pgtable: Move pti_set_user_pgtbl() to pgtable.h
There it is also usable from 32 bit code. There it is also usable from 32 bit code.
@@ -12,7 +12,7 @@ Signed-off-by: Joerg Roedel <jroedel@suse.de>
2 files changed, 23 insertions(+), 21 deletions(-) 2 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 0a9f746cbdc1..c9d3cf9ce831 100644 index 0a9f746cbdc1..1e900c1f8ab1 100644
--- a/arch/x86/include/asm/pgtable.h --- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h
@@ -618,8 +618,31 @@ static inline int is_new_memtype_allowed(u64 paddr, unsigned long size, @@ -618,8 +618,31 @@ static inline int is_new_memtype_allowed(u64 paddr, unsigned long size,
@@ -21,21 +21,21 @@ index 0a9f746cbdc1..c9d3cf9ce831 100644
pte_t *populate_extra_pte(unsigned long vaddr); pte_t *populate_extra_pte(unsigned long vaddr);
+ +
+#ifdef CONFIG_PAGE_TABLE_ISOLATION +#ifdef CONFIG_PAGE_TABLE_ISOLATION
+pgd_t __pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd); +pgd_t __pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd);
+ +
+/* +/*
+ * Take a PGD location (pgdp) and a pgd value that needs to be set there. + * Take a PGD location (pgdp) and a pgd value that needs to be set there.
+ * Populates the user and returns the resulting PGD that must be set in + * Populates the user and returns the resulting PGD that must be set in
+ * the kernel copy of the page tables. + * the kernel copy of the page tables.
+ */ + */
+static inline pgd_t pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd) +static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd)
+{ +{
+ if (!static_cpu_has(X86_FEATURE_PTI)) + if (!static_cpu_has(X86_FEATURE_PTI))
+ return pgd; + return pgd;
+ return __pti_set_user_pgd(pgdp, pgd); + return __pti_set_user_pgtbl(pgdp, pgd);
+} +}
+#else /* CONFIG_PAGE_TABLE_ISOLATION */ +#else /* CONFIG_PAGE_TABLE_ISOLATION */
+static inline pgd_t pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd) +static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd)
+{ +{
+ return pgd; + return pgd;
+} +}
@@ -48,7 +48,7 @@ index 0a9f746cbdc1..c9d3cf9ce831 100644
# include <asm/pgtable_32.h> # include <asm/pgtable_32.h>
#else #else
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 58d7f10e937d..396664d95ac9 100644 index 5e680838761d..4cbf5173dd76 100644
--- a/arch/x86/include/asm/pgtable_64.h --- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h
@@ -145,27 +145,6 @@ static inline bool pgdp_maps_userspace(void *__ptr) @@ -145,27 +145,6 @@ static inline bool pgdp_maps_userspace(void *__ptr)
@@ -56,21 +56,21 @@ index 58d7f10e937d..396664d95ac9 100644
} }
-#ifdef CONFIG_PAGE_TABLE_ISOLATION -#ifdef CONFIG_PAGE_TABLE_ISOLATION
-pgd_t __pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd); -pgd_t __pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd);
- -
-/* -/*
- * Take a PGD location (pgdp) and a pgd value that needs to be set there. - * Take a PGD location (pgdp) and a pgd value that needs to be set there.
- * Populates the user and returns the resulting PGD that must be set in - * Populates the user and returns the resulting PGD that must be set in
- * the kernel copy of the page tables. - * the kernel copy of the page tables.
- */ - */
-static inline pgd_t pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd) -static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd)
-{ -{
- if (!static_cpu_has(X86_FEATURE_PTI)) - if (!static_cpu_has(X86_FEATURE_PTI))
- return pgd; - return pgd;
- return __pti_set_user_pgd(pgdp, pgd); - return __pti_set_user_pgtbl(pgdp, pgd);
-} -}
-#else -#else
-static inline pgd_t pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd) -static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd)
-{ -{
- return pgd; - return pgd;
-} -}
@@ -80,5 +80,5 @@ index 58d7f10e937d..396664d95ac9 100644
{ {
#if defined(CONFIG_PAGE_TABLE_ISOLATION) && !defined(CONFIG_X86_5LEVEL) #if defined(CONFIG_PAGE_TABLE_ISOLATION) && !defined(CONFIG_X86_5LEVEL)
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From 29023f0a7d98a96f2928c80ace36beffe5d28d41 Mon Sep 17 00:00:00 2001 From 2bcb4034a5d3e49213d4b7e72187b106a50d53f3 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 12:48:14 +0100 Date: Tue, 16 Jan 2018 12:48:14 +0100
Subject: [PATCH 18/31] x86/pgtable: Move two more functions from pgtable_64.h Subject: [PATCH 20/34] x86/pgtable: Move two more functions from pgtable_64.h
to pgtable.h to pgtable.h
These two functions are required for PTI on 32 bit: These two functions are required for PTI on 32 bit:
@@ -45,7 +45,7 @@ index ed8a200ecdaf..925ac1bc45cb 100644
#endif /* _ASM_X86_PGTABLE_3LEVEL_DEFS_H */ #endif /* _ASM_X86_PGTABLE_3LEVEL_DEFS_H */
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index c9d3cf9ce831..82151f602174 100644 index 1e900c1f8ab1..981e49a8cdb2 100644
--- a/arch/x86/include/asm/pgtable.h --- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h
@@ -1132,6 +1132,22 @@ static inline int pud_write(pud_t pud) @@ -1132,6 +1132,22 @@ static inline int pud_write(pud_t pud)
@@ -72,7 +72,7 @@ index c9d3cf9ce831..82151f602174 100644
/* /*
* All top-level PAGE_TABLE_ISOLATION page tables are order-1 pages * All top-level PAGE_TABLE_ISOLATION page tables are order-1 pages
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 396664d95ac9..50a02a32a0b3 100644 index 4cbf5173dd76..e11b92585de4 100644
--- a/arch/x86/include/asm/pgtable_64.h --- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h
@@ -131,20 +131,6 @@ static inline pud_t native_pudp_get_and_clear(pud_t *xp) @@ -131,20 +131,6 @@ static inline pud_t native_pudp_get_and_clear(pud_t *xp)
@@ -116,5 +116,5 @@ index 6b8f73dcbc2c..e57003a3f58a 100644
+ +
#endif /* _ASM_X86_PGTABLE_64_DEFS_H */ #endif /* _ASM_X86_PGTABLE_64_DEFS_H */
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From fbd7d587621cdf5c45fc32ae35e8cbec26387ed6 Mon Sep 17 00:00:00 2001 From 85228cdba0d4634d6a1a162be0d755bd8ed3bdfa Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 15:28:57 +0100 Date: Tue, 16 Jan 2018 15:28:57 +0100
Subject: [PATCH 19/31] x86/mm/pae: Populate valid user PGD entries Subject: [PATCH 21/34] x86/mm/pae: Populate valid user PGD entries
Generic page-table code populates all non-leaf entries with Generic page-table code populates all non-leaf entries with
_KERNPG_TABLE bits set. This is fine for all paging modes _KERNPG_TABLE bits set. This is fine for all paging modes
@@ -13,11 +13,11 @@ reserved bits.
Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Joerg Roedel <jroedel@suse.de>
--- ---
arch/x86/include/asm/pgtable_types.h | 26 ++++++++++++++++++++++++-- arch/x86/include/asm/pgtable_types.h | 28 ++++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-) 1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
index 3696398a9475..5027470f4f1c 100644 index 3696398a9475..48fc70b2d044 100644
--- a/arch/x86/include/asm/pgtable_types.h --- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h
@@ -50,6 +50,7 @@ @@ -50,6 +50,7 @@
@@ -28,7 +28,7 @@ index 3696398a9475..5027470f4f1c 100644
#define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT) #define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT)
#define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE) #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
#define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL) #define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL)
@@ -267,14 +268,35 @@ typedef struct pgprot { pgprotval_t pgprot; } pgprot_t; @@ -267,14 +268,37 @@ typedef struct pgprot { pgprotval_t pgprot; } pgprot_t;
typedef struct { pgdval_t pgd; } pgd_t; typedef struct { pgdval_t pgd; } pgd_t;
@@ -38,7 +38,9 @@ index 3696398a9475..5027470f4f1c 100644
+ * PHYSICAL_PAGE_MASK might be non-constant when SME is compiled in, so we can't + * PHYSICAL_PAGE_MASK might be non-constant when SME is compiled in, so we can't
+ * use it here. + * use it here.
+ */ + */
+#define PGD_PAE_PHYS_MASK (((1ULL << __PHYSICAL_MASK_SHIFT)-1) & PAGE_MASK) +
+#define PGD_PAE_PAGE_MASK ((signed long)PAGE_MASK)
+#define PGD_PAE_PHYS_MASK (((1ULL << __PHYSICAL_MASK_SHIFT)-1) & PGD_PAE_PAGE_MASK)
+ +
+/* +/*
+ * PAE allows Base Address, P, PWT, PCD and AVL bits to be set in PGD entries. + * PAE allows Base Address, P, PWT, PCD and AVL bits to be set in PGD entries.
@@ -67,5 +69,5 @@ index 3696398a9475..5027470f4f1c 100644
static inline pgdval_t pgd_flags(pgd_t pgd) static inline pgdval_t pgd_flags(pgd_t pgd)
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From d20f4e476110d1af543b471f317dfc97bec54d7c Mon Sep 17 00:00:00 2001 From f05eb123abd9d8696ef340e62a37348381ff95fa Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 15:55:17 +0100 Date: Tue, 16 Jan 2018 15:55:17 +0100
Subject: [PATCH 20/31] x86/mm/pae: Populate the user page-table with user Subject: [PATCH 22/34] x86/mm/pae: Populate the user page-table with user
pgd's pgd's
When we populate a PGD entry, make sure we populate it in When we populate a PGD entry, make sure we populate it in
@@ -13,7 +13,7 @@ Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 file changed, 7 insertions(+) 1 file changed, 7 insertions(+)
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
index bc4af5453802..1a0661be1861 100644 index bc4af5453802..ab2aa4468293 100644
--- a/arch/x86/include/asm/pgtable-3level.h --- a/arch/x86/include/asm/pgtable-3level.h
+++ b/arch/x86/include/asm/pgtable-3level.h +++ b/arch/x86/include/asm/pgtable-3level.h
@@ -98,6 +98,9 @@ static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) @@ -98,6 +98,9 @@ static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
@@ -21,7 +21,7 @@ index bc4af5453802..1a0661be1861 100644
static inline void native_set_pud(pud_t *pudp, pud_t pud) static inline void native_set_pud(pud_t *pudp, pud_t pud)
{ {
+#ifdef CONFIG_PAGE_TABLE_ISOLATION +#ifdef CONFIG_PAGE_TABLE_ISOLATION
+ pud.p4d.pgd = pti_set_user_pgd(&pudp->p4d.pgd, pud.p4d.pgd); + pud.p4d.pgd = pti_set_user_pgtbl(&pudp->p4d.pgd, pud.p4d.pgd);
+#endif +#endif
set_64bit((unsigned long long *)(pudp), native_pud_val(pud)); set_64bit((unsigned long long *)(pudp), native_pud_val(pud));
} }
@@ -31,12 +31,12 @@ index bc4af5453802..1a0661be1861 100644
union split_pud res, *orig = (union split_pud *)pudp; union split_pud res, *orig = (union split_pud *)pudp;
+#ifdef CONFIG_PAGE_TABLE_ISOLATION +#ifdef CONFIG_PAGE_TABLE_ISOLATION
+ pti_set_user_pgd(&pudp->p4d.pgd, __pgd(0)); + pti_set_user_pgtbl(&pudp->p4d.pgd, __pgd(0));
+#endif +#endif
+ +
/* xchg acts as a barrier before setting of the high bits */ /* xchg acts as a barrier before setting of the high bits */
res.pud_low = xchg(&orig->pud_low, 0); res.pud_low = xchg(&orig->pud_low, 0);
res.pud_high = orig->pud_high; res.pud_high = orig->pud_high;
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From c7eb77959596dc4e78ef164f572520767df21fa3 Mon Sep 17 00:00:00 2001 From 08a22d9c7b62e9c9e08eaf9508f3ef881768a636 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 16:29:13 +0100 Date: Tue, 16 Jan 2018 16:29:13 +0100
Subject: [PATCH 21/31] x86/mm/legacy: Populate the user page-table with user Subject: [PATCH 23/34] x86/mm/legacy: Populate the user page-table with user
pgd's pgd's
Also populate the user-spage pgd's in the user page-table. Also populate the user-spage pgd's in the user page-table.
@@ -12,7 +12,7 @@ Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 file changed, 9 insertions(+) 1 file changed, 9 insertions(+)
diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h
index 685ffe8a0eaf..d77255451d7a 100644 index 685ffe8a0eaf..c399ea5eea41 100644
--- a/arch/x86/include/asm/pgtable-2level.h --- a/arch/x86/include/asm/pgtable-2level.h
+++ b/arch/x86/include/asm/pgtable-2level.h +++ b/arch/x86/include/asm/pgtable-2level.h
@@ -19,6 +19,9 @@ static inline void native_set_pte(pte_t *ptep , pte_t pte) @@ -19,6 +19,9 @@ static inline void native_set_pte(pte_t *ptep , pte_t pte)
@@ -20,7 +20,7 @@ index 685ffe8a0eaf..d77255451d7a 100644
static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
{ {
+#ifdef CONFIG_PAGE_TABLE_ISOLATION +#ifdef CONFIG_PAGE_TABLE_ISOLATION
+ pmd.pud.p4d.pgd = pti_set_user_pgd(&pmdp->pud.p4d.pgd, pmd.pud.p4d.pgd); + pmd.pud.p4d.pgd = pti_set_user_pgtbl(&pmdp->pud.p4d.pgd, pmd.pud.p4d.pgd);
+#endif +#endif
*pmdp = pmd; *pmdp = pmd;
} }
@@ -30,7 +30,7 @@ index 685ffe8a0eaf..d77255451d7a 100644
static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp) static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp)
{ {
+#ifdef CONFIG_PAGE_TABLE_ISOLATION +#ifdef CONFIG_PAGE_TABLE_ISOLATION
+ pti_set_user_pgd(&xp->pud.p4d.pgd, __pgd(0)); + pti_set_user_pgtbl(&xp->pud.p4d.pgd, __pgd(0));
+#endif +#endif
return __pmd(xchg((pmdval_t *)xp, 0)); return __pmd(xchg((pmdval_t *)xp, 0));
} }
@@ -40,11 +40,11 @@ index 685ffe8a0eaf..d77255451d7a 100644
static inline pud_t native_pudp_get_and_clear(pud_t *xp) static inline pud_t native_pudp_get_and_clear(pud_t *xp)
{ {
+#ifdef CONFIG_PAGE_TABLE_ISOLATION +#ifdef CONFIG_PAGE_TABLE_ISOLATION
+ pti_set_user_pgd(&xp->p4d.pgd, __pgd(0)); + pti_set_user_pgtbl(&xp->p4d.pgd, __pgd(0));
+#endif +#endif
return __pud(xchg((pudval_t *)xp, 0)); return __pud(xchg((pudval_t *)xp, 0));
} }
#else #else
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From 9c0f3c2b70d61e768172c322343b8d049224f8bc Mon Sep 17 00:00:00 2001 From 9fb9b9305a94eb64cd9bfc007d0457aa16a3429c Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 16:23:52 +0100 Date: Tue, 16 Jan 2018 16:23:52 +0100
Subject: [PATCH 22/31] x86/mm/pti: Add an overflow check to pti_clone_pmds() Subject: [PATCH 24/34] x86/mm/pti: Add an overflow check to pti_clone_pmds()
The addr counter will overflow if we clone the last PMD of The addr counter will overflow if we clone the last PMD of
the address space, resulting in an endless loop. the address space, resulting in an endless loop.
@@ -14,7 +14,7 @@ Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 file changed, 4 insertions(+) 1 file changed, 4 insertions(+)
diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
index ce38f165489b..7f5e698d127c 100644 index 8f53d2101f64..96a690e6c9b1 100644
--- a/arch/x86/mm/pti.c --- a/arch/x86/mm/pti.c
+++ b/arch/x86/mm/pti.c +++ b/arch/x86/mm/pti.c
@@ -282,6 +282,10 @@ pti_clone_pmds(unsigned long start, unsigned long end, pmdval_t clear) @@ -282,6 +282,10 @@ pti_clone_pmds(unsigned long start, unsigned long end, pmdval_t clear)
@@ -29,5 +29,5 @@ index ce38f165489b..7f5e698d127c 100644
if (WARN_ON(pgd_none(*pgd))) if (WARN_ON(pgd_none(*pgd)))
return; return;
-- --
2.13.6 2.16.2
@@ -1,11 +1,12 @@
From a53c9f48916802bf66a66055537376dbe31716d1 Mon Sep 17 00:00:00 2001 From b4c87612168011f7e95681027bf1de290da8d668 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 11:35:19 +0100 Date: Tue, 16 Jan 2018 11:35:19 +0100
Subject: [PATCH 23/31] x86/mm/pti: Define X86_CR3_PTI_PCID_USER_BIT on x86_32 Subject: [PATCH 25/34] x86/mm/pti: Define X86_CR3_PTI_PCID_USER_BIT on x86_32
Move it out of the X86_64 specific processor defines so Move it out of the X86_64 specific processor defines so
that its visible for 32bit too. that its visible for 32bit too.
Reviewed-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Joerg Roedel <jroedel@suse.de>
--- ---
arch/x86/include/asm/processor-flags.h | 8 ++++---- arch/x86/include/asm/processor-flags.h | 8 ++++----
@@ -36,5 +37,5 @@ index 625a52a5594f..02c2cbda4a74 100644
+ +
#endif /* _ASM_X86_PROCESSOR_FLAGS_H */ #endif /* _ASM_X86_PROCESSOR_FLAGS_H */
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From 56d5b738711fe0179293e1364d78763edfad55f3 Mon Sep 17 00:00:00 2001 From c3b8f5b6bbb097409895ea8e00042034408cac54 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 14:13:04 +0100 Date: Tue, 16 Jan 2018 14:13:04 +0100
Subject: [PATCH 24/31] x86/mm/pti: Clone CPU_ENTRY_AREA on PMD level on x86_32 Subject: [PATCH 26/34] x86/mm/pti: Clone CPU_ENTRY_AREA on PMD level on x86_32
Cloning on the P4D level would clone the complete kernel Cloning on the P4D level would clone the complete kernel
address space into the user-space page-tables for PAE address space into the user-space page-tables for PAE
@@ -14,7 +14,7 @@ Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 file changed, 20 insertions(+) 1 file changed, 20 insertions(+)
diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
index 7f5e698d127c..ec9852abc357 100644 index 96a690e6c9b1..3ffd92309aca 100644
--- a/arch/x86/mm/pti.c --- a/arch/x86/mm/pti.c
+++ b/arch/x86/mm/pti.c +++ b/arch/x86/mm/pti.c
@@ -312,6 +312,7 @@ pti_clone_pmds(unsigned long start, unsigned long end, pmdval_t clear) @@ -312,6 +312,7 @@ pti_clone_pmds(unsigned long start, unsigned long end, pmdval_t clear)
@@ -52,5 +52,5 @@ index 7f5e698d127c..ec9852abc357 100644
* Clone the ESPFIX P4D into the user space visinble page table * Clone the ESPFIX P4D into the user space visinble page table
*/ */
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From 2d0143773e3f3e021b75fcdb886efd7cf2a4e8ce Mon Sep 17 00:00:00 2001 From 35f7b44b3ce2d5b4c4fe2fabb8905bfff44559d4 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Thu, 8 Feb 2018 09:11:57 +0100 Date: Thu, 8 Feb 2018 09:11:57 +0100
Subject: [PATCH 25/31] x86/mm/dump_pagetables: Define INIT_PGD Subject: [PATCH 27/34] x86/mm/dump_pagetables: Define INIT_PGD
Define INIT_PGD to point to the correct initial page-table Define INIT_PGD to point to the correct initial page-table
for 32 and 64 bit and use it where needed. This fixes the for 32 and 64 bit and use it where needed. This fixes the
@@ -57,5 +57,5 @@ index 2a4849e92831..2151ebb6a282 100644
if (!static_cpu_has(X86_FEATURE_PTI)) if (!static_cpu_has(X86_FEATURE_PTI))
return; return;
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From eccc6c5333bb7f33f88e7ec9a87f561bc5d63ccd Mon Sep 17 00:00:00 2001 From c15cbcd9bc3d2e8aaecffc5053dbcf382fe6e56d Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 7 Feb 2018 15:37:52 +0100 Date: Wed, 7 Feb 2018 15:37:52 +0100
Subject: [PATCH 26/31] x86/pgtable/pae: Use separate kernel PMDs for user Subject: [PATCH 28/34] x86/pgtable/pae: Use separate kernel PMDs for user
page-table page-table
We need separate kernel PMDs in the user page-table when PTI We need separate kernel PMDs in the user page-table when PTI
@@ -209,5 +209,5 @@ index a81d42e48922..d95bc7b1ffb4 100644
_pgd_free(pgd); _pgd_free(pgd);
out: out:
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From c07a31bb57363adb6f9d0def1d6b7a16b4a5c72c Mon Sep 17 00:00:00 2001 From dd247e8ec4d2eeefdcb6ad173f1eef8007f54101 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 12:40:07 +0100 Date: Tue, 16 Jan 2018 12:40:07 +0100
Subject: [PATCH 27/31] x86/ldt: Reserve address-space range on 32 bit for the Subject: [PATCH 29/34] x86/ldt: Reserve address-space range on 32 bit for the
LDT LDT
Reserve 2MB/4MB of address-space for mapping the LDT to Reserve 2MB/4MB of address-space for mapping the LDT to
@@ -40,26 +40,26 @@ diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index 2151ebb6a282..fdefdf05739c 100644 index 2151ebb6a282..fdefdf05739c 100644
--- a/arch/x86/mm/dump_pagetables.c --- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c +++ b/arch/x86/mm/dump_pagetables.c
@@ -117,6 +117,9 @@ enum address_markers_idx { @@ -116,6 +116,9 @@ enum address_markers_idx {
VMALLOC_END_NR,
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
PKMAP_BASE_NR, PKMAP_BASE_NR,
#endif +#endif
+#ifdef CONFIG_MODIFY_LDT_SYSCALL +#ifdef CONFIG_MODIFY_LDT_SYSCALL
+ LDT_NR, + LDT_NR,
+#endif #endif
CPU_ENTRY_AREA_NR, CPU_ENTRY_AREA_NR,
FIXADDR_START_NR, FIXADDR_START_NR,
END_OF_SPACE_NR, @@ -129,6 +132,9 @@ static struct addr_marker address_markers[] = {
@@ -130,6 +133,9 @@ static struct addr_marker address_markers[] = { [VMALLOC_END_NR] = { 0UL, "vmalloc() End" },
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
[PKMAP_BASE_NR] = { 0UL, "Persistent kmap() Area" }, [PKMAP_BASE_NR] = { 0UL, "Persistent kmap() Area" },
#endif +#endif
+#ifdef CONFIG_MODIFY_LDT_SYSCALL +#ifdef CONFIG_MODIFY_LDT_SYSCALL
+ [LDT_NR] = { 0UL, "LDT remap" }, + [LDT_NR] = { 0UL, "LDT remap" },
+#endif #endif
[CPU_ENTRY_AREA_NR] = { 0UL, "CPU entry area" }, [CPU_ENTRY_AREA_NR] = { 0UL, "CPU entry area" },
[FIXADDR_START_NR] = { 0UL, "Fixmap area" }, [FIXADDR_START_NR] = { 0UL, "Fixmap area" },
[END_OF_SPACE_NR] = { -1, NULL }
@@ -579,6 +585,9 @@ static int __init pt_dump_init(void) @@ -579,6 +585,9 @@ static int __init pt_dump_init(void)
# endif # endif
address_markers[FIXADDR_START_NR].start_address = FIXADDR_START; address_markers[FIXADDR_START_NR].start_address = FIXADDR_START;
@@ -71,5 +71,5 @@ index 2151ebb6a282..fdefdf05739c 100644
return 0; return 0;
} }
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From 2b4c93fdb404c6155b1f7098895b93cde7b79550 Mon Sep 17 00:00:00 2001 From e00857066a9f75a64a00528d451be9899ec7328f Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 7 Feb 2018 17:44:44 +0100 Date: Wed, 7 Feb 2018 17:44:44 +0100
Subject: [PATCH 28/31] x86/ldt: Define LDT_END_ADDR Subject: [PATCH 30/34] x86/ldt: Define LDT_END_ADDR
It marks the end of the address-space range reserved for the It marks the end of the address-space range reserved for the
LDT. The LDT-code will use it when unmapping the LDT for LDT. The LDT-code will use it when unmapping the LDT for
@@ -60,5 +60,5 @@ index 26d713ecad34..f3c2fbf3c458 100644
if (!static_cpu_has(X86_FEATURE_PTI)) if (!static_cpu_has(X86_FEATURE_PTI))
return; return;
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From 9a4c777654ebe02d30461d2a8a05de6fe4b987f0 Mon Sep 17 00:00:00 2001 From 126ef631acff4fe06d76992f40e04237d7d57344 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 7 Feb 2018 18:02:18 +0100 Date: Wed, 7 Feb 2018 18:02:18 +0100
Subject: [PATCH 29/31] x86/ldt: Split out sanity check in map_ldt_struct() Subject: [PATCH 31/34] x86/ldt: Split out sanity check in map_ldt_struct()
This splits out the mapping sanity check and the actual This splits out the mapping sanity check and the actual
mapping of the LDT to user-space from the map_ldt_struct() mapping of the LDT to user-space from the map_ldt_struct()
@@ -142,5 +142,5 @@ index f3c2fbf3c458..8ab7df99c868 100644
{ {
#ifdef CONFIG_PAGE_TABLE_ISOLATION #ifdef CONFIG_PAGE_TABLE_ISOLATION
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From 94b5cc7e833ec2b9427fa42f8de203f2f4c98bc5 Mon Sep 17 00:00:00 2001 From 1d4ac3c5063abdada00ad78e0ccf74c7de4b365d Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 7 Feb 2018 18:11:54 +0100 Date: Wed, 7 Feb 2018 18:11:54 +0100
Subject: [PATCH 30/31] x86/ldt: Enable LDT user-mapping for PAE Subject: [PATCH 32/34] x86/ldt: Enable LDT user-mapping for PAE
This adds the needed special case for PAE to get the LDT This adds the needed special case for PAE to get the LDT
mapped into the user page-table when PTI is enabled. The big mapped into the user page-table when PTI is enabled. The big
@@ -103,5 +103,5 @@ index 8ab7df99c868..778745199d96 100644
* If PTI is enabled, this maps the LDT into the kernelmode and * If PTI is enabled, this maps the LDT into the kernelmode and
* usermode tables for the given mm. * usermode tables for the given mm.
-- --
2.13.6 2.16.2
@@ -1,7 +1,7 @@
From dbb0074f778b396a11e0c897fef9d0c4583e7ccb Mon Sep 17 00:00:00 2001 From c15b3c596de19962f32b8aecb5abe56a9455a342 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de> From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 16 Jan 2018 11:33:01 +0100 Date: Tue, 16 Jan 2018 11:33:01 +0100
Subject: [PATCH 31/31] x86/pti: Allow CONFIG_PAGE_TABLE_ISOLATION for x86_32 Subject: [PATCH 33/34] x86/pti: Allow CONFIG_PAGE_TABLE_ISOLATION for x86_32
Allow PTI to be compiled on x86_32. Allow PTI to be compiled on x86_32.
@@ -0,0 +1,45 @@
From e7591bc0c06694418c773c099f84b79003257069 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de>
Date: Mon, 12 Feb 2018 19:47:19 +0100
Subject: [PATCH 34/34] x86/mm/pti: Add Warning when booting on a PCID capable
CPU
Warn the user in case the performance can be significantly
improved by switching to a 64-bit kernel.
Suggested-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
arch/x86/mm/pti.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
index 3ffd92309aca..8f5aa0dda327 100644
--- a/arch/x86/mm/pti.c
+++ b/arch/x86/mm/pti.c
@@ -385,6 +385,22 @@ void __init pti_init(void)
pr_info("enabled\n");
+#ifdef CONFIG_X86_32
+ if (boot_cpu_has(X86_FEATURE_PCID)) {
+ /* Use printk to work around pr_fmt() */
+ printk(KERN_WARNING "\n");
+ printk(KERN_WARNING "************************************************************\n");
+ printk(KERN_WARNING "** WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! **\n");
+ printk(KERN_WARNING "** **\n");
+ printk(KERN_WARNING "** You are using 32-bit PTI on a 64-bit PCID-capable CPU. **\n");
+ printk(KERN_WARNING "** Your performance will increase dramatically if you **\n");
+ printk(KERN_WARNING "** switch to a 64-bit kernel! **\n");
+ printk(KERN_WARNING "** **\n");
+ printk(KERN_WARNING "** WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! **\n");
+ printk(KERN_WARNING "************************************************************\n");
+ }
+#endif
+
pti_clone_user_shared();
pti_clone_entry_text();
pti_setup_espfix64();
--
2.16.2
@@ -0,0 +1,32 @@
Dont scare people with something that should be an informal message.
Signed-off-by: Thomas Backlund <tmb@mageia.org>
--- linux/arch/x86/mm/pti.c.orig
+++ linux/arch/x86/mm/pti.c
@@ -388,16 +388,14 @@ void __init pti_init(void)
#ifdef CONFIG_X86_32
if (boot_cpu_has(X86_FEATURE_PCID)) {
/* Use printk to work around pr_fmt() */
- printk(KERN_WARNING "\n");
- printk(KERN_WARNING "************************************************************\n");
- printk(KERN_WARNING "** WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! **\n");
- printk(KERN_WARNING "** **\n");
- printk(KERN_WARNING "** You are using 32-bit PTI on a 64-bit PCID-capable CPU. **\n");
- printk(KERN_WARNING "** Your performance will increase dramatically if you **\n");
- printk(KERN_WARNING "** switch to a 64-bit kernel! **\n");
- printk(KERN_WARNING "** **\n");
- printk(KERN_WARNING "** WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! **\n");
- printk(KERN_WARNING "************************************************************\n");
+ printk(KERN_INFO "\n");
+ printk(KERN_INFO "************************************************************\n");
+ printk(KERN_INFO "** **\n");
+ printk(KERN_INFO "** You are using 32-bit PTI on a 64-bit PCID-capable CPU. **\n");
+ printk(KERN_INFO "** Your performance will increase dramatically if you **\n");
+ printk(KERN_INFO "** switch to a 64-bit install. **\n");
+ printk(KERN_INFO "** **\n");
+ printk(KERN_INFO "************************************************************\n");
}
#endif
@@ -0,0 +1,126 @@
From 3be8828fc507cdafe7040a3dcf361a2bcd8e305b Mon Sep 17 00:00:00 2001
From: Bart Van Assche <bart.vanassche@wdc.com>
Date: Thu, 22 Feb 2018 11:30:20 -0800
Subject: scsi: core: Avoid that ATA error handling can trigger a kernel hang
or oops
Avoid that the recently introduced call_rcu() call in the SCSI core
triggers a double call_rcu() call.
Reported-by: Natanael Copa <ncopa@alpinelinux.org>
Reported-by: Damien Le Moal <damien.lemoal@wdc.com>
References: https://bugzilla.kernel.org/show_bug.cgi?id=198861
Fixes: 3bd6f43f5cb3 ("scsi: core: Ensure that the SCSI error handler gets woken up")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Tested-by: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Natanael Copa <ncopa@alpinelinux.org>
Cc: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Alexandre Oliva <oliva@gnu.org>
Cc: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
drivers/scsi/hosts.c | 3 ---
drivers/scsi/scsi_error.c | 5 +++--
drivers/scsi/scsi_lib.c | 2 ++
include/scsi/scsi_cmnd.h | 3 +++
include/scsi/scsi_host.h | 2 --
5 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 57bf43e..dd94649 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -328,8 +328,6 @@ static void scsi_host_dev_release(struct device *dev)
if (shost->work_q)
destroy_workqueue(shost->work_q);
- destroy_rcu_head(&shost->rcu);
-
if (shost->shost_state == SHOST_CREATED) {
/*
* Free the shost_dev device name here if scsi_host_alloc()
@@ -404,7 +402,6 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
INIT_LIST_HEAD(&shost->starved_list);
init_waitqueue_head(&shost->host_wait);
mutex_init(&shost->scan_mutex);
- init_rcu_head(&shost->rcu);
index = ida_simple_get(&host_index_ida, 0, 0, GFP_KERNEL);
if (index < 0)
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index d042915..ca53a5f 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -223,7 +223,8 @@ static void scsi_eh_reset(struct scsi_cmnd *scmd)
static void scsi_eh_inc_host_failed(struct rcu_head *head)
{
- struct Scsi_Host *shost = container_of(head, typeof(*shost), rcu);
+ struct scsi_cmnd *scmd = container_of(head, typeof(*scmd), rcu);
+ struct Scsi_Host *shost = scmd->device->host;
unsigned long flags;
spin_lock_irqsave(shost->host_lock, flags);
@@ -259,7 +260,7 @@ void scsi_eh_scmd_add(struct scsi_cmnd *scmd)
* Ensure that all tasks observe the host state change before the
* host_failed change.
*/
- call_rcu(&shost->rcu, scsi_eh_inc_host_failed);
+ call_rcu(&scmd->rcu, scsi_eh_inc_host_failed);
}
/**
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 5cbc69b..4af1682 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -670,6 +670,7 @@ static bool scsi_end_request(struct request *req, blk_status_t error,
if (!blk_rq_is_scsi(req)) {
WARN_ON_ONCE(!(cmd->flags & SCMD_INITIALIZED));
cmd->flags &= ~SCMD_INITIALIZED;
+ destroy_rcu_head(&cmd->rcu);
}
if (req->mq_ctx) {
@@ -1150,6 +1151,7 @@ static void scsi_initialize_rq(struct request *rq)
struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq);
scsi_req_init(&cmd->req);
+ init_rcu_head(&cmd->rcu);
cmd->jiffies_at_alloc = jiffies;
cmd->retries = 0;
}
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 949a016..0382cea 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -69,6 +69,9 @@ struct scsi_cmnd {
struct list_head list; /* scsi_cmnd participates in queue lists */
struct list_head eh_entry; /* entry for the host eh_cmd_q */
struct delayed_work abort_work;
+
+ struct rcu_head rcu;
+
int eh_eflags; /* Used by error handlr */
/*
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 1a1df0d..a8b7bf8 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -571,8 +571,6 @@ struct Scsi_Host {
struct blk_mq_tag_set tag_set;
};
- struct rcu_head rcu;
-
atomic_t host_busy; /* commands actually active on low-level */
atomic_t host_blocked;
--
cgit v1.1
@@ -0,0 +1,34 @@
From e39a97353e5378eb46bf01679799c5704d397f32 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Mon, 26 Feb 2018 08:39:59 +0100
Subject: scsi: core: return BLK_STS_OK for DID_OK in
__scsi_error_from_host_byte()
When converting __scsi_error_from_host_byte() to BLK_STS error codes the
case DID_OK was forgotten, resulting in it always returning an error.
Fixes: 2a842acab109 ("block: introduce new block status code type")
Cc: Doug Gilbert <dgilbert@interlog.com>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
drivers/scsi/scsi_lib.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 4af1682..c984404 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -720,6 +720,8 @@ static blk_status_t __scsi_error_from_host_byte(struct scsi_cmnd *cmd,
int result)
{
switch (host_byte(result)) {
+ case DID_OK:
+ return BLK_STS_OK;
case DID_TRANSPORT_FAILFAST:
return BLK_STS_TRANSPORT;
case DID_TARGET_FAILURE:
--
cgit v1.1
@@ -0,0 +1,119 @@
From 1514839b366417934e2f1328edb50ed1e8a719f5 Mon Sep 17 00:00:00 2001
From: "himanshu.madhani@cavium.com" <himanshu.madhani@cavium.com>
Date: Mon, 12 Feb 2018 10:28:14 -0800
Subject: scsi: qla2xxx: Fix NULL pointer crash due to active timer for ABTS
This patch fixes NULL pointer crash due to active timer running for abort
IOCB.
From crash dump analysis it was discoverd that get_next_timer_interrupt()
encountered a corrupted entry on the timer list.
#9 [ffff95e1f6f0fd40] page_fault at ffffffff914fe8f8
[exception RIP: get_next_timer_interrupt+440]
RIP: ffffffff90ea3088 RSP: ffff95e1f6f0fdf0 RFLAGS: 00010013
RAX: ffff95e1f6451028 RBX: 000218e2389e5f40 RCX: 00000001232ad600
RDX: 0000000000000001 RSI: ffff95e1f6f0fdf0 RDI: 0000000001232ad6
RBP: ffff95e1f6f0fe40 R8: ffff95e1f6451188 R9: 0000000000000001
R10: 0000000000000016 R11: 0000000000000016 R12: 00000001232ad5f6
R13: ffff95e1f6450000 R14: ffff95e1f6f0fdf8 R15: ffff95e1f6f0fe10
ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018
Looking at the assembly of get_next_timer_interrupt(), address came
from %r8 (ffff95e1f6451188) which is pointing to list_head with single
entry at ffff95e5ff621178.
0xffffffff90ea307a <get_next_timer_interrupt+426>: mov (%r8),%rdx
0xffffffff90ea307d <get_next_timer_interrupt+429>: cmp %r8,%rdx
0xffffffff90ea3080 <get_next_timer_interrupt+432>: je 0xffffffff90ea30a7 <get_next_timer_interrupt+471>
0xffffffff90ea3082 <get_next_timer_interrupt+434>: nopw 0x0(%rax,%rax,1)
0xffffffff90ea3088 <get_next_timer_interrupt+440>: testb $0x1,0x18(%rdx)
crash> rd ffff95e1f6451188 10
ffff95e1f6451188: ffff95e5ff621178 ffff95e5ff621178 x.b.....x.b.....
ffff95e1f6451198: ffff95e1f6451198 ffff95e1f6451198 ..E.......E.....
ffff95e1f64511a8: ffff95e1f64511a8 ffff95e1f64511a8 ..E.......E.....
ffff95e1f64511b8: ffff95e77cf509a0 ffff95e77cf509a0 ...|.......|....
ffff95e1f64511c8: ffff95e1f64511c8 ffff95e1f64511c8 ..E.......E.....
crash> rd ffff95e5ff621178 10
ffff95e5ff621178: 0000000000000001 ffff95e15936aa00 ..........6Y....
ffff95e5ff621188: 0000000000000000 00000000ffffffff ................
ffff95e5ff621198: 00000000000000a0 0000000000000010 ................
ffff95e5ff6211a8: ffff95e5ff621198 000000000000000c ..b.............
ffff95e5ff6211b8: 00000f5800000000 ffff95e751f8d720 ....X... ..Q....
ffff95e5ff621178 belongs to freed mempool object at ffff95e5ff621080.
CACHE NAME OBJSIZE ALLOCATED TOTAL SLABS SSIZE
ffff95dc7fd74d00 mnt_cache 384 19785 24948 594 16k
SLAB MEMORY NODE TOTAL ALLOCATED FREE
ffffdc5dabfd8800 ffff95e5ff620000 1 42 29 13
FREE / [ALLOCATED]
ffff95e5ff621080 (cpu 6 cache)
Examining the contents of that memory reveals a pointer to a constant string
in the driver, "abort\0", which is set by qla24xx_async_abort_cmd().
crash> rd ffffffffc059277c 20
ffffffffc059277c: 6e490074726f6261 0074707572726574 abort.Interrupt.
ffffffffc059278c: 00676e696c6c6f50 6920726576697244 Polling.Driver i
ffffffffc059279c: 646f6d207325206e 6974736554000a65 n %s mode..Testi
ffffffffc05927ac: 636976656420676e 786c252074612065 ng device at %lx
ffffffffc05927bc: 6b63656843000a2e 646f727020676e69 ...Checking prod
ffffffffc05927cc: 6f20444920746375 0a2e706968632066 uct ID of chip..
ffffffffc05927dc: 5120646e756f4600 204130303232414c .Found QLA2200A
ffffffffc05927ec: 43000a2e70696843 20676e696b636568 Chip...Checking
ffffffffc05927fc: 65786f626c69616d 6c636e69000a2e73 mailboxes...incl
ffffffffc059280c: 756e696c2f656475 616d2d616d642f78 ude/linux/dma-ma
crash> struct -ox srb_iocb
struct srb_iocb {
union {
struct {...} logio;
struct {...} els_logo;
struct {...} tmf;
struct {...} fxiocb;
struct {...} abt;
struct ct_arg ctarg;
struct {...} mbx;
struct {...} nack;
[0x0 ] } u;
[0xb8] struct timer_list timer;
[0x108] void (*timeout)(void *);
}
SIZE: 0x110
crash> ! bc
ibase=16
obase=10
B8+40
F8
The object is a srb_t, and at offset 0xf8 within that structure
(i.e. ffff95e5ff621080 + f8 -> ffff95e5ff621178) is a struct timer_list.
Cc: <stable@vger.kernel.org> #4.4+
Fixes: 4440e46d5db7 ("[SCSI] qla2xxx: Add IOCB Abort command asynchronous handling.")
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
drivers/scsi/qla2xxx/qla_init.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 2dea112..0487062 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1527,6 +1527,7 @@ qla24xx_abort_sp_done(void *ptr, int res)
srb_t *sp = ptr;
struct srb_iocb *abt = &sp->u.iocb_cmd;
+ del_timer(&sp->u.iocb_cmd.timer);
complete(&abt->u.abt.comp);
}
--
cgit v1.1
+52 -22
View File
@@ -14,6 +14,7 @@
### ###
### Stable Queue ### Stable Queue
### ###
patch-4.14.25-rc1.patch
### ###
### Arch x86 ### Arch x86
@@ -45,35 +46,40 @@ pti32bit-0003-x86-entry-32-Load-task-stack-from-x86_tss.sp1-in-SYS.patch
pti32bit-0004-x86-entry-32-Put-ESPFIX-code-into-a-macro.patch pti32bit-0004-x86-entry-32-Put-ESPFIX-code-into-a-macro.patch
pti32bit-0005-x86-entry-32-Unshare-NMI-return-path.patch pti32bit-0005-x86-entry-32-Unshare-NMI-return-path.patch
pti32bit-0006-x86-entry-32-Split-off-return-to-kernel-path.patch pti32bit-0006-x86-entry-32-Split-off-return-to-kernel-path.patch
# could be disabled as not needed according to Linus @ LKML
pti32bit-0007-x86-entry-32-Restore-segments-before-int-registers.patch pti32bit-0007-x86-entry-32-Restore-segments-before-int-registers.patch
pti32bit-0008-x86-entry-32-Enter-the-kernel-via-trampoline-stack.patch pti32bit-0008-x86-entry-32-Enter-the-kernel-via-trampoline-stack.patch
pti32bit-0009-x86-entry-32-Leave-the-kernel-via-trampoline-stack.patch pti32bit-0009-x86-entry-32-Leave-the-kernel-via-trampoline-stack.patch
pti32bit-0010-x86-entry-32-Introduce-SAVE_ALL_NMI-and-RESTORE_ALL_.patch pti32bit-0010-x86-entry-32-Introduce-SAVE_ALL_NMI-and-RESTORE_ALL_.patch
pti32bit-0011-x86-entry-32-Add-PTI-cr3-switches-to-NMI-handler-cod.patch pti32bit-0011-x86-entry-32-Handle-Entry-from-Kernel-Mode-on-Entry-.patch
pti32bit-0012-x86-entry-32-Add-PTI-cr3-switch-to-non-NMI-entry-exi.patch pti32bit-0012-x86-entry-32-Simplify-debug-entry-point.patch
pti32bit-0013-x86-entry-32-Handle-Entry-from-Kernel-Mode-on-Entry-.patch pti32bit-0013-x86-entry-32-Add-PTI-cr3-switches-to-NMI-handler-cod.patch
pti32bit-0014-x86-pgtable-pae-Unshare-kernel-PMDs-when-PTI-is-enab.patch pti32bit-0014-x86-entry-32-Add-PTI-cr3-switch-to-non-NMI-entry-exi.patch
pti32bit-0015-x86-pgtable-32-Allocate-8k-page-tables-when-PTI-is-e.patch pti32bit-0015-x86-pgtable-Rename-pti_set_user_pgd-to-pti_set_user_.patch
pti32bit-0016-x86-pgtable-Move-pgdp-kernel-user-conversion-functio.patch pti32bit-0016-x86-pgtable-pae-Unshare-kernel-PMDs-when-PTI-is-enab.patch
pti32bit-0017-x86-pgtable-Move-pti_set_user_pgd-to-pgtable.h.patch pti32bit-0017-x86-pgtable-32-Allocate-8k-page-tables-when-PTI-is-e.patch
pti32bit-0018-x86-pgtable-Move-two-more-functions-from-pgtable_64..patch pti32bit-0018-x86-pgtable-Move-pgdp-kernel-user-conversion-functio.patch
pti32bit-0019-x86-mm-pae-Populate-valid-user-PGD-entries.patch pti32bit-0019-x86-pgtable-Move-pti_set_user_pgtbl-to-pgtable.h.patch
pti32bit-0020-x86-mm-pae-Populate-the-user-page-table-with-user-pg.patch pti32bit-0020-x86-pgtable-Move-two-more-functions-from-pgtable_64..patch
pti32bit-0021-x86-mm-legacy-Populate-the-user-page-table-with-user.patch pti32bit-0021-x86-mm-pae-Populate-valid-user-PGD-entries.patch
pti32bit-0022-x86-mm-pti-Add-an-overflow-check-to-pti_clone_pmds.patch pti32bit-0022-x86-mm-pae-Populate-the-user-page-table-with-user-pg.patch
pti32bit-0023-x86-mm-pti-Define-X86_CR3_PTI_PCID_USER_BIT-on-x86_3.patch pti32bit-0023-x86-mm-legacy-Populate-the-user-page-table-with-user.patch
pti32bit-0024-x86-mm-pti-Clone-CPU_ENTRY_AREA-on-PMD-level-on-x86_.patch pti32bit-0024-x86-mm-pti-Add-an-overflow-check-to-pti_clone_pmds.patch
pti32bit-0025-x86-mm-dump_pagetables-Define-INIT_PGD.patch pti32bit-0025-x86-mm-pti-Define-X86_CR3_PTI_PCID_USER_BIT-on-x86_3.patch
pti32bit-0026-x86-pgtable-pae-Use-separate-kernel-PMDs-for-user-pa.patch pti32bit-0026-x86-mm-pti-Clone-CPU_ENTRY_AREA-on-PMD-level-on-x86_.patch
pti32bit-0027-x86-ldt-Reserve-address-space-range-on-32-bit-for-th.patch pti32bit-0027-x86-mm-dump_pagetables-Define-INIT_PGD.patch
pti32bit-0028-x86-ldt-Define-LDT_END_ADDR.patch pti32bit-0028-x86-pgtable-pae-Use-separate-kernel-PMDs-for-user-pa.patch
pti32bit-0029-x86-ldt-Split-out-sanity-check-in-map_ldt_struct.patch pti32bit-0029-x86-ldt-Reserve-address-space-range-on-32-bit-for-th.patch
pti32bit-0030-x86-ldt-Enable-LDT-user-mapping-for-PAE.patch pti32bit-0030-x86-ldt-Define-LDT_END_ADDR.patch
pti32bit-0031-x86-pti-Allow-CONFIG_PAGE_TABLE_ISOLATION-for-x86_32.patch pti32bit-0031-x86-ldt-Split-out-sanity-check-in-map_ldt_struct.patch
pti32bit-0032-x86-ldt-Enable-LDT-user-mapping-for-PAE.patch
pti32bit-0033-x86-pti-Allow-CONFIG_PAGE_TABLE_ISOLATION-for-x86_32.patch
pti32bit-0034-x86-mm-pti-Add-Warning-when-booting-on-a-PCID-capabl.patch
# tone down warning about PCID on 32bit
pti32bit-0100-tone-down-PCID-on-32bit-message.patch
# selected fixes from x86/pti # selected fixes from x86/pti
x86-pti-0070-nospec-Kill-array_index_nospec_mask_check.patch x86-pti-0070-nospec-Kill-array_index_nospec_mask_check.patch
x86-pti-0071-nospec-Allow-index-argument-to-have-const-qualified-.patch
x86-pti-0072-nospec-Include-asm-barrier.h-dependency.patch x86-pti-0072-nospec-Include-asm-barrier.h-dependency.patch
x86-pti-0073-x86-microcode-Propagate-return-value-from-updating-f.patch x86-pti-0073-x86-microcode-Propagate-return-value-from-updating-f.patch
x86-pti-0074-x86-CPU-Add-a-microcode-loader-callback.patch x86-pti-0074-x86-CPU-Add-a-microcode-loader-callback.patch
@@ -186,6 +192,15 @@ block-bfq-limit-sectors-served-with-interactive-weig.patch
block-bfq-put-async-queues-for-root-bfq-groups-too.patch block-bfq-put-async-queues-for-root-bfq-groups-too.patch
block-bfq-add-requeue-request-hook.patch block-bfq-add-requeue-request-hook.patch
# HPT RR 644L
ata-ahci-Add-PCI-id-for-the-Highpoint-Rocketraid-644L-card.patch
PCI-Add-function-1-DMA-alias-quirk-for-Highpoint-RocketRAID-644L.patch
# scsi
scsi-core-Avoid-that-ATA-error-handling-can-trigger-a-kernel-hang-or-oops.patch
scsi-core-return-BLK_STS_OK-for-DID_OK-in-__scsi_error_from_host_byte.patch
scsi-qla2xxx-Fix-NULL-pointer-crash-due-to-active-timer-for-ABTS.patch
### ###
### Char ### Char
### ###
@@ -251,6 +266,10 @@ hwmon-k10temp-Add-support-for-temperature-offsets.patch
input-i8042-quirks-for-Fujitsu-Lifebook-A544-and-Lif.patch input-i8042-quirks-for-Fujitsu-Lifebook-A544-and-Lif.patch
# mga #22703
input-goodix-disable-IRQs-while-suspended.patch
input-goodix-add-support-for-GDIX1002.patch
### ###
### idle ### idle
### ###
@@ -309,6 +328,9 @@ net-tls-Correct-length-of-scatterlist-in-tls_sw_sendpage.patch
# silence message that gets reported as a bug # silence message that gets reported as a bug
net-netfilter-xt_addrtype-silence-BROADCAST-message.patch net-netfilter-xt_addrtype-silence-BROADCAST-message.patch
# CVE-2018-1065
net-netfilter-add-back-stackpointer-size-checks.patch
### ###
### pinctrl ### pinctrl
### ###
@@ -340,6 +362,12 @@ platform-x86-ideapad-laptop-Increase-timeout-to-wait-for-ec-answer.patch
### Sound ### Sound
### ###
sound-ALSA-hda-Fix-a-wrong-FIXUP-for-alc289-on-Dell-machines.patch
# skl/kbl fixes
sound-ASoC-Intel-Skylake-Fix-jack-name-format-substitution.patch
sound-ASoC-Intel-kbl-fix-jack-name.patch
### ###
### Staging ### Staging
### ###
@@ -448,6 +476,8 @@ video-mageia-logo.patch
### ARM ### ARM
### ###
arch-ARM-omap2-hide-omap3_save_secure_ram-on-non-OMAP3-bu.patch
### ###
### IA64 ### IA64
### ###
@@ -0,0 +1,35 @@
From: Hui Wang <hui.wang@canonical.com>
Subject: [PATCH] ALSA: hda - Fix a wrong FIXUP for alc289 on Dell machines
Date: Fri, 2 Mar 2018 13:05:36 +0800
With the alc289, the Pin 0x1b is Headphone-Mic, so we should assign
ALC269_FIXUP_DELL4_MIC_NO_PRESENCE rather than
ALC225_FIXUP_DELL1_MIC_NO_PRESENCE to it. And this change is suggested
by Kailang of Realtek and is verified on the machine.
(This fixes the commit 3f2f7c55)
Cc: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
sound/pci/hda/patch_realtek.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b9c93fa..7a9a867 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6872,7 +6872,7 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
{0x12, 0x90a60120},
{0x14, 0x90170110},
{0x21, 0x0321101f}),
- SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
+ SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
{0x12, 0xb7a60130},
{0x14, 0x90170110},
{0x21, 0x04211020}),
--
2.7.4
@@ -0,0 +1,35 @@
From d1c4cb447a7efcb5608a33cdfed8ab4234378b0a Mon Sep 17 00:00:00 2001
From: Chintan Patel <chintan.m.patel@intel.com>
Date: Mon, 18 Sep 2017 08:43:18 -0700
Subject: [PATCH] ASoC: Intel: Skylake: Fix jack name format substitution
Jack name is not getting formatted correctly hence resulting
in invalid name for HDMI/DP input devices.
This was recently exposed due changes brought by MST:
commit 3a13347f05fd ("ASoC: Intel: kbl: Add jack port initialize
in kbl machine drivers")
Signed-off-by: Chintan Patel <chintan.m.patel@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
index 88ff54220007..9cd0769ccd34 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -604,6 +604,8 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
codec = pcm->codec_dai->codec;
+ snprintf(jack_name, sizeof(jack_name),
+ "HDMI/DP, pcm=%d Jack", pcm->device);
err = snd_soc_card_jack_new(card, jack_name,
SND_JACK_AVOUT, &ctx->kabylake_hdmi[i],
NULL, 0);
--
2.16.2
@@ -0,0 +1,32 @@
From cedb6415f9ece6d3368aa0ac8a433caff799792a Mon Sep 17 00:00:00 2001
From: Vinod Koul <vinod.koul@intel.com>
Date: Tue, 31 Oct 2017 16:47:27 +0530
Subject: [PATCH] ASoC: Intel: kbl: fix jack name
Commit d1c4cb447a7e ("ASoC: Intel: Skylake: Fix jack name format
substitution") added Jack name but erroneously added a space as well,
so remove the space in Jack name.
Fixes: d1c4cb447a7e ("ASoC: Intel: Skylake: Fix jack name format substitution")
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
index 9cd0769ccd34..69ab55956492 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -605,7 +605,7 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
codec = pcm->codec_dai->codec;
snprintf(jack_name, sizeof(jack_name),
- "HDMI/DP, pcm=%d Jack", pcm->device);
+ "HDMI/DP,pcm=%d Jack", pcm->device);
err = snd_soc_card_jack_new(card, jack_name,
SND_JACK_AVOUT, &ctx->kabylake_hdmi[i],
NULL, 0);
--
2.16.2
@@ -1,65 +0,0 @@
From b98c6a160a057d5686a8c54c79cc6c8c94a7d0c8 Mon Sep 17 00:00:00 2001
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Date: Fri, 16 Feb 2018 13:20:48 -0800
Subject: [PATCH 71/77] nospec: Allow index argument to have const-qualified
type
The last expression in a statement expression need not be a bare
variable, quoting gcc docs
The last thing in the compound statement should be an expression
followed by a semicolon; the value of this subexpression serves as the
value of the entire construct.
and we already use that in e.g. the min/max macros which end with a
ternary expression.
This way, we can allow index to have const-qualified type, which will in
some cases avoid the need for introducing a local copy of index of
non-const qualified type. That, in turn, can prevent readers not
familiar with the internals of array_index_nospec from wondering about
the seemingly redundant extra variable, and I think that's worthwhile
considering how confusing the whole _nospec business is.
The expression _i&_mask has type unsigned long (since that is the type
of _mask, and the BUILD_BUG_ONs guarantee that _i will get promoted to
that), so in order not to change the type of the whole expression, add
a cast back to typeof(_i).
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arch@vger.kernel.org
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/151881604837.17395.10812767547837568328.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
include/linux/nospec.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/nospec.h b/include/linux/nospec.h
index d6701e34424f..172a19dc35ab 100644
--- a/include/linux/nospec.h
+++ b/include/linux/nospec.h
@@ -52,7 +52,6 @@ static inline unsigned long array_index_mask_nospec(unsigned long index,
BUILD_BUG_ON(sizeof(_i) > sizeof(long)); \
BUILD_BUG_ON(sizeof(_s) > sizeof(long)); \
\
- _i &= _mask; \
- _i; \
+ (typeof(_i)) (_i & _mask); \
})
#endif /* _LINUX_NOSPEC_H */
--
2.16.1
+46 -32
View File
@@ -28,8 +28,8 @@
</BuildDependencies> </BuildDependencies>
<Patches> <Patches>
<!-- Linux patches --> <!-- Linux patches -->
<Patch level="1" compressionType="xz">patches/linux/patch-4.14.23.xz</Patch> <Patch level="1" compressionType="xz">patches/linux/patch-4.14.24.xz</Patch>
<!-- Mageia Linux patches // compatible with http://svnweb.mageia.org/packages/cauldron/kernel/releases/4.14.22/1.mga7/PATCHES/patches/series--> <!-- Mageia Linux patches // compatible with http://svnweb.mageia.org/packages/cauldron/kernel/releases/4.14.24/1.mga7/PATCHES/patches/series-->
<!--stable patches--> <!--stable patches-->
<!--CVE-2016-8405--> <!--CVE-2016-8405-->
<!--other patches--> <!--other patches-->
@@ -48,29 +48,31 @@
<Patch level="1">patches/mageia/pti32bit-0008-x86-entry-32-Enter-the-kernel-via-trampoline-stack.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0008-x86-entry-32-Enter-the-kernel-via-trampoline-stack.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0009-x86-entry-32-Leave-the-kernel-via-trampoline-stack.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0009-x86-entry-32-Leave-the-kernel-via-trampoline-stack.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0010-x86-entry-32-Introduce-SAVE_ALL_NMI-and-RESTORE_ALL_.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0010-x86-entry-32-Introduce-SAVE_ALL_NMI-and-RESTORE_ALL_.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0011-x86-entry-32-Add-PTI-cr3-switches-to-NMI-handler-cod.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0011-x86-entry-32-Handle-Entry-from-Kernel-Mode-on-Entry-.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0012-x86-entry-32-Add-PTI-cr3-switch-to-non-NMI-entry-exi.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0012-x86-entry-32-Simplify-debug-entry-point.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0013-x86-entry-32-Handle-Entry-from-Kernel-Mode-on-Entry-.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0013-x86-entry-32-Add-PTI-cr3-switches-to-NMI-handler-cod.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0014-x86-pgtable-pae-Unshare-kernel-PMDs-when-PTI-is-enab.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0014-x86-entry-32-Add-PTI-cr3-switch-to-non-NMI-entry-exi.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0015-x86-pgtable-32-Allocate-8k-page-tables-when-PTI-is-e.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0015-x86-pgtable-Rename-pti_set_user_pgd-to-pti_set_user_.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0016-x86-pgtable-Move-pgdp-kernel-user-conversion-functio.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0016-x86-pgtable-pae-Unshare-kernel-PMDs-when-PTI-is-enab.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0017-x86-pgtable-Move-pti_set_user_pgd-to-pgtable.h.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0017-x86-pgtable-32-Allocate-8k-page-tables-when-PTI-is-e.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0018-x86-pgtable-Move-two-more-functions-from-pgtable_64..patch</Patch> <Patch level="1">patches/mageia/pti32bit-0018-x86-pgtable-Move-pgdp-kernel-user-conversion-functio.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0019-x86-mm-pae-Populate-valid-user-PGD-entries.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0019-x86-pgtable-Move-pti_set_user_pgtbl-to-pgtable.h.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0020-x86-mm-pae-Populate-the-user-page-table-with-user-pg.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0020-x86-pgtable-Move-two-more-functions-from-pgtable_64..patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0021-x86-mm-legacy-Populate-the-user-page-table-with-user.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0021-x86-mm-pae-Populate-valid-user-PGD-entries.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0022-x86-mm-pti-Add-an-overflow-check-to-pti_clone_pmds.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0022-x86-mm-pae-Populate-the-user-page-table-with-user-pg.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0023-x86-mm-pti-Define-X86_CR3_PTI_PCID_USER_BIT-on-x86_3.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0023-x86-mm-legacy-Populate-the-user-page-table-with-user.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0024-x86-mm-pti-Clone-CPU_ENTRY_AREA-on-PMD-level-on-x86_.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0024-x86-mm-pti-Add-an-overflow-check-to-pti_clone_pmds.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0025-x86-mm-dump_pagetables-Define-INIT_PGD.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0025-x86-mm-pti-Define-X86_CR3_PTI_PCID_USER_BIT-on-x86_3.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0026-x86-pgtable-pae-Use-separate-kernel-PMDs-for-user-pa.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0026-x86-mm-pti-Clone-CPU_ENTRY_AREA-on-PMD-level-on-x86_.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0027-x86-ldt-Reserve-address-space-range-on-32-bit-for-th.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0027-x86-mm-dump_pagetables-Define-INIT_PGD.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0028-x86-ldt-Define-LDT_END_ADDR.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0028-x86-pgtable-pae-Use-separate-kernel-PMDs-for-user-pa.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0029-x86-ldt-Split-out-sanity-check-in-map_ldt_struct.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0029-x86-ldt-Reserve-address-space-range-on-32-bit-for-th.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0030-x86-ldt-Enable-LDT-user-mapping-for-PAE.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0030-x86-ldt-Define-LDT_END_ADDR.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0031-x86-pti-Allow-CONFIG_PAGE_TABLE_ISOLATION-for-x86_32.patch</Patch> <Patch level="1">patches/mageia/pti32bit-0031-x86-ldt-Split-out-sanity-check-in-map_ldt_struct.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0032-x86-ldt-Enable-LDT-user-mapping-for-PAE.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0033-x86-pti-Allow-CONFIG_PAGE_TABLE_ISOLATION-for-x86_32.patch</Patch>
<Patch level="1">patches/mageia/pti32bit-0034-x86-mm-pti-Add-Warning-when-booting-on-a-PCID-capabl.patch</Patch>
<Patch level="1">patches/mageia/x86-pti-0070-nospec-Kill-array_index_nospec_mask_check.patch</Patch> <Patch level="1">patches/mageia/x86-pti-0070-nospec-Kill-array_index_nospec_mask_check.patch</Patch>
<Patch level="1">patches/mageia/x86-pti-0071-nospec-Allow-index-argument-to-have-const-qualified-.patch</Patch>
<Patch level="1">patches/mageia/x86-pti-0072-nospec-Include-asm-barrier.h-dependency.patch</Patch> <Patch level="1">patches/mageia/x86-pti-0072-nospec-Include-asm-barrier.h-dependency.patch</Patch>
<Patch level="1">patches/mageia/x86-pti-0073-x86-microcode-Propagate-return-value-from-updating-f.patch</Patch> <Patch level="1">patches/mageia/x86-pti-0073-x86-microcode-Propagate-return-value-from-updating-f.patch</Patch>
<Patch level="1">patches/mageia/x86-pti-0074-x86-CPU-Add-a-microcode-loader-callback.patch</Patch> <Patch level="1">patches/mageia/x86-pti-0074-x86-CPU-Add-a-microcode-loader-callback.patch</Patch>
@@ -84,12 +86,12 @@
<Patch level="1">patches/mageia/acpi-processor-M720SR-limit-to-C2.patch</Patch> <Patch level="1">patches/mageia/acpi-processor-M720SR-limit-to-C2.patch</Patch>
<Patch level="1">patches/mageia/ACPI-video-Add-a-quirk-to-force-acpi-video-backlight.patch</Patch> <Patch level="1">patches/mageia/ACPI-video-Add-a-quirk-to-force-acpi-video-backlight.patch</Patch>
<Patch level="1">patches/mageia/acpi-ec-restore-polling-during-noirq-suspend_resume-phases.patch</Patch> <Patch level="1">patches/mageia/acpi-ec-restore-polling-during-noirq-suspend_resume-phases.patch</Patch>
<!--Patch level="1">patches/mageia/scsi-ppscsi-2.6.2.patch</Patch> <!--1--><Patch level="1">patches/mageia/scsi-ppscsi-2.6.2.patch</Patch>
<Patch level="1">patches/mageia/scsi-ppscsi_fixes.patch</Patch> <Patch level="1">patches/mageia/scsi-ppscsi_fixes.patch</Patch>
<Patch level="1">patches/mageia/scsi-ppscsi-sg-helper-update.patch</Patch> <Patch level="1">patches/mageia/scsi-ppscsi-sg-helper-update.patch</Patch>
<Patch level="1">patches/mageia/scsi-ppscsi-update-for-scsi_data_buffer.patch</Patch> <Patch level="1">patches/mageia/scsi-ppscsi-update-for-scsi_data_buffer.patch</Patch>
<Patch level="1">patches/mageia/scsi-ppscsi-mdvbz45393.patch</Patch> <Patch level="1">patches/mageia/scsi-ppscsi-mdvbz45393.patch</Patch>
<Patch level="1">patches/mageia/scsi-ppscsi-3.0-buildfix.patch</Patch--> <Patch level="1">patches/mageia/scsi-ppscsi-3.0-buildfix.patch</Patch><!--1-->
<Patch level="1">patches/mageia/scsi-megaraid-new-sysfs-name.patch</Patch> <Patch level="1">patches/mageia/scsi-megaraid-new-sysfs-name.patch</Patch>
<Patch level="1">patches/mageia/ide-pci-sis5513-965.patch</Patch> <Patch level="1">patches/mageia/ide-pci-sis5513-965.patch</Patch>
<Patch level="1">patches/mageia/mpt-vmware-fix.patch</Patch> <Patch level="1">patches/mageia/mpt-vmware-fix.patch</Patch>
@@ -119,6 +121,11 @@
<Patch level="1">patches/mageia/block-bfq-limit-sectors-served-with-interactive-weig.patch</Patch> <Patch level="1">patches/mageia/block-bfq-limit-sectors-served-with-interactive-weig.patch</Patch>
<Patch level="1">patches/mageia/block-bfq-add-requeue-request-hook.patch</Patch> <Patch level="1">patches/mageia/block-bfq-add-requeue-request-hook.patch</Patch>
<Patch level="1">patches/mageia/block-bfq-put-async-queues-for-root-bfq-groups-too.patch</Patch> <Patch level="1">patches/mageia/block-bfq-put-async-queues-for-root-bfq-groups-too.patch</Patch>
<Patch level="1">patches/mageia/ata-ahci-Add-PCI-id-for-the-Highpoint-Rocketraid-644L-card.patch</Patch>
<Patch level="1">patches/mageia/PCI-Add-function-1-DMA-alias-quirk-for-Highpoint-RocketRAID-644L.patch</Patch>
<Patch level="1">patches/mageia/scsi-core-Avoid-that-ATA-error-handling-can-trigger-a-kernel-hang-or-oops.patch</Patch>
<Patch level="1">patches/mageia/scsi-core-return-BLK_STS_OK-for-DID_OK-in-__scsi_error_from_host_byte.patch</Patch>
<Patch level="1">patches/mageia/scsi-qla2xxx-Fix-NULL-pointer-crash-due-to-active-timer-for-ABTS.patch</Patch>
<Patch level="1">patches/mageia/fs-aufs-4.14.patch</Patch> <Patch level="1">patches/mageia/fs-aufs-4.14.patch</Patch>
<Patch level="1">patches/mageia/fs-aufs-4.14-modular.patch</Patch> <Patch level="1">patches/mageia/fs-aufs-4.14-modular.patch</Patch>
<Patch level="1">patches/mageia/fs-aufs-include-vmalloc.patch</Patch> <Patch level="1">patches/mageia/fs-aufs-include-vmalloc.patch</Patch>
@@ -145,6 +152,8 @@
<Patch level="1">patches/mageia/hwmon-k10temp-Add-support-for-family-17h.patch</Patch> <Patch level="1">patches/mageia/hwmon-k10temp-Add-support-for-family-17h.patch</Patch>
<Patch level="1">patches/mageia/hwmon-k10temp-Add-support-for-temperature-offsets.patch</Patch> <Patch level="1">patches/mageia/hwmon-k10temp-Add-support-for-temperature-offsets.patch</Patch>
<Patch level="1">patches/mageia/input-i8042-quirks-for-Fujitsu-Lifebook-A544-and-Lif.patch</Patch> <Patch level="1">patches/mageia/input-i8042-quirks-for-Fujitsu-Lifebook-A544-and-Lif.patch</Patch>
<Patch level="1">patches/mageia/input-goodix-disable-IRQs-while-suspended.patch</Patch>
<Patch level="1">patches/mageia/input-goodix-add-support-for-GDIX1002.patch</Patch>
<Patch level="1">patches/mageia/mm-page_vma_mapped-Introduce-pfn_in_hpage.patch</Patch> <Patch level="1">patches/mageia/mm-page_vma_mapped-Introduce-pfn_in_hpage.patch</Patch>
<Patch level="1">patches/mageia/net-sis190-fix-list-usage.patch</Patch> <Patch level="1">patches/mageia/net-sis190-fix-list-usage.patch</Patch>
<Patch level="1">patches/mageia/net-netfilter-IFWLOG.patch</Patch> <Patch level="1">patches/mageia/net-netfilter-IFWLOG.patch</Patch>
@@ -162,17 +171,21 @@
<Patch level="1">patches/mageia/net-WireGuard.patch</Patch> <Patch level="1">patches/mageia/net-WireGuard.patch</Patch>
<Patch level="1">patches/mageia/net-tls-Correct-length-of-scatterlist-in-tls_sw_sendpage.patch</Patch> <Patch level="1">patches/mageia/net-tls-Correct-length-of-scatterlist-in-tls_sw_sendpage.patch</Patch>
<Patch level="1">patches/mageia/net-netfilter-xt_addrtype-silence-BROADCAST-message.patch</Patch> <Patch level="1">patches/mageia/net-netfilter-xt_addrtype-silence-BROADCAST-message.patch</Patch>
<Patch level="1">patches/mageia/net-netfilter-add-back-stackpointer-size-checks.patch</Patch>
<Patch level="1">patches/mageia/platform-x86-add-shuttle-wmi-driver.patch</Patch> <Patch level="1">patches/mageia/platform-x86-add-shuttle-wmi-driver.patch</Patch>
<Patch level="1">patches/mageia/platform-x86-shuttle-wmi-drop-devinit-exit.patch</Patch> <Patch level="1">patches/mageia/platform-x86-shuttle-wmi-drop-devinit-exit.patch</Patch>
<Patch level="1">patches/mageia/platform-x86-shuttle-wmi-4.2-buildfix.patch</Patch> <Patch level="1">patches/mageia/platform-x86-shuttle-wmi-4.2-buildfix.patch</Patch>
<Patch level="1">patches/mageia/platform-x86-shuttle-wmi-4.13-buildfix.patch</Patch> <Patch level="1">patches/mageia/platform-x86-shuttle-wmi-4.13-buildfix.patch</Patch>
<Patch level="1">patches/mageia/platform-x86-ideapad-Add-IdeaPad-320-15IKB-to-no_hw_rfkill_list.patch</Patch> <Patch level="1">patches/mageia/platform-x86-ideapad-Add-IdeaPad-320-15IKB-to-no_hw_rfkill_list.patch</Patch>
<Patch level="1">patches/mageia/platform-x86-ideapad-laptop-Increase-timeout-to-wait-for-ec-answer.patch</Patch> <Patch level="1">patches/mageia/platform-x86-ideapad-laptop-Increase-timeout-to-wait-for-ec-answer.patch</Patch>
<Patch level="1">patches/mageia/sound-ALSA-hda-Fix-a-wrong-FIXUP-for-alc289-on-Dell-machines.patch</Patch>
<Patch level="1">patches/mageia/sound-ASoC-Intel-Skylake-Fix-jack-name-format-substitution.patch</Patch>
<Patch level="1">patches/mageia/sound-ASoC-Intel-kbl-fix-jack-name.patch</Patch>
<Patch level="1">patches/mageia/hid-usbhid-IBM-BladeCenterHS20-quirk.patch</Patch> <Patch level="1">patches/mageia/hid-usbhid-IBM-BladeCenterHS20-quirk.patch</Patch>
<Patch level="1">patches/mageia/usb-storage-unusual_devs-add-id.patch</Patch> <Patch level="1">patches/mageia/usb-storage-unusual_devs-add-id.patch</Patch>
<Patch level="1">patches/mageia/usb-storage-unusual_devs-add-id-2.6.37-buildfix.patch</Patch> <Patch level="1">patches/mageia/usb-storage-unusual_devs-add-id-2.6.37-buildfix.patch</Patch>
<Patch level="1">patches/mageia/media-usb-pwc-lie-in-proc-usb-devices.patch</Patch> <Patch level="1">patches/mageia/media-usb-pwc-lie-in-proc-usb-devices.patch</Patch>
<Patch level="1">patches/mageia/3rd-3rdparty-1.0-tree.patch</Patch> <!--Patch level="1">patches/mageia/3rd-3rdparty-1.0-tree.patch</Patch><disable 3Rd module build support>
<Patch level="1">patches/mageia/3rd-3rdparty-merge.patch</Patch> <Patch level="1">patches/mageia/3rd-3rdparty-merge.patch</Patch>
<Patch level="1">patches/mageia/3rd-acerhk-0.5.35.patch</Patch> <Patch level="1">patches/mageia/3rd-acerhk-0.5.35.patch</Patch>
<Patch level="1">patches/mageia/3rd-acerhk-kbuild.patch</Patch> <Patch level="1">patches/mageia/3rd-acerhk-kbuild.patch</Patch>
@@ -181,9 +194,9 @@
<Patch level="1">patches/mageia/3rd-acerhk-fix-build-with-function-tracer.patch</Patch> <Patch level="1">patches/mageia/3rd-acerhk-fix-build-with-function-tracer.patch</Patch>
<Patch level="1">patches/mageia/3rd-acerhk-2.6.36-buildfix.patch</Patch> <Patch level="1">patches/mageia/3rd-acerhk-2.6.36-buildfix.patch</Patch>
<Patch level="1">patches/mageia/3rd-acerhk-fix-include.patch</Patch> <Patch level="1">patches/mageia/3rd-acerhk-fix-include.patch</Patch>
<!--Patch level="1">patches/mageia/3rd-aes2501-r19.patch</Patch> <Patch level="1">patches/mageia/3rd-aes2501-r19.patch</Patch>
<Patch level="1">patches/mageia/3rd-aes2501-kbuild.patch</Patch> <Patch level="1">patches/mageia/3rd-aes2501-kbuild.patch</Patch>
<Patch level="1">patches/mageia/3rd-aes2501-rmmod-oops-fix.patch</Patch--><!--aes2501 build error--> <Patch level="1">patches/mageia/3rd-aes2501-rmmod-oops-fix.patch</Patch><aes2501 build error>
<Patch level="1">patches/mageia/3rd-ndiswrapper-1.61.patch</Patch> <Patch level="1">patches/mageia/3rd-ndiswrapper-1.61.patch</Patch>
<Patch level="1">patches/mageia/3rd-ndiswrapper-Kconfig.patch</Patch> <Patch level="1">patches/mageia/3rd-ndiswrapper-Kconfig.patch</Patch>
<Patch level="1">patches/mageia/3rd-ndiswrapper-Makefile-build-fix.patch</Patch> <Patch level="1">patches/mageia/3rd-ndiswrapper-Makefile-build-fix.patch</Patch>
@@ -198,8 +211,9 @@
<Patch level="1">patches/mageia/3rd-viahss-2.6.35-buildfix.patch</Patch> <Patch level="1">patches/mageia/3rd-viahss-2.6.35-buildfix.patch</Patch>
<Patch level="1">patches/mageia/3rd-viahss-3.0-buildfix.patch</Patch> <Patch level="1">patches/mageia/3rd-viahss-3.0-buildfix.patch</Patch>
<Patch level="1">patches/mageia/3rd-rtl8812au.patch</Patch> <Patch level="1">patches/mageia/3rd-rtl8812au.patch</Patch>
<Patch level="1">patches/mageia/3rd-rtl8723de.patch</Patch> <Patch level="1">patches/mageia/3rd-rtl8723de.patch</Patch-->
<Patch level="1">patches/mageia/tools-testing-selftest-Makefile-remove-powerpc-reference.patch</Patch> <Patch level="1">patches/mageia/tools-testing-selftest-Makefile-remove-powerpc-reference.patch</Patch>
<Patch level="1">patches/mageia/arch-ARM-omap2-hide-omap3_save_secure_ram-on-non-OMAP3-bu.patch</Patch>
</Patches> </Patches>
</Source> </Source>
@@ -255,8 +269,8 @@
<History> <History>
<Update release="17"> <Update release="17">
<Date>2018-03-03</Date> <Date>2018-03-09</Date>
<Version>4.14.23</Version> <Version>4.14.24</Version>
<Comment>Version Bump.</Comment> <Comment>Version Bump.</Comment>
<Type package="kernel">security</Type> <Type package="kernel">security</Type>
<Requires> <Requires>