Bug 186236 - [kernel] [patch] sigcode not synced on executable stack on icache not coherent archs
Summary: [kernel] [patch] sigcode not synced on executable stack on icache not coheren...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2014-01-29 14:10 UTC by onwahe
Modified: 2017-12-31 22:24 UTC (History)
0 users

See Also:

file.diff (514 bytes, patch)
2014-01-29 14:10 UTC, onwahe
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description onwahe 2014-01-29 14:10:00 UTC
When sigcode (signal trampoline) is copied to user stack during exec, no icache syncing is called. This is problem on architectures where icache is not coherent.

Fix: I'm attaching simple patch. Another approche is to map user stack without exec privilege, copy sigcode, and then remap the stack with exec privilege.

Patch attached with submission follows:
How-To-Repeat: I have noticed the problem after fork(), when parent process was immediately sending signal to child process. As a cache problem, the problem displayed itself rarely.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:48 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped