NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/59327 CVS commit: src/tests/kernel



The following reply was made to PR kern/59327; it has been noted by GNATS.

From: "Taylor R Campbell" <riastradh%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/59327 CVS commit: src/tests/kernel
Date: Thu, 24 Apr 2025 17:00:25 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Thu Apr 24 17:00:25 UTC 2025
 
 Modified Files:
 	src/tests/kernel: t_signal_and_sp.c
 
 Log Message:
 t_signal_and_sp: contextsplink test may not be broken on n64.
 
 n32 and n64 have the same stack alignment requirement (16-byte), so
 if there were a problem it would probably manifest on n32 too.  But
 the only things that __resumecontext does with a misaligned sp are:
 
 1. syscall getcontext (not even via the syscall stub, but via the
    syscall instruction directly), which is unlikely to care; and
 
 2. tail-call setcontext, which does a syscall (again, unlikely to
    care) that will discard the caller's sp and replace it altogether.
 
 So I'm not sure we can even test potential adverse consequences of
 misalignment inside __resumecontext, short of interposing our own
 setcontext symbol to artificially verify its stack alignment before
 passing on to the syscall -- which, while feasible, is maybe not
 worth the effort.
 
 PR kern/59327: user stack pointer is not aligned properly
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.11 -r1.12 src/tests/kernel/t_signal_and_sp.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index