The NetBSD Project

CVS log for src/tests/kernel/h_segv.c

[BACK] Up to [cvs.NetBSD.org] / src / tests / kernel

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.14 / (download) - annotate - [select for diffs], Thu Apr 25 19:37:09 2019 UTC (18 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp, HEAD
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

Fix typo

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jan 30 12:16:28 2019 UTC (21 months ago) by martin
Branch: MAIN
Changes since 1.12: +5 -5 lines
Diff to previous 1.12 (colored)

Clean up terminology: modern arm CPUs do properly implement IEEE 754
floating point exceptions - but some (actually all currently know ones)
do not implement sending traps when these exceptions are raised.

Pointed out by Peter Maydell.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jan 27 16:29:56 2019 UTC (21 months ago) by christos
Branch: MAIN
Changes since 1.11: +4 -2 lines
Diff to previous 1.11 (colored)

vaxinate against ieeefp.h

Revision 1.11 / (download) - annotate - [select for diffs], Sat Jan 26 16:44:30 2019 UTC (21 months ago) by martin
Branch: MAIN
CVS Tags: pgoyette-compat-20190127
Changes since 1.10: +31 -4 lines
Diff to previous 1.10 (colored)

Some arm CPUs do not implement traps on floating point exceptions.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Nov 12 05:02:00 2018 UTC (23 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126
Changes since 1.9: +6 -2 lines
Diff to previous 1.9 (colored)

Make fenv.h optional for this test to unbreak the vax build.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Nov 11 01:26:08 2018 UTC (23 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.8: +8 -5 lines
Diff to previous 1.8 (colored)

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Nov 11 01:26:00 2018 UTC (23 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.7: +6 -5 lines
Diff to previous 1.7 (colored)

Sort #includes.

Revision 1.7 / (download) - annotate - [select for diffs], Wed May 30 17:48:13 2018 UTC (2 years, 5 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.6: +8 -3 lines
Diff to previous 1.6 (colored)

Add a comment for the workaround in trigger_bus()

Explain PROT_READ|PROT_WRITE.

Revision 1.6 / (download) - annotate - [select for diffs], Wed May 30 17:31:34 2018 UTC (2 years, 5 months ago) by kamil
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Make the trigger_bus() test compatible with more CPUs (at least ALPHA)

If we write a byte character into a pointer, a compiler can emit a
read-modify-write operation, especially when a CPU cannot access directly
a character wide address.

In this scenario calling mmap(2) with PROT_WRITE, without PROT_READ will
emit unexpected trap.

There are two possible workarounds for this issue:
 - write register wide memory without rmw sequence,
 - mark the region with additional protection PROT_READ

Both work for NetBSD/alpha.

Go for the latter as perhaps more safe for dump compilers emitting rmw
sequences.

Investigated by <martin>

Revision 1.5 / (download) - annotate - [select for diffs], Sun May 27 17:04:45 2018 UTC (2 years, 5 months ago) by kamil
Branch: MAIN
Changes since 1.4: +112 -33 lines
Diff to previous 1.4 (colored)

Handle FPE and BUS scenarios in the ATF t_trapsignal tests

These crash signals are crucial for proper handling of abnormal conditions
in a program. The additional purpose of these tests it to assure the proper
handling of these signals for the coming ptrace(2)-related changes in the
signal routing code.

Add a stub for ILL scenarios.

All tests pass (on amd64).

The shell ATF script contains duplicated code. There should be a way to
deduplicate it, without rewrite to C.

Sponsored by <The NetBSD Foundation>

Revision 1.4 / (download) - annotate - [select for diffs], Tue May 22 04:32:56 2018 UTC (2 years, 5 months ago) by kamil
Branch: MAIN
Changes since 1.3: +46 -11 lines
Diff to previous 1.3 (colored)

Extend ATF tests in t_trapsignal.sh to verify software breakpoint traps

There are at least four types of SIGTRAP events:
 - software/hardware single step (trace trap)
 - software breakpoint
 - hardware breakpoint/watchpoint
 - kernel event (exec, fork, vfork, vfork-done, lwp-create, lwp-exit)

A program can execute software breakpoint without the context of being
traced and this is a regular crash signal emitting SIGTRAP (TRAP_BRKPT).

Rename original trap_* tests (trap_simple, trap_handle, trap_mask,
trap_handle_recurse and trap_ignore) to segv_* tests and restrict them for
SIGSEGV.

Add new tests: trap_* testing the same scenarios as segv_ ones, however
verifying the software breakpoint trap (SIGTRAP).

Keep the original name of h_segv.c, and extend it for software breakpoint
events.

The purpose of these tests is to verify SIGTRAP kernel paths without the
ptrace(2) context.

All tests pass.

Sponsored by <The NetBSD Foundation>

Revision 1.3 / (download) - annotate - [select for diffs], Mon May 21 08:49:03 2018 UTC (2 years, 5 months ago) by kamil
Branch: MAIN
Changes since 1.2: +14 -2 lines
Diff to previous 1.2 (colored)

Add new ATF test: t_trapsignal:trap_ignore

Test ignored trap with right exit code.

This test passes.

Sponsored by <The NetBSD Foundation>

Revision 1.2 / (download) - annotate - [select for diffs], Fri Dec 8 14:40:45 2017 UTC (2 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

fix usage.

Revision 1.1 / (download) - annotate - [select for diffs], Thu Dec 7 19:46:40 2017 UTC (2 years, 10 months ago) by christos
Branch: MAIN

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>