Commit 01f95500 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'uml-for-linux-6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux

Pull uml fix from Johannes Berg:
 "There's just a single fix here for the _nofault changes that were
  causing issues with clang, and then when we looked at it some other
  issues seemed to exist"

* tag 'uml-for-linux-6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux:
  um: fix _nofault accesses
parents 7b26feb4 68025adf
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ do { \
		goto err_label;						\
	}								\
	*((type *)dst) = get_unaligned((type *)(src));			\
	barrier();							\
	current->thread.segv_continue = NULL;				\
} while (0)

@@ -66,6 +67,7 @@ do { \
	if (__faulted)							\
		goto err_label;						\
	put_unaligned(*((type *)src), (type *)(dst));			\
	barrier();							\
	current->thread.segv_continue = NULL;				\
} while (0)

+13 −13
Original line number Diff line number Diff line
@@ -225,8 +225,7 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user,
			panic("Failed to sync kernel TLBs: %d", err);
		goto out;
	}
	else if (current->mm == NULL) {
		if (current->pagefault_disabled) {
	else if (current->pagefault_disabled) {
		if (!mc) {
			show_regs(container_of(regs, struct pt_regs, regs));
			panic("Segfault with pagefaults disabled but no mcontext");
@@ -239,6 +238,7 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user,
		current->thread.segv_continue = NULL;
		goto out;
	}
	else if (current->mm == NULL) {
		show_regs(container_of(regs, struct pt_regs, regs));
		panic("Segfault with no mm");
	}
+1 −1
Original line number Diff line number Diff line
@@ -31,8 +31,8 @@ struct faultinfo {

#define ___backtrack_faulted(_faulted)					\
	asm volatile (							\
		"mov $0, %0\n"						\
		"movl $__get_kernel_nofault_faulted_%=,%1\n"		\
		"mov $0, %0\n"						\
		"jmp _end_%=\n"						\
		"__get_kernel_nofault_faulted_%=:\n"			\
		"mov $1, %0;"						\
+1 −1
Original line number Diff line number Diff line
@@ -31,8 +31,8 @@ struct faultinfo {

#define ___backtrack_faulted(_faulted)					\
	asm volatile (							\
		"mov $0, %0\n"						\
		"movq $__get_kernel_nofault_faulted_%=,%1\n"		\
		"mov $0, %0\n"						\
		"jmp _end_%=\n"						\
		"__get_kernel_nofault_faulted_%=:\n"			\
		"mov $1, %0;"						\