Commit 360be17
committed
zephyr: vregion: stop logging spurious "read access denied" on free paths
vregion_verify() asserts that the vregion metadata object is NOT
accessible to the userspace context. It did this with
K_OOPS(!K_SYSCALL_MEMORY_READ(vr, sizeof(*vr)));
but K_SYSCALL_MEMORY_READ() emits an "os.vregion_verify: ... Memory
region <addr> (size 88) read access denied" error via LOG_ERR precisely
when the region is inaccessible - i.e. in the expected, correct case for
a kernel-only vregion.
Probe the mapping directly with arch_buffer_validate(), which performs
the same check without logging, and oops only if the userspace context
can actually read the metadata. No functional change to the security
check; only the false-positive error logging is removed.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>1 parent 182294e commit 360be17
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
558 | | - | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
559 | 566 | | |
560 | 567 | | |
561 | 568 | | |
| |||
0 commit comments