Thread (42 messages) 42 messages, 11 authors, 2021-05-25

Re: [PATCH] io_thread/x86: don't reset 'cs', 'ss', 'ds' and 'es' registers for io_threads

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2021-05-03 23:48:30
Also in: lkml

Possibly related (same subject, not in this thread)

On Mon, May 3, 2021 at 4:27 PM Stefan Metzmacher [off-list ref] wrote:
If I remember correctly gdb showed bogus addresses for the backtraces of the io_threads,
as some regs where not cleared.
Yeah, so that patch will make the IO thread have the user stack
pointer point to the original user stack, but that stack will
obviously be used by the original thread which means that it will
contain random stuff on it.

Doing a

        childregs->sp = 0;

is probably a good idea for that PF_IO_WORKER case, since it really
doesn't have - or need - a user stack.

Of course, it doesn't really have - or need - any of the other user
registers either, but once you fill in the segment stuff to make gdb
happy, you might as well fill it all in using the same code that the
regular case does.

          Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help