Revert syscalls back-port from 4.10 28/230428/1 accepted/tizen_6.0_base accepted/tizen_6.0_base_tool accepted/tizen_6.0_base_tool_hotfix tizen_6.0_base tizen_6.0_base_hotfix accepted/tizen/6.0/base/20201029.110958 accepted/tizen/6.0/base/20230713.142928 accepted/tizen/6.0/base/tool/20201029.112239 accepted/tizen/6.0/base/tool/hotfix/20201030.125041 accepted/tizen/6.0/base/tool/hotfix/20201102.090358 accepted/tizen/base/20200411.215046 submit/tizen_6.0_base/20201029.184801 submit/tizen_6.0_base_hotfix/20201030.192501 submit/tizen_6.0_base_hotfix/20201102.162701 submit/tizen_base/20200410.050325 tizen_6.0.m2_release
authorDongkyun Son <dongkyun.s@samsung.com>
Fri, 10 Apr 2020 03:15:54 +0000 (12:15 +0900)
committerDongkyun Son <dongkyun.s@samsung.com>
Fri, 10 Apr 2020 03:23:55 +0000 (12:23 +0900)
This reverts:
- commit 1bc4230221e399605db8539e706caca962e899de.
- commit 0f2db21f1a9e22763303aae0f97bcfcce57aee2e.
- commit 6790d0572c8b0a3db95de1bd58ad1631b3c61754.

Change-Id: Ia8486f067d1fc5369c9281ee293de068784af146
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
usr/include/asm-arm/unistd.h
usr/include/linux/bpf.h [deleted file]
usr/include/linux/bpf_common.h [deleted file]
usr/include/linux/fs.h
usr/include/linux/memfd.h [deleted file]
usr/include/linux/random.h
usr/include/linux/sched.h
usr/include/linux/seccomp.h

index c53c5a4..896d514 100644 (file)
 #define __NR_process_vm_writev         (__NR_SYSCALL_BASE+377)
 #define __NR_kcmp                      (__NR_SYSCALL_BASE+378)
 #define __NR_finit_module              (__NR_SYSCALL_BASE+379)
-#define __NR_sched_setattr             (__NR_SYSCALL_BASE+380)
-#define __NR_sched_getattr             (__NR_SYSCALL_BASE+381)
-#define __NR_renameat2                 (__NR_SYSCALL_BASE+382)
-#define __NR_seccomp                   (__NR_SYSCALL_BASE+383)
-#define __NR_getrandom                 (__NR_SYSCALL_BASE+384)
-#define __NR_memfd_create              (__NR_SYSCALL_BASE+385)
-#define __NR_bpf                       (__NR_SYSCALL_BASE+386)
-#define __NR_execveat                  (__NR_SYSCALL_BASE+387)
+
+/*
+ * This may need to be greater than __NR_last_syscall+1 in order to
+ * account for the padding in the syscall table
+ */
 
 /*
  * The following SWIs are ARM private.
 #define __ARM_NR_set_tls               (__ARM_NR_BASE+5)
 
 /*
+ * *NOTE*: This is a ghost syscall private to the kernel.  Only the
+ * __kuser_cmpxchg code in entry-armv.S should be aware of its
+ * existence.  Don't ever use this from user code.
+ */
+
+/*
  * The following syscalls are obsolete and no longer available for EABI.
  */
 #if defined(__ARM_EABI__)
diff --git a/usr/include/linux/bpf.h b/usr/include/linux/bpf.h
deleted file mode 100755 (executable)
index 738ecce..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- */
-#ifndef __LINUX_BPF_H__
-#define __LINUX_BPF_H__
-
-#include <linux/types.h>
-#include <linux/bpf_common.h>
-
-/* Extended instruction set based on top of classic BPF */
-
-/* instruction classes */
-#define BPF_ALU64      0x07    /* alu mode in double word width */
-
-/* ld/ldx fields */
-#define BPF_DW         0x18    /* double word */
-#define BPF_XADD       0xc0    /* exclusive add */
-
-/* alu/jmp fields */
-#define BPF_MOV                0xb0    /* mov reg to reg */
-#define BPF_ARSH       0xc0    /* sign extending arithmetic shift right */
-
-/* change endianness of a register */
-#define BPF_END                0xd0    /* flags for endianness conversion: */
-#define BPF_TO_LE      0x00    /* convert to little-endian */
-#define BPF_TO_BE      0x08    /* convert to big-endian */
-#define BPF_FROM_LE    BPF_TO_LE
-#define BPF_FROM_BE    BPF_TO_BE
-
-#define BPF_JNE                0x50    /* jump != */
-#define BPF_JSGT       0x60    /* SGT is signed '>', GT in x86 */
-#define BPF_JSGE       0x70    /* SGE is signed '>=', GE in x86 */
-#define BPF_CALL       0x80    /* function call */
-#define BPF_EXIT       0x90    /* function return */
-
-/* Register numbers */
-enum {
-       BPF_REG_0 = 0,
-       BPF_REG_1,
-       BPF_REG_2,
-       BPF_REG_3,
-       BPF_REG_4,
-       BPF_REG_5,
-       BPF_REG_6,
-       BPF_REG_7,
-       BPF_REG_8,
-       BPF_REG_9,
-       BPF_REG_10,
-       __MAX_BPF_REG,
-};
-
-/* BPF has 10 general purpose 64-bit registers and stack frame. */
-#define MAX_BPF_REG    __MAX_BPF_REG
-
-struct bpf_insn {
-       __u8    code;           /* opcode */
-       __u8    dst_reg:4;      /* dest register */
-       __u8    src_reg:4;      /* source register */
-       __s16   off;            /* signed offset */
-       __s32   imm;            /* signed immediate constant */
-};
-
-/* BPF syscall commands */
-enum bpf_cmd {
-       /* create a map with given type and attributes
-        * fd = bpf(BPF_MAP_CREATE, union bpf_attr *, u32 size)
-        * returns fd or negative error
-        * map is deleted when fd is closed
-        */
-       BPF_MAP_CREATE,
-
-       /* lookup key in a given map
-        * err = bpf(BPF_MAP_LOOKUP_ELEM, union bpf_attr *attr, u32 size)
-        * Using attr->map_fd, attr->key, attr->value
-        * returns zero and stores found elem into value
-        * or negative error
-        */
-       BPF_MAP_LOOKUP_ELEM,
-
-       /* create or update key/value pair in a given map
-        * err = bpf(BPF_MAP_UPDATE_ELEM, union bpf_attr *attr, u32 size)
-        * Using attr->map_fd, attr->key, attr->value, attr->flags
-        * returns zero or negative error
-        */
-       BPF_MAP_UPDATE_ELEM,
-
-       /* find and delete elem by key in a given map
-        * err = bpf(BPF_MAP_DELETE_ELEM, union bpf_attr *attr, u32 size)
-        * Using attr->map_fd, attr->key
-        * returns zero or negative error
-        */
-       BPF_MAP_DELETE_ELEM,
-
-       /* lookup key in a given map and return next key
-        * err = bpf(BPF_MAP_GET_NEXT_KEY, union bpf_attr *attr, u32 size)
-        * Using attr->map_fd, attr->key, attr->next_key
-        * returns zero and stores next key or negative error
-        */
-       BPF_MAP_GET_NEXT_KEY,
-
-       /* verify and load eBPF program
-        * prog_fd = bpf(BPF_PROG_LOAD, union bpf_attr *attr, u32 size)
-        * Using attr->prog_type, attr->insns, attr->license
-        * returns fd or negative error
-        */
-       BPF_PROG_LOAD,
-};
-
-enum bpf_map_type {
-       BPF_MAP_TYPE_UNSPEC,
-       BPF_MAP_TYPE_HASH,
-       BPF_MAP_TYPE_ARRAY,
-};
-
-enum bpf_prog_type {
-       BPF_PROG_TYPE_UNSPEC,
-       BPF_PROG_TYPE_SOCKET_FILTER,
-       BPF_PROG_TYPE_KPROBE,
-       BPF_PROG_TYPE_SCHED_CLS,
-       BPF_PROG_TYPE_SCHED_ACT,
-};
-
-#define BPF_PSEUDO_MAP_FD      1
-
-/* flags for BPF_MAP_UPDATE_ELEM command */
-#define BPF_ANY                0 /* create new element or update existing */
-#define BPF_NOEXIST    1 /* create new element if it didn't exist */
-#define BPF_EXIST      2 /* update existing element */
-
-union bpf_attr {
-       struct { /* anonymous struct used by BPF_MAP_CREATE command */
-               __u32   map_type;       /* one of enum bpf_map_type */
-               __u32   key_size;       /* size of key in bytes */
-               __u32   value_size;     /* size of value in bytes */
-               __u32   max_entries;    /* max number of entries in a map */
-       };
-
-       struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
-               __u32           map_fd;
-               __aligned_u64   key;
-               union {
-                       __aligned_u64 value;
-                       __aligned_u64 next_key;
-               };
-               __u64           flags;
-       };
-
-       struct { /* anonymous struct used by BPF_PROG_LOAD command */
-               __u32           prog_type;      /* one of enum bpf_prog_type */
-               __u32           insn_cnt;
-               __aligned_u64   insns;
-               __aligned_u64   license;
-               __u32           log_level;      /* verbosity level of verifier */
-               __u32           log_size;       /* size of user buffer */
-               __aligned_u64   log_buf;        /* user supplied buffer */
-               __u32           kern_version;   /* checked when prog_type=kprobe */
-       };
-} __attribute__((aligned(8)));
-
-/* integer value in 'imm' field of BPF_CALL instruction selects which helper
- * function eBPF program intends to call
- */
-enum bpf_func_id {
-       BPF_FUNC_unspec,
-       BPF_FUNC_map_lookup_elem, /* void *map_lookup_elem(&map, &key) */
-       BPF_FUNC_map_update_elem, /* int map_update_elem(&map, &key, &value, flags) */
-       BPF_FUNC_map_delete_elem, /* int map_delete_elem(&map, &key) */
-       BPF_FUNC_probe_read,      /* int bpf_probe_read(void *dst, int size, void *src) */
-       BPF_FUNC_ktime_get_ns,    /* u64 bpf_ktime_get_ns(void) */
-       BPF_FUNC_trace_printk,    /* int bpf_trace_printk(const char *fmt, int fmt_size, ...) */
-       BPF_FUNC_get_prandom_u32, /* u32 prandom_u32(void) */
-       BPF_FUNC_get_smp_processor_id, /* u32 raw_smp_processor_id(void) */
-
-       /**
-        * skb_store_bytes(skb, offset, from, len, flags) - store bytes into packet
-        * @skb: pointer to skb
-        * @offset: offset within packet from skb->mac_header
-        * @from: pointer where to copy bytes from
-        * @len: number of bytes to store into packet
-        * @flags: bit 0 - if true, recompute skb->csum
-        *         other bits - reserved
-        * Return: 0 on success
-        */
-       BPF_FUNC_skb_store_bytes,
-
-       /**
-        * l3_csum_replace(skb, offset, from, to, flags) - recompute IP checksum
-        * @skb: pointer to skb
-        * @offset: offset within packet where IP checksum is located
-        * @from: old value of header field
-        * @to: new value of header field
-        * @flags: bits 0-3 - size of header field
-        *         other bits - reserved
-        * Return: 0 on success
-        */
-       BPF_FUNC_l3_csum_replace,
-
-       /**
-        * l4_csum_replace(skb, offset, from, to, flags) - recompute TCP/UDP checksum
-        * @skb: pointer to skb
-        * @offset: offset within packet where TCP/UDP checksum is located
-        * @from: old value of header field
-        * @to: new value of header field
-        * @flags: bits 0-3 - size of header field
-        *         bit 4 - is pseudo header
-        *         other bits - reserved
-        * Return: 0 on success
-        */
-       BPF_FUNC_l4_csum_replace,
-       __BPF_FUNC_MAX_ID,
-};
-
-/* user accessible mirror of in-kernel sk_buff.
- * new fields can only be added to the end of this structure
- */
-struct __sk_buff {
-       __u32 len;
-       __u32 pkt_type;
-       __u32 mark;
-       __u32 queue_mapping;
-       __u32 protocol;
-       __u32 vlan_present;
-       __u32 vlan_tci;
-       __u32 vlan_proto;
-       __u32 priority;
-};
-
-#endif /* __LINUX_BPF_H__ */
diff --git a/usr/include/linux/bpf_common.h b/usr/include/linux/bpf_common.h
deleted file mode 100755 (executable)
index afe7433..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef __LINUX_BPF_COMMON_H__
-#define __LINUX_BPF_COMMON_H__
-
-/* Instruction classes */
-#define BPF_CLASS(code) ((code) & 0x07)
-#define                BPF_LD          0x00
-#define                BPF_LDX         0x01
-#define                BPF_ST          0x02
-#define                BPF_STX         0x03
-#define                BPF_ALU         0x04
-#define                BPF_JMP         0x05
-#define                BPF_RET         0x06
-#define                BPF_MISC        0x07
-
-/* ld/ldx fields */
-#define BPF_SIZE(code)  ((code) & 0x18)
-#define                BPF_W           0x00
-#define                BPF_H           0x08
-#define                BPF_B           0x10
-#define BPF_MODE(code)  ((code) & 0xe0)
-#define                BPF_IMM         0x00
-#define                BPF_ABS         0x20
-#define                BPF_IND         0x40
-#define                BPF_MEM         0x60
-#define                BPF_LEN         0x80
-#define                BPF_MSH         0xa0
-
-/* alu/jmp fields */
-#define BPF_OP(code)    ((code) & 0xf0)
-#define                BPF_ADD         0x00
-#define                BPF_SUB         0x10
-#define                BPF_MUL         0x20
-#define                BPF_DIV         0x30
-#define                BPF_OR          0x40
-#define                BPF_AND         0x50
-#define                BPF_LSH         0x60
-#define                BPF_RSH         0x70
-#define                BPF_NEG         0x80
-#define                BPF_MOD         0x90
-#define                BPF_XOR         0xa0
-
-#define                BPF_JA          0x00
-#define                BPF_JEQ         0x10
-#define                BPF_JGT         0x20
-#define                BPF_JGE         0x30
-#define                BPF_JSET        0x40
-#define BPF_SRC(code)   ((code) & 0x08)
-#define                BPF_K           0x00
-#define                BPF_X           0x08
-
-#ifndef BPF_MAXINSNS
-#define BPF_MAXINSNS 4096
-#endif
-
-#endif /* __LINUX_BPF_COMMON_H__ */
index 3d248ed..abe7d5c 100644 (file)
 #define SEEK_HOLE      4       /* seek to the next hole */
 #define SEEK_MAX       SEEK_HOLE
 
-#define RENAME_NOREPLACE       (1 << 0)        /* Don't overwrite target */
-#define RENAME_EXCHANGE                (1 << 1)        /* Exchange source and dest */
-#define RENAME_WHITEOUT                (1 << 2)        /* Whiteout source */
-
 struct fstrim_range {
        __u64 start;
        __u64 len;
@@ -53,9 +49,9 @@ struct files_stat_struct {
 };
 
 struct inodes_stat_t {
-       long nr_inodes;
-       long nr_unused;
-       long dummy[5];          /* padding for sysctl ABI compatibility */
+       int nr_inodes;
+       int nr_unused;
+       int dummy[5];           /* padding for sysctl ABI compatibility */
 };
 
 
@@ -90,7 +86,6 @@ struct inodes_stat_t {
 #define MS_KERNMOUNT   (1<<22) /* this is a kern_mount call */
 #define MS_I_VERSION   (1<<23) /* Update inode I_version field */
 #define MS_STRICTATIME (1<<24) /* Always perform atime updates */
-#define MS_LAZYTIME    (1<<25) /* Update the on-disk [acm]times lazily */
 
 /* These sb flags are internal to the kernel */
 #define MS_NOSEC       (1<<28)
@@ -101,8 +96,7 @@ struct inodes_stat_t {
 /*
  * Superblock flags that can be altered by MS_REMOUNT
  */
-#define MS_RMT_MASK    (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION|\
-                        MS_LAZYTIME)
+#define MS_RMT_MASK    (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION)
 
 /*
  * Old magic mount flag and mask
diff --git a/usr/include/linux/memfd.h b/usr/include/linux/memfd.h
deleted file mode 100755 (executable)
index 6632b15..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _LINUX_MEMFD_H
-#define _LINUX_MEMFD_H
-
-/* flags for memfd_create(2) (unsigned int) */
-#define MFD_CLOEXEC            0x0001U
-#define MFD_ALLOW_SEALING      0x0002U
-
-#endif /* _LINUX_MEMFD_H */
index 1f166ce..80e6445 100644 (file)
@@ -40,13 +40,11 @@ struct rand_pool_info {
        __u32   buf[0];
 };
 
-/*
- * Flags for getrandom(2)
- *
- * GRND_NONBLOCK       Don't block and return EAGAIN instead
- * GRND_RANDOM         Use the /dev/random pool instead of /dev/urandom
- */
-#define GRND_NONBLOCK  0x0001
-#define GRND_RANDOM    0x0002
+struct rnd_state {
+       __u32 s1, s2, s3;
+};
+
+/* Exported functions */
+
 
 #endif /* _LINUX_RANDOM_H */
index 7734bb7..605dc53 100644 (file)
@@ -13,7 +13,7 @@
 #define CLONE_VFORK    0x00004000      /* set if the parent wants the child to wake it up on mm_release */
 #define CLONE_PARENT   0x00008000      /* set if we want to have the same parent as the cloner */
 #define CLONE_THREAD   0x00010000      /* Same thread group? */
-#define CLONE_NEWNS    0x00020000      /* New mount namespace group */
+#define CLONE_NEWNS    0x00020000      /* New namespace group? */
 #define CLONE_SYSVSEM  0x00040000      /* share system V SEM_UNDO semantics */
 #define CLONE_SETTLS   0x00080000      /* create a new TLS for the child */
 #define CLONE_PARENT_SETTID    0x00100000      /* set the TID in the parent */
@@ -23,8 +23,8 @@
 #define CLONE_CHILD_SETTID     0x01000000      /* set the TID in the child */
 /* 0x02000000 was previously the unused CLONE_STOPPED (Start in stopped state)
    and is now available for re-use. */
-#define CLONE_NEWUTS           0x04000000      /* New utsname namespace */
-#define CLONE_NEWIPC           0x08000000      /* New ipc namespace */
+#define CLONE_NEWUTS           0x04000000      /* New utsname group? */
+#define CLONE_NEWIPC           0x08000000      /* New ipcs */
 #define CLONE_NEWUSER          0x10000000      /* New user namespace */
 #define CLONE_NEWPID           0x20000000      /* New pid namespace */
 #define CLONE_NEWNET           0x40000000      /* New network namespace */
 #define SCHED_BATCH            3
 /* SCHED_ISO: reserved but not implemented yet */
 #define SCHED_IDLE             5
-#define SCHED_DEADLINE         6
-
 /* Can be ORed in to make sure the process is reverted back to SCHED_NORMAL on fork */
 #define SCHED_RESET_ON_FORK     0x40000000
 
-/*
- * For the sched_{set,get}attr() calls
- */
-#define SCHED_FLAG_RESET_ON_FORK       0x01
 
 #endif /* _LINUX_SCHED_H */
index 2f4c2e9..9c03683 100644 (file)
 #define SECCOMP_MODE_STRICT    1 /* uses hard-coded filter. */
 #define SECCOMP_MODE_FILTER    2 /* uses user-supplied filter. */
 
-/* Valid operations for seccomp syscall. */
-#define SECCOMP_SET_MODE_STRICT        0
-#define SECCOMP_SET_MODE_FILTER        1
-
-/* Valid flags for SECCOMP_SET_MODE_FILTER */
-#define SECCOMP_FILTER_FLAG_TSYNC      1
-
 /*
  * All BPF programs must return a 32-bit value.
  * The bottom 16-bits are for optional return data.