~ilasc/ubuntu/+source/linux/+git/xenial:master

Last commit made on 2021-02-19
Get this branch:
git clone -b master https://git.launchpad.net/~ilasc/ubuntu/+source/linux/+git/xenial
Only Ioana Lasc can upload to this branch. If you are Ioana Lasc please log in for upload directions.

Branch merges

Branch information

Recent commits

88ac542... by Stefan Bader

UBUNTU: Ubuntu-4.4.0-204.236

Signed-off-by: Stefan Bader <email address hidden>

d9e4489... by Stefan Bader

UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1916222
Properties: no-test-build
Signed-off-by: Stefan Bader <email address hidden>

c8c60dc... by Kamal Mostafa

UBUNTU: [Packaging] dkms-build: fix wireguard build logging

The dkms-build script (<=bionic) fails to find and display the dkms
build log for some dkms component(s), e.g. wireguard.

Add the missing path and logic matching >=focal's version of the script.

Ignore: yes
Signed-off-by: Kamal Mostafa <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Tim Gardner <email address hidden>
Signed-off-by: William Breathitt Gray <email address hidden>

4ec60ff... by Kamal Mostafa

UBUNTU: upstream stable to v4.4.254

BugLink: https://bugs.launchpad.net/bugs/1914648

Ignore: yes
Signed-off-by: Kamal Mostafa <email address hidden>
Signed-off-by: William Breathitt Gray <email address hidden>

ebc18f4... by Greg Kroah-Hartman <email address hidden>

Linux 4.4.254

BugLink: https://bugs.launchpad.net/bugs/1914648

Tested-by: Pavel Machek (CIP) <email address hidden>
Tested-by: Linux Kernel Functional Testing <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
Signed-off-by: William Breathitt Gray <email address hidden>

20fb47c... by Arvind Sankar <email address hidden>

x86/boot/compressed: Disable relocation relaxation

BugLink: https://bugs.launchpad.net/bugs/1914648

commit 09e43968db40c33a73e9ddbfd937f46d5c334924 upstream.

The x86-64 psABI [0] specifies special relocation types
(R_X86_64_[REX_]GOTPCRELX) for indirection through the Global Offset
Table, semantically equivalent to R_X86_64_GOTPCREL, which the linker
can take advantage of for optimization (relaxation) at link time. This
is supported by LLD and binutils versions 2.26 onwards.

The compressed kernel is position-independent code, however, when using
LLD or binutils versions before 2.27, it must be linked without the -pie
option. In this case, the linker may optimize certain instructions into
a non-position-independent form, by converting foo@GOTPCREL(%rip) to $foo.

This potential issue has been present with LLD and binutils-2.26 for a
long time, but it has never manifested itself before now:

- LLD and binutils-2.26 only relax
 movq foo@GOTPCREL(%rip), %reg
  to
 leaq foo(%rip), %reg
  which is still position-independent, rather than
 mov $foo, %reg
  which is permitted by the psABI when -pie is not enabled.

- GCC happens to only generate GOTPCREL relocations on mov instructions.

- CLang does generate GOTPCREL relocations on non-mov instructions, but
  when building the compressed kernel, it uses its integrated assembler
  (due to the redefinition of KBUILD_CFLAGS dropping -no-integrated-as),
  which has so far defaulted to not generating the GOTPCRELX
  relocations.

Nick Desaulniers reports [1,2]:

  "A recent change [3] to a default value of configuration variable
   (ENABLE_X86_RELAX_RELOCATIONS OFF -> ON) in LLVM now causes Clang's
   integrated assembler to emit R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX
   relocations. LLD will relax instructions with these relocations based
   on whether the image is being linked as position independent or not.
   When not, then LLD will relax these instructions to use absolute
   addressing mode (R_RELAX_GOT_PC_NOPIC). This causes kernels built with
   Clang and linked with LLD to fail to boot."

Patch series [4] is a solution to allow the compressed kernel to be
linked with -pie unconditionally, but even if merged is unlikely to be
backported. As a simple solution that can be applied to stable as well,
prevent the assembler from generating the relaxed relocation types using
the -mrelax-relocations=no option. For ease of backporting, do this
unconditionally.

[0] https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/linker-optimization.tex#L65
[1] https://<email address hidden>/
[2] https://github.com/ClangBuiltLinux/linux/issues/1121
[3] https://reviews.llvm.org/rGc41a18cf61790fc898dcda1055c3efbf442c14c0
[4] https://<email address hidden>/

Reported-by: Nick Desaulniers <email address hidden>
Signed-off-by: Arvind Sankar <email address hidden>
Signed-off-by: Ingo Molnar <email address hidden>
Tested-by: Nick Desaulniers <email address hidden>
Tested-by: Sedat Dilek <email address hidden>
Acked-by: Ard Biesheuvel <email address hidden>
Reviewed-by: Nick Desaulniers <email address hidden>
Cc: <email address hidden>
Link: https://<email address hidden>
[nc: Backport to 4.4]
Signed-off-by: Nathan Chancellor <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
Signed-off-by: William Breathitt Gray <email address hidden>

82a366a... by Pawel Wieczorkiewicz <email address hidden>

xen-blkback: set ring->xenblkd to NULL after kthread_stop()

BugLink: https://bugs.launchpad.net/bugs/1914648

commit 1c728719a4da6e654afb9cc047164755072ed7c9 upstream.

When xen_blkif_disconnect() is called, the kernel thread behind the
block interface is stopped by calling kthread_stop(ring->xenblkd).
The ring->xenblkd thread pointer being non-NULL determines if the
thread has been already stopped.
Normally, the thread's function xen_blkif_schedule() sets the
ring->xenblkd to NULL, when the thread's main loop ends.

However, when the thread has not been started yet (i.e.
wake_up_process() has not been called on it), the xen_blkif_schedule()
function would not be called yet.

In such case the kthread_stop() call returns -EINTR and the
ring->xenblkd remains dangling.
When this happens, any consecutive call to xen_blkif_disconnect (for
example in frontend_changed() callback) leads to a kernel crash in
kthread_stop() (e.g. NULL pointer dereference in exit_creds()).

This is XSA-350.

Cc: <email address hidden> # 4.12
Fixes: a24fa22ce22a ("xen/blkback: don't use xen_blkif_get() in xen-blkback kthread")
Reported-by: Olivier Benjamin <email address hidden>
Reported-by: Pawel Wieczorkiewicz <email address hidden>
Signed-off-by: Pawel Wieczorkiewicz <email address hidden>
Reviewed-by: Julien Grall <email address hidden>
Reviewed-by: Juergen Gross <email address hidden>
Signed-off-by: Juergen Gross <email address hidden>
[iwamatsu: change from ring to blkif]
Signed-off-by: Nobuhiro Iwamatsu <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
Signed-off-by: William Breathitt Gray <email address hidden>

0a3fcad... by Gaurav Kohli <email address hidden>

tracing: Fix race in trace_open and buffer resize call

BugLink: https://bugs.launchpad.net/bugs/1914648

commit bbeb97464eefc65f506084fd9f18f21653e01137 upstream.

Below race can come, if trace_open and resize of
cpu buffer is running parallely on different cpus
CPUX CPUY
        ring_buffer_resize
        atomic_read(&buffer->resize_disabled)
tracing_open
tracing_reset_online_cpus
ring_buffer_reset_cpu
rb_reset_cpu
        rb_update_pages
        remove/insert pages
resetting pointer

This race can cause data abort or some times infinte loop in
rb_remove_pages and rb_insert_pages while checking pages
for sanity.

Take buffer lock to fix this.

Link: https://<email address hidden>

Cc: <email address hidden>
Fixes: 83f40318dab00 ("ring-buffer: Make removal of ring buffer pages atomic")
Reported-by: Denis Efremov <email address hidden>
Signed-off-by: Gaurav Kohli <email address hidden>
Signed-off-by: Steven Rostedt (VMware) <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
Signed-off-by: William Breathitt Gray <email address hidden>

7363801... by Wang Hai <email address hidden>

Revert "mm/slub: fix a memory leak in sysfs_slab_add()"

BugLink: https://bugs.launchpad.net/bugs/1914648

commit 757fed1d0898b893d7daa84183947c70f27632f3 upstream.

This reverts commit dde3c6b72a16c2db826f54b2d49bdea26c3534a2.

syzbot report a double-free bug. The following case can cause this bug.

 - mm/slab_common.c: create_cache(): if the __kmem_cache_create() fails,
   it does:

 out_free_cache:
  kmem_cache_free(kmem_cache, s);

 - but __kmem_cache_create() - at least for slub() - will have done

 sysfs_slab_add(s)
  -> sysfs_create_group() .. fails ..
  -> kobject_del(&s->kobj); .. which frees s ...

We can't remove the kmem_cache_free() in create_cache(), because other
error cases of __kmem_cache_create() do not free this.

So, revert the commit dde3c6b72a16 ("mm/slub: fix a memory leak in
sysfs_slab_add()") to fix this.

Reported-by: <email address hidden>
Fixes: dde3c6b72a16 ("mm/slub: fix a memory leak in sysfs_slab_add()")
Acked-by: Vlastimil Babka <email address hidden>
Signed-off-by: Wang Hai <email address hidden>
Cc: <email address hidden>
Signed-off-by: Linus Torvalds <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
Signed-off-by: William Breathitt Gray <email address hidden>

ee40832... by Eric Dumazet <email address hidden>

net_sched: avoid shift-out-of-bounds in tcindex_set_parms()

BugLink: https://bugs.launchpad.net/bugs/1914648

commit bcd0cf19ef8258ac31b9a20248b05c15a1f4b4b0 upstream.

tc_index being 16bit wide, we need to check that TCA_TCINDEX_SHIFT
attribute is not silly.

UBSAN: shift-out-of-bounds in net/sched/cls_tcindex.c:260:29
shift exponent 255 is too large for 32-bit type 'int'
CPU: 0 PID: 8516 Comm: syz-executor228 Not tainted 5.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x107/0x163 lib/dump_stack.c:120
 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148
 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395
 valid_perfect_hash net/sched/cls_tcindex.c:260 [inline]
 tcindex_set_parms.cold+0x1b/0x215 net/sched/cls_tcindex.c:425
 tcindex_change+0x232/0x340 net/sched/cls_tcindex.c:546
 tc_new_tfilter+0x13fb/0x21b0 net/sched/cls_api.c:2127
 rtnetlink_rcv_msg+0x8b6/0xb80 net/core/rtnetlink.c:5555
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494
 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330
 netlink_sendmsg+0x907/0xe40 net/netlink/af_netlink.c:1919
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:672
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2336
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2390
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2423
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <email address hidden>
Reported-by: syzbot <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
Signed-off-by: William Breathitt Gray <email address hidden>