]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jan 2018 14:26:13 +0000 (15:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jan 2018 14:26:13 +0000 (15:26 +0100)
added patches:
um-link-vmlinux-with-no-pie.patch
um-remove-copy-paste-code-from-init.h.patch
um-stop-abusing-__kernel__.patch

queue-3.18/input-do-not-emit-unneeded-ev_syn-when-suspending.patch
queue-3.18/series
queue-3.18/um-link-vmlinux-with-no-pie.patch [new file with mode: 0644]
queue-3.18/um-remove-copy-paste-code-from-init.h.patch [new file with mode: 0644]
queue-3.18/um-stop-abusing-__kernel__.patch [new file with mode: 0644]

index 13dae5ae8633522553aa7c11cf104ae7fa98e844..f69cd1fbaec9d25a0c4b217df57ea5fc9d1b36f9 100644 (file)
@@ -16,11 +16,13 @@ Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
 Signed-off-by: Bo Hu <bohu@google.com>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
-diff --git a/drivers/input/input.c b/drivers/input/input.c
-index 78d24990a816..5391abd28b27 100644
+---
+ drivers/input/input.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
 --- a/drivers/input/input.c
 +++ b/drivers/input/input.c
-@@ -674,13 +674,19 @@ EXPORT_SYMBOL(input_close_device);
+@@ -668,6 +668,7 @@ EXPORT_SYMBOL(input_close_device);
   */
  static void input_dev_release_keys(struct input_dev *dev)
  {
@@ -28,17 +30,16 @@ index 78d24990a816..5391abd28b27 100644
        int code;
  
        if (is_event_supported(EV_KEY, dev->evbit, EV_MAX)) {
--              for_each_set_bit(code, dev->key, KEY_CNT)
-+              for_each_set_bit(code, dev->key, KEY_CNT) {
-                       input_pass_event(dev, EV_KEY, code, 0);
-+                      need_sync = true;
-+              }
-+
+@@ -675,9 +676,11 @@ static void input_dev_release_keys(struc
+                       if (is_event_supported(code, dev->keybit, KEY_MAX) &&
+                           __test_and_clear_bit(code, dev->key)) {
+                               input_pass_event(dev, EV_KEY, code, 0);
++                              need_sync = true;
+                       }
+               }
+-              input_pass_event(dev, EV_SYN, SYN_REPORT, 1);
 +              if (need_sync)
 +                      input_pass_event(dev, EV_SYN, SYN_REPORT, 1);
-+
-               memset(dev->key, 0, sizeof(dev->key));
--              input_pass_event(dev, EV_SYN, SYN_REPORT, 1);
        }
  }
  
index 4532d9dd3f15b01483d2cefde00cb3fe5e8e37ad..3cf39b7e56974c5d3c4cdb4469106a9642cae297 100644 (file)
@@ -1 +1,4 @@
 input-do-not-emit-unneeded-ev_syn-when-suspending.patch
+um-link-vmlinux-with-no-pie.patch
+um-stop-abusing-__kernel__.patch
+um-remove-copy-paste-code-from-init.h.patch
diff --git a/queue-3.18/um-link-vmlinux-with-no-pie.patch b/queue-3.18/um-link-vmlinux-with-no-pie.patch
new file mode 100644 (file)
index 0000000..2266a00
--- /dev/null
@@ -0,0 +1,32 @@
+From 883354afbc109c57f925ccc19840055193da0cc0 Mon Sep 17 00:00:00 2001
+From: Thomas Meyer <thomas@m3y3r.de>
+Date: Sun, 20 Aug 2017 13:26:04 +0200
+Subject: um: link vmlinux with -no-pie
+
+From: Thomas Meyer <thomas@m3y3r.de>
+
+commit 883354afbc109c57f925ccc19840055193da0cc0 upstream.
+
+Debian's gcc defaults to pie. The global Makefile already defines the -fno-pie option.
+Link UML dynamic kernel image also with -no-pie to fix the build.
+
+Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Cc: Bernie Innocenti <codewiz@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/um/Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/um/Makefile
++++ b/arch/um/Makefile
+@@ -116,7 +116,7 @@ archheaders:
+ archprepare: include/generated/user_constants.h
+ LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
+-LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib
++LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib $(call cc-option, -no-pie)
+ CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) \
+       $(call cc-option, -fno-stack-protector,) \
diff --git a/queue-3.18/um-remove-copy-paste-code-from-init.h.patch b/queue-3.18/um-remove-copy-paste-code-from-init.h.patch
new file mode 100644 (file)
index 0000000..684517f
--- /dev/null
@@ -0,0 +1,56 @@
+From 30b11ee9ae23d78de66b9ae315880af17a64ba83 Mon Sep 17 00:00:00 2001
+From: Richard Weinberger <richard@nod.at>
+Date: Sun, 31 May 2015 22:15:58 +0200
+Subject: um: Remove copy&paste code from init.h
+
+From: Richard Weinberger <richard@nod.at>
+
+commit 30b11ee9ae23d78de66b9ae315880af17a64ba83 upstream.
+
+As we got rid of the __KERNEL__ abuse, we can directly
+include linux/compiler.h now.
+This also allows gcc 5 to build UML.
+
+Reported-by: Hans-Werner Hilse <hwhilse@gmail.com>
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Cc: Greg Hackmann <ghackmann@google.com>
+Cc: Bernie Innocenti <codewiz@google.com>
+Cc: Lorenzo Colitti <lorenzo@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/um/include/shared/init.h |   22 +---------------------
+ 1 file changed, 1 insertion(+), 21 deletions(-)
+
+--- a/arch/um/include/shared/init.h
++++ b/arch/um/include/shared/init.h
+@@ -40,28 +40,8 @@
+ typedef int (*initcall_t)(void);
+ typedef void (*exitcall_t)(void);
+-#ifdef __UM_HOST__
+-#ifndef __section
+-# define __section(S) __attribute__ ((__section__(#S)))
+-#endif
+-
+-#if __GNUC__ == 3
+-
+-#if __GNUC_MINOR__ >= 3
+-# define __used                       __attribute__((__used__))
+-#else
+-# define __used                       __attribute__((__unused__))
+-#endif
+-
+-#else
+-#if __GNUC__ == 4
+-# define __used                       __attribute__((__used__))
+-#endif
+-#endif
+-
+-#else
+ #include <linux/compiler.h>
+-#endif
++
+ /* These are for everybody (although not all archs will actually
+    discard it in modules) */
+ #define __init                __section(.init.text)
diff --git a/queue-3.18/um-stop-abusing-__kernel__.patch b/queue-3.18/um-stop-abusing-__kernel__.patch
new file mode 100644 (file)
index 0000000..94abd48
--- /dev/null
@@ -0,0 +1,110 @@
+From 298e20ba8c197e8d429a6c8671550c41c7919033 Mon Sep 17 00:00:00 2001
+From: Richard Weinberger <richard@nod.at>
+Date: Sun, 31 May 2015 19:50:57 +0200
+Subject: um: Stop abusing __KERNEL__
+
+From: Richard Weinberger <richard@nod.at>
+
+commit 298e20ba8c197e8d429a6c8671550c41c7919033 upstream.
+
+Currently UML is abusing __KERNEL__ to distinguish between
+kernel and host code (os-Linux). It is better to use a custom
+define such that existing users of __KERNEL__ don't get confused.
+
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Cc: Greg Hackmann <ghackmann@google.com>
+Cc: Bernie Innocenti <codewiz@google.com>
+Cc: Lorenzo Colitti <lorenzo@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/um/Makefile                |    7 ++++---
+ arch/um/drivers/mconsole.h      |    2 +-
+ arch/um/include/shared/init.h   |    4 ++--
+ arch/um/include/shared/user.h   |    2 +-
+ arch/x86/um/shared/sysdep/tls.h |    6 +++---
+ 5 files changed, 11 insertions(+), 10 deletions(-)
+
+--- a/arch/um/Makefile
++++ b/arch/um/Makefile
+@@ -68,9 +68,10 @@ KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -
+ KBUILD_AFLAGS += $(ARCH_INCLUDE)
+-USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\
+-      $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
+-      $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64 -idirafter include
++USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \
++              $(ARCH_INCLUDE) $(MODE_INCLUDE) $(filter -I%,$(CFLAGS)) \
++              -D_FILE_OFFSET_BITS=64 -idirafter include \
++              -D__KERNEL__ -D__UM_HOST__
+ #This will adjust *FLAGS accordingly to the platform.
+ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
+--- a/arch/um/drivers/mconsole.h
++++ b/arch/um/drivers/mconsole.h
+@@ -7,7 +7,7 @@
+ #ifndef __MCONSOLE_H__
+ #define __MCONSOLE_H__
+-#ifndef __KERNEL__
++#ifdef __UM_HOST__
+ #include <stdint.h>
+ #define u32 uint32_t
+ #endif
+--- a/arch/um/include/shared/init.h
++++ b/arch/um/include/shared/init.h
+@@ -40,7 +40,7 @@
+ typedef int (*initcall_t)(void);
+ typedef void (*exitcall_t)(void);
+-#ifndef __KERNEL__
++#ifdef __UM_HOST__
+ #ifndef __section
+ # define __section(S) __attribute__ ((__section__(#S)))
+ #endif
+@@ -131,7 +131,7 @@ extern struct uml_param __uml_setup_star
+ #define __uml_postsetup_call  __used __section(.uml.postsetup.init)
+ #define __uml_exit_call               __used __section(.uml.exitcall.exit)
+-#ifndef __KERNEL__
++#ifdef __UM_HOST__
+ #define __define_initcall(level,fn) \
+       static initcall_t __initcall_##fn __used \
+--- a/arch/um/include/shared/user.h
++++ b/arch/um/include/shared/user.h
+@@ -17,7 +17,7 @@
+ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+ /* This is to get size_t */
+-#ifdef __KERNEL__
++#ifndef __UM_HOST__
+ #include <linux/types.h>
+ #else
+ #include <stddef.h>
+--- a/arch/x86/um/shared/sysdep/tls.h
++++ b/arch/x86/um/shared/sysdep/tls.h
+@@ -1,7 +1,7 @@
+ #ifndef _SYSDEP_TLS_H
+ #define _SYSDEP_TLS_H
+-# ifndef __KERNEL__
++#ifdef __UM_HOST__
+ /* Change name to avoid conflicts with the original one from <asm/ldt.h>, which
+  * may be named user_desc (but in 2.4 and in header matching its API was named
+@@ -22,11 +22,11 @@ typedef struct um_dup_user_desc {
+ #endif
+ } user_desc_t;
+-# else /* __KERNEL__ */
++#else /* __UM_HOST__ */
+ typedef struct user_desc user_desc_t;
+-# endif /* __KERNEL__ */
++#endif /* __UM_HOST__ */
+ extern int os_set_thread_area(user_desc_t *info, int pid);
+ extern int os_get_thread_area(user_desc_t *info, int pid);