Thread (45 messages) 45 messages, 15 authors, 2025-04-26

Re: [PATCH v4 06/14] x86: Add support for suppressing warning backtraces

From: Peter Zijlstra <peterz@infradead.org>
Date: 2025-04-02 07:46:01
Also in: dri-devel, linux-arch, linux-arm-kernel, linux-doc, linux-kselftest, linux-riscv, linux-s390, linux-sh, lkml, loongarch

On Tue, Apr 01, 2025 at 10:53:46AM -0700, Guenter Roeck wrote:
quoted
quoted
  #define _BUG_FLAGS(ins, flags, extra)					\
  do {									\
  	asm_inline volatile("1:\t" ins "\n"				\
  		     ".pushsection __bug_table,\"aw\"\n"		\
  		     "2:\t" __BUG_REL(1b) "\t# bug_entry::bug_addr\n"	\
  		     "\t"  __BUG_REL(%c0) "\t# bug_entry::file\n"	\
-		     "\t.word %c1"        "\t# bug_entry::line\n"	\
-		     "\t.word %c2"        "\t# bug_entry::flags\n"	\
-		     "\t.org 2b+%c3\n"					\
+		     "\t"  __BUG_FUNC_PTR "\t# bug_entry::function\n"	\
+		     "\t.word %c2"        "\t# bug_entry::line\n"	\
+		     "\t.word %c3"        "\t# bug_entry::flags\n"	\
+		     "\t.org 2b+%c4\n"					\
  		     ".popsection\n"					\
  		     extra						\
-		     : : "i" (__FILE__), "i" (__LINE__),		\
+		     : : "i" (__FILE__), "i" (__BUG_FUNC), "i" (__LINE__),\
  			 "i" (flags),					\
  			 "i" (sizeof(struct bug_entry)));		\
  } while (0)
Also this, why do you need this extra function in the bug entry? Isn't
that trivial from the trap site itself? symbol information should be
able to get you the function from the trap ip.

None of this makes any sense.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help