Thread (3 messages) 3 messages, 3 authors, 2021-06-16

Re: [PATCH 1/2] alpha/ptrace: Record and handle the absence of switch_stack

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2021-06-16 21:13:30
Also in: linux-arch, linux-m68k, lkml

Possibly related (same subject, not in this thread)

On Wed, Jun 16, 2021 at 1:57 PM Eric W. Biederman [off-list ref] wrote:
Do you know if struct switch_stack or pt_regs is ever exposeed to
usespace?  They are both defined in arch/alpha/include/uapi/asm/ptrace.h
which makes me think userspace must see those definitions somewhere.
Yeah, that uapi location is a bit unfortunate. It means that user
space _could_ have seen it.

Which probably means that some user space uses it. Not for any kernel
interfaces (the alpha ptrace register offsets are actually sane, and
we have that "regoff[]" array to find them) - but I could see some odd
program having decided to use the kernel pt_regs and switch_stack
structures for their own reasons.

Annoying. Because we don't really expose it as-is in any way, afaik.
Only incidentally - and by mistake - in a uapi header file.

Maybe a flag in thread_info->status (or even a new 32-bit field
entirely in thread_info) is the way to go like Al says.

            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