Page MenuHomeFreeBSD

kasan: wrap kstack cleanup into a helper
AbandonedPublic

Authored by khng on Apr 19 2024, 10:29 PM.
Tags
None
Referenced Files
F84298406: D44882.id137447.diff
Tue, May 21, 11:55 PM
F84298405: D44882.id137428.diff
Tue, May 21, 11:55 PM
F84298402: D44882.id137426.diff
Tue, May 21, 11:55 PM
F84296485: D44882.id.diff
Tue, May 21, 11:18 PM
Unknown Object (File)
Sat, May 18, 6:36 AM
Unknown Object (File)
Thu, May 2, 2:13 PM
Unknown Object (File)
Fri, Apr 26, 3:53 PM
Unknown Object (File)
Fri, Apr 26, 3:50 PM
Subscribers

Details

Reviewers
markj
Summary

MFC with: 68a3a7fc9483
MFC after: 3 days
Sponsored by: Juniper Networks, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 57251
Build 54139: arc lint + arc unit

Event Timeline

khng requested review of this revision.Apr 19 2024, 10:29 PM
sys/kern/subr_asan.c
434

I'd prefer a more generic name, like kasan_kstack_init().

Or, follow the pattern of KMSAN and have kasan_thread_alloc() which only zeros the shadow of the stack (if td->td_kstack != 0).

Adapt markj@'s suggestions.

khng marked an inline comment as done.Apr 20 2024, 9:29 PM
sys/kern/subr_asan.c
434

Sorry, by "follow the pattern of KMSAN" I meant that kmsan_thread_alloc() and kasan_thread_alloc() calls should be in the same place. Otherwise it's rather confusing.

We can actually remove the shadow space marking in vm_thread_new() as well. I posted a diff to this effect: https://reviews.freebsd.org/D44891