aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/arm.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-11-22 11:42:10 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-11-24 13:56:20 +0100
commitddf7b3e0655cf6dfeacfe509e477c1486d2cc7db (patch)
treedd3ce89e4c92cdb4ddaaae566222ec8cbd177676 /sys/linux/arm.go
parentd19770f1b9c6f1cb953b4a6e767aa914009deb20 (diff)
sys/linux: improve AF_ALG alg name generation
There is effectively infinite number of possible crypto algorithm names due to templates. Plus there is tricky relation between algorithms and algorithm type names. This change adds custom mutator for sockaddr_alg struct to improve variance in generated algorithms.
Diffstat (limited to 'sys/linux/arm.go')
-rw-r--r--sys/linux/arm.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/linux/arm.go b/sys/linux/arm.go
index 13b4f40db..4ddf4e33c 100644
--- a/sys/linux/arm.go
+++ b/sys/linux/arm.go
@@ -417,7 +417,7 @@ var structDescs_arm = []*KeyedStruct{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Buf: "parent"},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 4}}, Val: 279},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 3},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "op", TypeSize: 4}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "alg_op_op", FldName: "op", TypeSize: 4}}, Vals: []uint64{0, 1}},
}, AlignAttr: 4}},
{Key: StructKey{Name: "cmsghdr_sctp"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "cmsghdr_sctp", TypeSize: 44}, Fields: []Type{
&StructType{Key: StructKey{Name: "cmsghdr_sctp_init"}, FldName: "init"},
@@ -5640,8 +5640,8 @@ var syscalls_arm = []*Syscall{
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
{ID: 1, NR: 285, Name: "accept$alg", CallName: "accept", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "sock_alg", FldName: "fd", TypeSize: 4}},
- &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 4, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "sockaddr_alg", Dir: 1}}},
- &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 4}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "peer", TypeSize: 4}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "peerlen", TypeSize: 4}}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_algconn", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
{ID: 2, NR: 285, Name: "accept$ax25", CallName: "accept", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "sock_ax25", FldName: "fd", TypeSize: 4}},
@@ -13741,6 +13741,8 @@ var consts_arm = []ConstValue{
{Name: "AH_ESP_V6_FLOW", Value: 8},
{Name: "AH_V4_FLOW", Value: 9},
{Name: "AH_V6_FLOW", Value: 11},
+ {Name: "ALG_OP_DECRYPT"},
+ {Name: "ALG_OP_ENCRYPT", Value: 1},
{Name: "ALG_SET_AEAD_ASSOCLEN", Value: 4},
{Name: "ALG_SET_AEAD_AUTHSIZE", Value: 5},
{Name: "ALG_SET_IV", Value: 2},
@@ -16664,4 +16666,4 @@ var consts_arm = []ConstValue{
{Name: "__WNOTHREAD", Value: 536870912},
}
-const revision_arm = "535d8ff089248a1f2cb7f41725f543f14767dd1e"
+const revision_arm = "266440e04c2aa2386a0083e579bfd6a68ad75c2f"