lkml.org 
[lkml]   [2020]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/6] mm: introduce secretmemfd system call to create "secret" memory areas
Hi Mike,

On Mon, 20 Jul 2020 at 11:26, Mike Rapoport <rppt@kernel.org> wrote:
>
> From: Mike Rapoport <rppt@linux.ibm.com>
>
> Introduce "secretmemfd" system call with the ability to create memory areas
> visible only in the context of the owning process and not mapped not only
> to other processes but in the kernel page tables as well.
>
> The user will create a file descriptor using the secretmemfd system call

Without wanting to start a bikeshed discussion, the more common
convention in recently added system calls is to use an underscore in
names that consist of multiple clearly distinct words. See many
examples in https://man7.org/linux/man-pages/man2/syscalls.2.html.

Thus, I'd suggest at least secret_memfd().

Also, I wonder whether memfd_secret() might not be even better.
There's plenty of precedent for the naming style where related APIs
share a common prefix [1].

Thanks,

Michael

[1] Some examples:

epoll_create(2)
epoll_create1(2)
epoll_ctl(2)
epoll_pwait(2)
epoll_wait(2)

mq_getsetattr(2)
mq_notify(2)
mq_open(2)
mq_timedreceive(2)
mq_timedsend(2)
mq_unlink(2)

sched_get_affinity(2)
sched_get_priority_max(2)
sched_get_priority_min(2)
sched_getaffinity(2)
sched_getattr(2)
sched_getparam(2)
sched_getscheduler(2)
sched_rr_get_interval(2)
sched_set_affinity(2)
sched_setaffinity(2)
sched_setattr(2)
sched_setparam(2)
sched_setscheduler(2)
sched_yield(2)

timer_create(2)
timer_delete(2)
timer_getoverrun(2)
timer_gettime(2)
timer_settime(2)

timerfd_create(2)
timerfd_gettime(2)
timerfd_settime(2)




--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

\
 
 \ /
  Last update: 2020-07-21 13:00    [W:0.081 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site