From nobody Wed Feb 01 23:41:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P6djV5hPkz3cMS9; Wed, 1 Feb 2023 23:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P6djV53Cxz3NDL; Wed, 1 Feb 2023 23:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675294894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HtvqKzWVjGqHvlDbAsNHcLQrPQ0L7IkxIUPfm+Lq0II=; b=niem7KcZWmqoClftoJFVNVBDuK+CSQLZI6bV4EpeaMzU9a920BlNhLw2jbkyLepmt1ywJR EctfZgNaQY7WWVjF2m6q+JFSuv7SoyLWEH7H+rOkDupN3lljpyGhQRtx9kZszZNwkRd/I6 YMMCot8o9teobcE47FCF5vHhpEky86cFkQQDzO1Xfkq7c/1etSpTnWeTLuw4mZLnNBEpYg jhnrYDoR8QOoz1YILeL3HdcLPs05YFbc/+Jd0VV2fi0d8k+hq159WOd02QnJgKbMKt9Mda EtS2zXJeGMtZPI++p0FY8uJHJF+XX6TWwl9AyjcTyoTA7LZZu6f7B4w6ZbiwFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675294894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HtvqKzWVjGqHvlDbAsNHcLQrPQ0L7IkxIUPfm+Lq0II=; b=H4XhRQokvkCDntu4d/O3Sp6YAo73lWTSAGEgzzW9UY5pck9sRArEZi3+7ru+zOQ7zDxNEY Wj22s8qbrT4FCzqoZD9LvqfsRHdUGymCYenEGCDL+XTPjmWEnwnT6IR7Sauh07iT+ycMm2 Le0IHSvMWgMtDVhuMcoxMYCucWl5fgG1zT4E9FxSdNcO3+KXRovSlQsxvJlEtDCjJgCeoF jgZqwM+UhMYw2Klbme9T5Ag4U9f3w95fD36yaD65qyTPNkOZ88Qti4cSAzVEWVHT49YVk+ YVLJ0HYvk6hxFWqn70XSJC4uQmrybvE7YZiCCrmZZ2WYLg/PBZV9qSOIr6OcUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675294894; a=rsa-sha256; cv=none; b=H0CadybXADTZWcV8F/kqSqgCkiGUcS0sIEG3kMo9O8pX38RqFFdWiAOxqbyocWbnTiUqI+ TIvFVaKEevSArXy4N9u0sqFNHKWsJ3Qy6uYU7eCakzNJzVRHfNs/L/Y8zi+VIelAo/E8sC knqyoKIgri/hU8rBVY5eOkV8pDz6cB1yIC591K1nX05XhtO/3YsgZDyaJMIgXfNIFwlZMw dpMCXYcm3DWePW35L1Mp+E2yj8jaszgNVoZ+5FfE5ZuXx524uFt+VPtQAFC0uuwJrSGr6Y 8KQL2sHN2BxUta8vIDlJp7CTsvy5G3nnAobTi9GPrGRtC9QQDSbHTRxEJCXdSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P6djV48m7zYBR; Wed, 1 Feb 2023 23:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 311NfYcu088889; Wed, 1 Feb 2023 23:41:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 311NfYVS088888; Wed, 1 Feb 2023 23:41:34 GMT (envelope-from git) Date: Wed, 1 Feb 2023 23:41:34 GMT Message-Id: <202302012341.311NfYVS088888@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7c567fcc5650 - main - i386 kstack_contains(): account for pcb/fpu save area List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7c567fcc56508aa31ae58779e8633e25e8077acd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7c567fcc56508aa31ae58779e8633e25e8077acd commit 7c567fcc56508aa31ae58779e8633e25e8077acd Author: Konstantin Belousov AuthorDate: 2023-01-31 23:43:23 +0000 Commit: Konstantin Belousov 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_ */