Update to v4.20.1 kernel headers.
This includes one manual change:
In the file bionic/libc/kernel/uapi/linux/in.h, the macro IN_BADCLASS
was not definied correctly. Change the macro from:
#define IN_BADCLASS(a) ((((long int) (a)) == 0xffffffff)
to:
#define IN_BADCLASS(a) (((long int) (a)) == (long int)0xffffffff)
This change is being pushed to the upstream kernels.
Test: Builds and boots.
Change-Id: Ia304773a9dc6789b34d9769d73742384d6afb571
Merged-In: Ia304773a9dc6789b34d9769d73742384d6afb571
(cherry picked from commit 967fb01cce73591281e7804e2c0fa9f83b618f5b)
diff --git a/libc/kernel/uapi/linux/keyctl.h b/libc/kernel/uapi/linux/keyctl.h
index 0cc7f55..53f0468 100644
--- a/libc/kernel/uapi/linux/keyctl.h
+++ b/libc/kernel/uapi/linux/keyctl.h
@@ -60,9 +60,19 @@
#define KEYCTL_INVALIDATE 21
#define KEYCTL_GET_PERSISTENT 22
#define KEYCTL_DH_COMPUTE 23
+#define KEYCTL_PKEY_QUERY 24
+#define KEYCTL_PKEY_ENCRYPT 25
+#define KEYCTL_PKEY_DECRYPT 26
+#define KEYCTL_PKEY_SIGN 27
+#define KEYCTL_PKEY_VERIFY 28
#define KEYCTL_RESTRICT_KEYRING 29
struct keyctl_dh_params {
- __s32 __linux_private;
+ union {
+#ifndef __cplusplus
+ __s32 __linux_private;
+#endif
+ __s32 priv;
+ };
__s32 prime;
__s32 base;
};
@@ -72,4 +82,26 @@
__u32 otherinfolen;
__u32 __spare[8];
};
+#define KEYCTL_SUPPORTS_ENCRYPT 0x01
+#define KEYCTL_SUPPORTS_DECRYPT 0x02
+#define KEYCTL_SUPPORTS_SIGN 0x04
+#define KEYCTL_SUPPORTS_VERIFY 0x08
+struct keyctl_pkey_query {
+ __u32 supported_ops;
+ __u32 key_size;
+ __u16 max_data_size;
+ __u16 max_sig_size;
+ __u16 max_enc_size;
+ __u16 max_dec_size;
+ __u32 __spare[10];
+};
+struct keyctl_pkey_params {
+ __s32 key_id;
+ __u32 in_len;
+ union {
+ __u32 out_len;
+ __u32 in2_len;
+ };
+ __u32 __spare[7];
+};
#endif