Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Feb 2023 23:41:34 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 7c567fcc5650 - main - i386 kstack_contains(): account for pcb/fpu save area
Message-ID:  <202302012341.311NfYVS088888@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=7c567fcc56508aa31ae58779e8633e25e8077acd

commit 7c567fcc56508aa31ae58779e8633e25e8077acd
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-01-31 23:43:23 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-02-01 22:59:26 +0000

    i386 kstack_contains(): account for pcb/fpu save area
    
    Reviewed by:    jhb
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D38320
---
 sys/i386/include/stack.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/i386/include/stack.h b/sys/i386/include/stack.h
index 773aca1c66d9..3bc1e1a3997f 100644
--- a/sys/i386/include/stack.h
+++ b/sys/i386/include/stack.h
@@ -21,7 +21,7 @@ static __inline bool
 kstack_contains(struct thread *td, vm_offset_t va, size_t len)
 {
 	return (va >= td->td_kstack && va + len >= va &&
-	    va + len <= td->td_kstack + td->td_kstack_pages * PAGE_SIZE);
+	    va + len <= (vm_offset_t)get_pcb_td(td));
 }
 
 #endif	/* _SYS_PROC_H_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302012341.311NfYVS088888>