Thread (36 messages) flat view 36 messages, 8 authors, 2025-05-17

Re: [PATCH 2/3] lsm: introduce security_lsm_manage_policy hook

From: John Johansen <john.johansen@canonical.com>
Date: 2025-05-08 14:44:47
Also in: linux-security-module, lkml

On 5/8/25 05:55, Tetsuo Handa wrote:
On 2025/05/08 17:25, John Johansen wrote:
quoted
That is fine. But curious I am curious what the interface would look like to fit TOMOYO's
needs.
Stream (like "FILE *") with restart from the beginning (like rewind(fp)) support.
That is, the caller can read/write at least one byte at a time, and written data
is processed upon encountering '\n'.
that can be emulated within the current sycall, where the lsm maintains a buffer.
Are you asking to also read data back out as well, that could be added, but doing
a syscall per byte here or through the fs is going to have fairly high overhead.

Without understanding the requirement it would seem to me, that it would be
better to emulate that file buffer manipulation in userspace similar say C++
stringstreams, and then write the syscall when done.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help