History log of /freebsd/sys/riscv/riscv/stack_machdep.c (Results 1 – 16 of 16)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# e24a6552 29-Jul-2024 Mark Johnston <markj@FreeBSD.org>

thread: Remove kernel stack swapping support, part 4

- Remove the IS_SWAPPED thread inhibitor state.
- Remove all uses of TD_IS_SWAPPED() in the kernel.
- Remove the TDF_CANSWAP flag.
- Remove the P

thread: Remove kernel stack swapping support, part 4

- Remove the IS_SWAPPED thread inhibitor state.
- Remove all uses of TD_IS_SWAPPED() in the kernel.
- Remove the TDF_CANSWAP flag.
- Remove the P_SWAPPINGOUT and P_SWAPPINGIN flags.

Tested by: pho
Reviewed by: alc, imp, kib
Differential Revision: https://reviews.freebsd.org/D46115

show more ...


Revision tags: release/14.1.0, release/13.3.0
# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remov

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


Revision tags: release/14.0.0
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0
# 9b9e7f4c 08-Dec-2020 John Baldwin <jhb@FreeBSD.org>

Stack unwinding robustness fixes for RISC-V.

- Push the kstack_contains check down into unwind_frame() so that it
is honored by DDB and DTrace.

- Check that the trapframe for an exception frame i

Stack unwinding robustness fixes for RISC-V.

- Push the kstack_contains check down into unwind_frame() so that it
is honored by DDB and DTrace.

- Check that the trapframe for an exception frame is contained in the
traced thread's kernel stack for DDB traces.

Reviewed by: markj
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D27357

show more ...


# 5941edfc 01-Dec-2020 John Baldwin <jhb@FreeBSD.org>

Add a kstack_contains() helper function.

This is useful for stack unwinders which need to avoid out-of-bounds
reads of a kernel stack which can trigger kernel faults.

Reviewed by: kib, markj
Obtain

Add a kstack_contains() helper function.

This is useful for stack unwinders which need to avoid out-of-bounds
reads of a kernel stack which can trigger kernel faults.

Reviewed by: kib, markj
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D27356

show more ...


Revision tags: release/12.2.0
# e2515283 27-Aug-2020 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: Rubicon Communications, LLC (netgate.com)


# de6fc2e3 15-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r364082 through r364250.


# 40db51b4 12-Aug-2020 John Baldwin <jhb@FreeBSD.org>

Check that the frame pointer is within the current stack.

This same check is used on other architectures. Previously this would
permit a stack frame to unwind into any arbitrary kernel address
(inc

Check that the frame pointer is within the current stack.

This same check is used on other architectures. Previously this would
permit a stack frame to unwind into any arbitrary kernel address
(including unmapped addresses).

Reviewed by: mhorne
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25996

show more ...


# 367de39e 12-Aug-2020 John Baldwin <jhb@FreeBSD.org>

Use uintptr_t instead of uint64_t for pointers in stack frames.

Reviewed by: mhorne
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25995


Revision tags: release/11.4.0
# 59abbffa 31-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r357270 through r357349.


# 1c29da02 31-Jan-2020 Mark Johnston <markj@FreeBSD.org>

Reimplement stack capture of running threads on i386 and amd64.

After r355784 the td_oncpu field is no longer synchronized by the thread
lock, so the stack capture interrupt cannot be delievered pre

Reimplement stack capture of running threads on i386 and amd64.

After r355784 the td_oncpu field is no longer synchronized by the thread
lock, so the stack capture interrupt cannot be delievered precisely.
Fix this using a loop which drops the thread lock and restarts if the
wrong thread was sampled from the stack capture interrupt handler.

Change the implementation to use a regular interrupt instead of an NMI.
Now that we drop the thread lock, there is no advantage to the latter.

Simplify the KPIs. Remove stack_save_td_running() and add a return
value to stack_save_td(). On platforms that do not support stack
capture of running threads, stack_save_td() returns EOPNOTSUPP. If the
target thread is running in user mode, stack_save_td() returns EBUSY.

Reviewed by: kib
Reported by: mjg, pho
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23355

show more ...


Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0
# 7d536dc8 10-Mar-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


# d52d6d7c 10-Mar-2016 Ruslan Bukin <br@FreeBSD.org>

Add support for ddb(4).

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5


# 86b234d2 23-Feb-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


# 76f38317 22-Feb-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r295845 through r295901.


# 0b7bfc0b 22-Feb-2016 Ruslan Bukin <br@FreeBSD.org>

Provide stack(9) MD stubs for RISC-V so ktr(9) can be compiled in.