mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-02 23:18:44 +00:00
parent
2e3958c6dc
commit
13d67fed38
25 changed files with 111 additions and 0 deletions
42
libc/calls/landlock.h
Normal file
42
libc/calls/landlock.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_CALLS_LANDLOCK_H_
|
||||
#define COSMOPOLITAN_LIBC_CALLS_LANDLOCK_H_
|
||||
|
||||
#define LANDLOCK_ACCESS_FS_EXECUTE 0x0001ul
|
||||
#define LANDLOCK_ACCESS_FS_WRITE_FILE 0x0002ul
|
||||
#define LANDLOCK_ACCESS_FS_READ_FILE 0x0004ul
|
||||
#define LANDLOCK_ACCESS_FS_READ_DIR 0x0008ul
|
||||
#define LANDLOCK_ACCESS_FS_REMOVE_DIR 0x0010ul
|
||||
#define LANDLOCK_ACCESS_FS_REMOVE_FILE 0x0020ul
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_CHAR 0x0040ul
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_DIR 0x0080ul
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_REG 0x0100ul
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_SOCK 0x0200ul
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_FIFO 0x0400ul
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_BLOCK 0x0800ul
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_SYM 0x1000ul
|
||||
#define LANDLOCK_ACCESS_FS_REFER 0x2000ul
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
enum landlock_rule_type {
|
||||
LANDLOCK_RULE_PATH_BENEATH = 1,
|
||||
};
|
||||
|
||||
struct landlock_ruleset_attr {
|
||||
uint64_t handled_access_fs;
|
||||
};
|
||||
|
||||
struct thatispacked landlock_path_beneath_attr {
|
||||
uint64_t allowed_access;
|
||||
int32_t parent_fd;
|
||||
};
|
||||
|
||||
int landlock_restrict_self(int, uint32_t);
|
||||
int landlock_add_rule(int, enum landlock_rule_type, const void *, uint32_t);
|
||||
int landlock_create_ruleset(const struct landlock_ruleset_attr *, size_t,
|
||||
uint32_t);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_LANDLOCK_H_ */
|
2
libc/sysv/calls/clone3.s
Normal file
2
libc/sysv/calls/clone3.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall clone3,0xfffffffffffff1b3,globl
|
2
libc/sysv/calls/close_range.s
Normal file
2
libc/sysv/calls/close_range.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall close_range,0xfffffffffffff1b4,globl
|
2
libc/sysv/calls/epoll_pwait2.s
Normal file
2
libc/sysv/calls/epoll_pwait2.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall epoll_pwait2,0xfffffffffffff1b9,globl
|
2
libc/sysv/calls/faccessat2.s
Normal file
2
libc/sysv/calls/faccessat2.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall faccessat2,0xfffffffffffff1b7,globl
|
2
libc/sysv/calls/fsconfig.s
Normal file
2
libc/sysv/calls/fsconfig.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall fsconfig,0xfffffffffffff1af,globl
|
2
libc/sysv/calls/fsmount.s
Normal file
2
libc/sysv/calls/fsmount.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall fsmount,0xfffffffffffff1b0,globl
|
2
libc/sysv/calls/fsopen.s
Normal file
2
libc/sysv/calls/fsopen.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall fsopen,0xfffffffffffff1ae,globl
|
2
libc/sysv/calls/fspick.s
Normal file
2
libc/sysv/calls/fspick.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall fspick,0xfffffffffffff1b1,globl
|
2
libc/sysv/calls/futex_waitv.s
Normal file
2
libc/sysv/calls/futex_waitv.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall futex_waitv,0xfffffffffffff1c1,globl
|
2
libc/sysv/calls/landlock_add_rule.s
Normal file
2
libc/sysv/calls/landlock_add_rule.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall landlock_add_rule,0xfffffffffffff1bd,globl
|
2
libc/sysv/calls/landlock_create_ruleset.s
Normal file
2
libc/sysv/calls/landlock_create_ruleset.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall landlock_create_ruleset,0xfffffffffffff1bc,globl
|
2
libc/sysv/calls/landlock_restrict_self.s
Normal file
2
libc/sysv/calls/landlock_restrict_self.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall landlock_restrict_self,0xfffffffffffff1be,globl
|
2
libc/sysv/calls/memfd_secret.s
Normal file
2
libc/sysv/calls/memfd_secret.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall memfd_secret,0xfffffffffffff1bf,globl
|
2
libc/sysv/calls/mount_setattr.s
Normal file
2
libc/sysv/calls/mount_setattr.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall mount_setattr,0xfffffffffffff1ba,globl
|
2
libc/sysv/calls/move_mount.s
Normal file
2
libc/sysv/calls/move_mount.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall move_mount,0xfffffffffffff1ad,globl
|
2
libc/sysv/calls/open_tree.s
Normal file
2
libc/sysv/calls/open_tree.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall open_tree,0xfffffffffffff1ac,globl
|
2
libc/sysv/calls/openat2.s
Normal file
2
libc/sysv/calls/openat2.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall openat2,0xfffffffffffff1b5,globl
|
2
libc/sysv/calls/pidfd_getfd.s
Normal file
2
libc/sysv/calls/pidfd_getfd.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall pidfd_getfd,0xfffffffffffff1b6,globl
|
2
libc/sysv/calls/pidfd_open.s
Normal file
2
libc/sysv/calls/pidfd_open.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall pidfd_open,0xfffffffffffff1b2,globl
|
2
libc/sysv/calls/process_madvise.s
Normal file
2
libc/sysv/calls/process_madvise.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall process_madvise,0xfffffffffffff1b8,globl
|
2
libc/sysv/calls/process_mrelease.s
Normal file
2
libc/sysv/calls/process_mrelease.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall process_mrelease,0xfffffffffffff1c0,globl
|
2
libc/sysv/calls/quotactl_fd.s
Normal file
2
libc/sysv/calls/quotactl_fd.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall quotactl_fd,0xfffffffffffff1bb,globl
|
2
libc/sysv/calls/set_mempolicy_home_node.s
Normal file
2
libc/sysv/calls/set_mempolicy_home_node.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall set_mempolicy_home_node,0xfffffffffffff1c2,globl
|
|
@ -376,6 +376,29 @@ scall io_uring_register 0xfffffffffffff1ab globl
|
|||
scall sys_pledge 0xfff06cffffffffff globl # └─ online linux services ban the president of united states of america
|
||||
scall msyscall 0xfff025ffffffffff globl
|
||||
scall sys_bogus 0x5005005002500500 globl
|
||||
scall open_tree 0xfffffffffffff1ac globl
|
||||
scall move_mount 0xfffffffffffff1ad globl
|
||||
scall fsopen 0xfffffffffffff1ae globl
|
||||
scall fsconfig 0xfffffffffffff1af globl
|
||||
scall fsmount 0xfffffffffffff1b0 globl
|
||||
scall fspick 0xfffffffffffff1b1 globl
|
||||
scall pidfd_open 0xfffffffffffff1b2 globl
|
||||
scall clone3 0xfffffffffffff1b3 globl
|
||||
scall close_range 0xfffffffffffff1b4 globl
|
||||
scall openat2 0xfffffffffffff1b5 globl # Linux 5.6
|
||||
scall pidfd_getfd 0xfffffffffffff1b6 globl
|
||||
scall faccessat2 0xfffffffffffff1b7 globl
|
||||
scall process_madvise 0xfffffffffffff1b8 globl
|
||||
scall epoll_pwait2 0xfffffffffffff1b9 globl
|
||||
scall mount_setattr 0xfffffffffffff1ba globl
|
||||
scall quotactl_fd 0xfffffffffffff1bb globl
|
||||
scall landlock_create_ruleset 0xfffffffffffff1bc globl
|
||||
scall landlock_add_rule 0xfffffffffffff1bd globl
|
||||
scall landlock_restrict_self 0xfffffffffffff1be globl
|
||||
scall memfd_secret 0xfffffffffffff1bf globl
|
||||
scall process_mrelease 0xfffffffffffff1c0 globl
|
||||
scall futex_waitv 0xfffffffffffff1c1 globl
|
||||
scall set_mempolicy_home_node 0xfffffffffffff1c2 globl
|
||||
|
||||
# The Fifth Bell System Interface, Community Edition
|
||||
# » besiyata dishmaya
|
||||
|
|
Loading…
Add table
Reference in a new issue