Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d4d1984 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'tip_x86_kernel' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp into x86/debug



Pull x86 debugging updates from Borislav Petkov:

 "Two small fixes to the stack dumper, a cleanup and sustaining the
  previous log level after a newline. (Adrien Schildknecht)"

Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 023a6007 04769ae3
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -25,10 +25,12 @@ unsigned int code_bytes = 64;
int kstack_depth_to_print = 3 * STACKSLOTS_PER_LINE;
static int die_counter;

static void printk_stack_address(unsigned long address, int reliable)
static void printk_stack_address(unsigned long address, int reliable,
		void *data)
{
	pr_cont(" [<%p>] %s%pB\n",
		(void *)address, reliable ? "" : "? ", (void *)address);
	printk("%s [<%p>] %s%pB\n",
		(char *)data, (void *)address, reliable ? "" : "? ",
		(void *)address);
}

void printk_address(unsigned long address)
@@ -155,8 +157,7 @@ static int print_trace_stack(void *data, char *name)
static void print_trace_address(void *data, unsigned long addr, int reliable)
{
	touch_nmi_watchdog();
	printk(data);
	printk_stack_address(addr, reliable);
	printk_stack_address(addr, reliable, data);
}

static const struct stacktrace_ops print_trace_ops = {
+6 −3
Original line number Diff line number Diff line
@@ -108,8 +108,11 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
	for (i = 0; i < kstack_depth_to_print; i++) {
		if (kstack_end(stack))
			break;
		if (i && ((i % STACKSLOTS_PER_LINE) == 0))
		if ((i % STACKSLOTS_PER_LINE) == 0) {
			if (i != 0)
				pr_cont("\n");
			printk("%s %08lx", log_lvl, *stack++);
		} else
			pr_cont(" %08lx", *stack++);
		touch_nmi_watchdog();
	}
+7 −4
Original line number Diff line number Diff line
@@ -280,11 +280,14 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
				pr_cont(" <EOI> ");
			}
		} else {
		if (((long) stack & (THREAD_SIZE-1)) == 0)
		if (kstack_end(stack))
			break;
		}
		if (i && ((i % STACKSLOTS_PER_LINE) == 0))
		if ((i % STACKSLOTS_PER_LINE) == 0) {
			if (i != 0)
				pr_cont("\n");
			printk("%s %016lx", log_lvl, *stack++);
		} else
			pr_cont(" %016lx", *stack++);
		touch_nmi_watchdog();
	}