diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-09-04 08:50:49 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-09-04 08:50:49 -0400 |
commit | b06898d119f6b8dba7b318ad73558ce2d39161e8 (patch) | |
tree | df85bc0cd9047202faa6b02ee8ce706f155ba896 /tools | |
parent | b24a5f293058b512f1685930f2983a20ee3e15ab (diff) | |
parent | f5fd4a67bef5f2c5c2c9eb0cb2900e12d192ae23 (diff) |
Merge tag 'asoc-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v4.14
This is quite a large release by volume of patches and diff, a lot of
that is mechanical cleanup patches but it's great to also see a range of
vendors actively working on adding new features and fixing issues in
their drivers. Intel and Realtek have been especially active here.
- Continued work towards moving everything to the component model from
Morimoto-san.
- Use of devres for jack detection GPIOs, eliminating some potential
resource leaks.
- Jack detection support for Qualcomm MSM8916.
- Support for Allwinner H3, Cirrus Logic CS43130, Intel Kabylake
systems with RT5663, Realtek RT274, TI TLV320AIC32x6 and Wolfson
WM8523.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build/feature/test-bpf.c | 2 | ||||
-rw-r--r-- | tools/lib/bpf/bpf.c | 3 | ||||
-rw-r--r-- | tools/lib/bpf/libbpf.c | 3 | ||||
-rw-r--r-- | tools/objtool/arch/x86/decode.c | 26 | ||||
-rw-r--r-- | tools/testing/selftests/bpf/test_pkt_md_access.c | 11 | ||||
-rw-r--r-- | tools/testing/selftests/bpf/test_progs.c | 8 | ||||
-rw-r--r-- | tools/testing/selftests/bpf/test_verifier.c | 47 | ||||
-rw-r--r-- | tools/testing/selftests/futex/Makefile | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | tools/testing/selftests/kmod/kmod.sh | 4 | ||||
-rwxr-xr-x | tools/testing/selftests/ntb/ntb_test.sh | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | tools/testing/selftests/sysctl/sysctl.sh | 0 | ||||
-rw-r--r-- | tools/testing/selftests/timers/freq-step.c | 7 |
12 files changed, 96 insertions, 21 deletions
diff --git a/tools/build/feature/test-bpf.c b/tools/build/feature/test-bpf.c index 7598361ef1f1..da2172ff9662 100644 --- a/tools/build/feature/test-bpf.c +++ b/tools/build/feature/test-bpf.c | |||
@@ -11,6 +11,8 @@ | |||
11 | # define __NR_bpf 280 | 11 | # define __NR_bpf 280 |
12 | # elif defined(__sparc__) | 12 | # elif defined(__sparc__) |
13 | # define __NR_bpf 349 | 13 | # define __NR_bpf 349 |
14 | # elif defined(__s390__) | ||
15 | # define __NR_bpf 351 | ||
14 | # else | 16 | # else |
15 | # error __NR_bpf not defined. libbpf does not support your arch. | 17 | # error __NR_bpf not defined. libbpf does not support your arch. |
16 | # endif | 18 | # endif |
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c index 412a7c82995a..e5bbb090bf88 100644 --- a/tools/lib/bpf/bpf.c +++ b/tools/lib/bpf/bpf.c | |||
@@ -39,6 +39,8 @@ | |||
39 | # define __NR_bpf 280 | 39 | # define __NR_bpf 280 |
40 | # elif defined(__sparc__) | 40 | # elif defined(__sparc__) |
41 | # define __NR_bpf 349 | 41 | # define __NR_bpf 349 |
42 | # elif defined(__s390__) | ||
43 | # define __NR_bpf 351 | ||
42 | # else | 44 | # else |
43 | # error __NR_bpf not defined. libbpf does not support your arch. | 45 | # error __NR_bpf not defined. libbpf does not support your arch. |
44 | # endif | 46 | # endif |
@@ -314,7 +316,6 @@ int bpf_obj_get_info_by_fd(int prog_fd, void *info, __u32 *info_len) | |||
314 | int err; | 316 | int err; |
315 | 317 | ||
316 | bzero(&attr, sizeof(attr)); | 318 | bzero(&attr, sizeof(attr)); |
317 | bzero(info, *info_len); | ||
318 | attr.info.bpf_fd = prog_fd; | 319 | attr.info.bpf_fd = prog_fd; |
319 | attr.info.info_len = *info_len; | 320 | attr.info.info_len = *info_len; |
320 | attr.info.info = ptr_to_u64(info); | 321 | attr.info.info = ptr_to_u64(info); |
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 1a2c07eb7795..8c67a90dbd82 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c | |||
@@ -879,7 +879,8 @@ bpf_object__create_maps(struct bpf_object *obj) | |||
879 | size_t j; | 879 | size_t j; |
880 | int err = *pfd; | 880 | int err = *pfd; |
881 | 881 | ||
882 | pr_warning("failed to create map: %s\n", | 882 | pr_warning("failed to create map (name: '%s'): %s\n", |
883 | obj->maps[i].name, | ||
883 | strerror(errno)); | 884 | strerror(errno)); |
884 | for (j = 0; j < i; j++) | 885 | for (j = 0; j < i; j++) |
885 | zclose(obj->maps[j].fd); | 886 | zclose(obj->maps[j].fd); |
diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c index a36c2eba64e7..4559a21a8de2 100644 --- a/tools/objtool/arch/x86/decode.c +++ b/tools/objtool/arch/x86/decode.c | |||
@@ -271,7 +271,7 @@ int arch_decode_instruction(struct elf *elf, struct section *sec, | |||
271 | case 0x8d: | 271 | case 0x8d: |
272 | if (rex == 0x48 && modrm == 0x65) { | 272 | if (rex == 0x48 && modrm == 0x65) { |
273 | 273 | ||
274 | /* lea -disp(%rbp), %rsp */ | 274 | /* lea disp(%rbp), %rsp */ |
275 | *type = INSN_STACK; | 275 | *type = INSN_STACK; |
276 | op->src.type = OP_SRC_ADD; | 276 | op->src.type = OP_SRC_ADD; |
277 | op->src.reg = CFI_BP; | 277 | op->src.reg = CFI_BP; |
@@ -281,6 +281,30 @@ int arch_decode_instruction(struct elf *elf, struct section *sec, | |||
281 | break; | 281 | break; |
282 | } | 282 | } |
283 | 283 | ||
284 | if (rex == 0x48 && (modrm == 0xa4 || modrm == 0x64) && | ||
285 | sib == 0x24) { | ||
286 | |||
287 | /* lea disp(%rsp), %rsp */ | ||
288 | *type = INSN_STACK; | ||
289 | op->src.type = OP_SRC_ADD; | ||
290 | op->src.reg = CFI_SP; | ||
291 | op->src.offset = insn.displacement.value; | ||
292 | op->dest.type = OP_DEST_REG; | ||
293 | op->dest.reg = CFI_SP; | ||
294 | break; | ||
295 | } | ||
296 | |||
297 | if (rex == 0x48 && modrm == 0x2c && sib == 0x24) { | ||
298 | |||
299 | /* lea (%rsp), %rbp */ | ||
300 | *type = INSN_STACK; | ||
301 | op->src.type = OP_SRC_REG; | ||
302 | op->src.reg = CFI_SP; | ||
303 | op->dest.type = OP_DEST_REG; | ||
304 | op->dest.reg = CFI_BP; | ||
305 | break; | ||
306 | } | ||
307 | |||
284 | if (rex == 0x4c && modrm == 0x54 && sib == 0x24 && | 308 | if (rex == 0x4c && modrm == 0x54 && sib == 0x24 && |
285 | insn.displacement.value == 8) { | 309 | insn.displacement.value == 8) { |
286 | 310 | ||
diff --git a/tools/testing/selftests/bpf/test_pkt_md_access.c b/tools/testing/selftests/bpf/test_pkt_md_access.c index 71729d47eb85..7956302ecdf2 100644 --- a/tools/testing/selftests/bpf/test_pkt_md_access.c +++ b/tools/testing/selftests/bpf/test_pkt_md_access.c | |||
@@ -12,12 +12,23 @@ | |||
12 | 12 | ||
13 | int _version SEC("version") = 1; | 13 | int _version SEC("version") = 1; |
14 | 14 | ||
15 | #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ | ||
15 | #define TEST_FIELD(TYPE, FIELD, MASK) \ | 16 | #define TEST_FIELD(TYPE, FIELD, MASK) \ |
16 | { \ | 17 | { \ |
17 | TYPE tmp = *(volatile TYPE *)&skb->FIELD; \ | 18 | TYPE tmp = *(volatile TYPE *)&skb->FIELD; \ |
18 | if (tmp != ((*(volatile __u32 *)&skb->FIELD) & MASK)) \ | 19 | if (tmp != ((*(volatile __u32 *)&skb->FIELD) & MASK)) \ |
19 | return TC_ACT_SHOT; \ | 20 | return TC_ACT_SHOT; \ |
20 | } | 21 | } |
22 | #else | ||
23 | #define TEST_FIELD_OFFSET(a, b) ((sizeof(a) - sizeof(b)) / sizeof(b)) | ||
24 | #define TEST_FIELD(TYPE, FIELD, MASK) \ | ||
25 | { \ | ||
26 | TYPE tmp = *((volatile TYPE *)&skb->FIELD + \ | ||
27 | TEST_FIELD_OFFSET(skb->FIELD, TYPE)); \ | ||
28 | if (tmp != ((*(volatile __u32 *)&skb->FIELD) & MASK)) \ | ||
29 | return TC_ACT_SHOT; \ | ||
30 | } | ||
31 | #endif | ||
21 | 32 | ||
22 | SEC("test1") | 33 | SEC("test1") |
23 | int process(struct __sk_buff *skb) | 34 | int process(struct __sk_buff *skb) |
diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c index 5855cd3d3d45..1f7dd35551b9 100644 --- a/tools/testing/selftests/bpf/test_progs.c +++ b/tools/testing/selftests/bpf/test_progs.c | |||
@@ -340,6 +340,7 @@ static void test_bpf_obj_id(void) | |||
340 | 340 | ||
341 | /* Check getting prog info */ | 341 | /* Check getting prog info */ |
342 | info_len = sizeof(struct bpf_prog_info) * 2; | 342 | info_len = sizeof(struct bpf_prog_info) * 2; |
343 | bzero(&prog_infos[i], info_len); | ||
343 | prog_infos[i].jited_prog_insns = ptr_to_u64(jited_insns); | 344 | prog_infos[i].jited_prog_insns = ptr_to_u64(jited_insns); |
344 | prog_infos[i].jited_prog_len = sizeof(jited_insns); | 345 | prog_infos[i].jited_prog_len = sizeof(jited_insns); |
345 | prog_infos[i].xlated_prog_insns = ptr_to_u64(xlated_insns); | 346 | prog_infos[i].xlated_prog_insns = ptr_to_u64(xlated_insns); |
@@ -369,6 +370,7 @@ static void test_bpf_obj_id(void) | |||
369 | 370 | ||
370 | /* Check getting map info */ | 371 | /* Check getting map info */ |
371 | info_len = sizeof(struct bpf_map_info) * 2; | 372 | info_len = sizeof(struct bpf_map_info) * 2; |
373 | bzero(&map_infos[i], info_len); | ||
372 | err = bpf_obj_get_info_by_fd(map_fds[i], &map_infos[i], | 374 | err = bpf_obj_get_info_by_fd(map_fds[i], &map_infos[i], |
373 | &info_len); | 375 | &info_len); |
374 | if (CHECK(err || | 376 | if (CHECK(err || |
@@ -394,7 +396,7 @@ static void test_bpf_obj_id(void) | |||
394 | nr_id_found = 0; | 396 | nr_id_found = 0; |
395 | next_id = 0; | 397 | next_id = 0; |
396 | while (!bpf_prog_get_next_id(next_id, &next_id)) { | 398 | while (!bpf_prog_get_next_id(next_id, &next_id)) { |
397 | struct bpf_prog_info prog_info; | 399 | struct bpf_prog_info prog_info = {}; |
398 | int prog_fd; | 400 | int prog_fd; |
399 | 401 | ||
400 | info_len = sizeof(prog_info); | 402 | info_len = sizeof(prog_info); |
@@ -418,6 +420,8 @@ static void test_bpf_obj_id(void) | |||
418 | nr_id_found++; | 420 | nr_id_found++; |
419 | 421 | ||
420 | err = bpf_obj_get_info_by_fd(prog_fd, &prog_info, &info_len); | 422 | err = bpf_obj_get_info_by_fd(prog_fd, &prog_info, &info_len); |
423 | prog_infos[i].jited_prog_insns = 0; | ||
424 | prog_infos[i].xlated_prog_insns = 0; | ||
421 | CHECK(err || info_len != sizeof(struct bpf_prog_info) || | 425 | CHECK(err || info_len != sizeof(struct bpf_prog_info) || |
422 | memcmp(&prog_info, &prog_infos[i], info_len), | 426 | memcmp(&prog_info, &prog_infos[i], info_len), |
423 | "get-prog-info(next_id->fd)", | 427 | "get-prog-info(next_id->fd)", |
@@ -436,7 +440,7 @@ static void test_bpf_obj_id(void) | |||
436 | nr_id_found = 0; | 440 | nr_id_found = 0; |
437 | next_id = 0; | 441 | next_id = 0; |
438 | while (!bpf_map_get_next_id(next_id, &next_id)) { | 442 | while (!bpf_map_get_next_id(next_id, &next_id)) { |
439 | struct bpf_map_info map_info; | 443 | struct bpf_map_info map_info = {}; |
440 | int map_fd; | 444 | int map_fd; |
441 | 445 | ||
442 | info_len = sizeof(map_info); | 446 | info_len = sizeof(map_info); |
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c index af7d173910f4..d3ed7324105e 100644 --- a/tools/testing/selftests/bpf/test_verifier.c +++ b/tools/testing/selftests/bpf/test_verifier.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * License as published by the Free Software Foundation. | 8 | * License as published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <endian.h> | ||
11 | #include <asm/types.h> | 12 | #include <asm/types.h> |
12 | #include <linux/types.h> | 13 | #include <linux/types.h> |
13 | #include <stdint.h> | 14 | #include <stdint.h> |
@@ -1098,7 +1099,7 @@ static struct bpf_test tests[] = { | |||
1098 | "check skb->hash byte load permitted", | 1099 | "check skb->hash byte load permitted", |
1099 | .insns = { | 1100 | .insns = { |
1100 | BPF_MOV64_IMM(BPF_REG_0, 0), | 1101 | BPF_MOV64_IMM(BPF_REG_0, 0), |
1101 | #ifdef __LITTLE_ENDIAN | 1102 | #if __BYTE_ORDER == __LITTLE_ENDIAN |
1102 | BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, | 1103 | BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, |
1103 | offsetof(struct __sk_buff, hash)), | 1104 | offsetof(struct __sk_buff, hash)), |
1104 | #else | 1105 | #else |
@@ -1135,7 +1136,7 @@ static struct bpf_test tests[] = { | |||
1135 | "check skb->hash byte load not permitted 3", | 1136 | "check skb->hash byte load not permitted 3", |
1136 | .insns = { | 1137 | .insns = { |
1137 | BPF_MOV64_IMM(BPF_REG_0, 0), | 1138 | BPF_MOV64_IMM(BPF_REG_0, 0), |
1138 | #ifdef __LITTLE_ENDIAN | 1139 | #if __BYTE_ORDER == __LITTLE_ENDIAN |
1139 | BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, | 1140 | BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, |
1140 | offsetof(struct __sk_buff, hash) + 3), | 1141 | offsetof(struct __sk_buff, hash) + 3), |
1141 | #else | 1142 | #else |
@@ -1244,7 +1245,7 @@ static struct bpf_test tests[] = { | |||
1244 | "check skb->hash half load permitted", | 1245 | "check skb->hash half load permitted", |
1245 | .insns = { | 1246 | .insns = { |
1246 | BPF_MOV64_IMM(BPF_REG_0, 0), | 1247 | BPF_MOV64_IMM(BPF_REG_0, 0), |
1247 | #ifdef __LITTLE_ENDIAN | 1248 | #if __BYTE_ORDER == __LITTLE_ENDIAN |
1248 | BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, | 1249 | BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, |
1249 | offsetof(struct __sk_buff, hash)), | 1250 | offsetof(struct __sk_buff, hash)), |
1250 | #else | 1251 | #else |
@@ -1259,7 +1260,7 @@ static struct bpf_test tests[] = { | |||
1259 | "check skb->hash half load not permitted", | 1260 | "check skb->hash half load not permitted", |
1260 | .insns = { | 1261 | .insns = { |
1261 | BPF_MOV64_IMM(BPF_REG_0, 0), | 1262 | BPF_MOV64_IMM(BPF_REG_0, 0), |
1262 | #ifdef __LITTLE_ENDIAN | 1263 | #if __BYTE_ORDER == __LITTLE_ENDIAN |
1263 | BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, | 1264 | BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, |
1264 | offsetof(struct __sk_buff, hash) + 2), | 1265 | offsetof(struct __sk_buff, hash) + 2), |
1265 | #else | 1266 | #else |
@@ -5422,7 +5423,7 @@ static struct bpf_test tests[] = { | |||
5422 | "check bpf_perf_event_data->sample_period byte load permitted", | 5423 | "check bpf_perf_event_data->sample_period byte load permitted", |
5423 | .insns = { | 5424 | .insns = { |
5424 | BPF_MOV64_IMM(BPF_REG_0, 0), | 5425 | BPF_MOV64_IMM(BPF_REG_0, 0), |
5425 | #ifdef __LITTLE_ENDIAN | 5426 | #if __BYTE_ORDER == __LITTLE_ENDIAN |
5426 | BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, | 5427 | BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, |
5427 | offsetof(struct bpf_perf_event_data, sample_period)), | 5428 | offsetof(struct bpf_perf_event_data, sample_period)), |
5428 | #else | 5429 | #else |
@@ -5438,7 +5439,7 @@ static struct bpf_test tests[] = { | |||
5438 | "check bpf_perf_event_data->sample_period half load permitted", | 5439 | "check bpf_perf_event_data->sample_period half load permitted", |
5439 | .insns = { | 5440 | .insns = { |
5440 | BPF_MOV64_IMM(BPF_REG_0, 0), | 5441 | BPF_MOV64_IMM(BPF_REG_0, 0), |
5441 | #ifdef __LITTLE_ENDIAN | 5442 | #if __BYTE_ORDER == __LITTLE_ENDIAN |
5442 | BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, | 5443 | BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, |
5443 | offsetof(struct bpf_perf_event_data, sample_period)), | 5444 | offsetof(struct bpf_perf_event_data, sample_period)), |
5444 | #else | 5445 | #else |
@@ -5454,7 +5455,7 @@ static struct bpf_test tests[] = { | |||
5454 | "check bpf_perf_event_data->sample_period word load permitted", | 5455 | "check bpf_perf_event_data->sample_period word load permitted", |
5455 | .insns = { | 5456 | .insns = { |
5456 | BPF_MOV64_IMM(BPF_REG_0, 0), | 5457 | BPF_MOV64_IMM(BPF_REG_0, 0), |
5457 | #ifdef __LITTLE_ENDIAN | 5458 | #if __BYTE_ORDER == __LITTLE_ENDIAN |
5458 | BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, | 5459 | BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, |
5459 | offsetof(struct bpf_perf_event_data, sample_period)), | 5460 | offsetof(struct bpf_perf_event_data, sample_period)), |
5460 | #else | 5461 | #else |
@@ -5481,7 +5482,7 @@ static struct bpf_test tests[] = { | |||
5481 | "check skb->data half load not permitted", | 5482 | "check skb->data half load not permitted", |
5482 | .insns = { | 5483 | .insns = { |
5483 | BPF_MOV64_IMM(BPF_REG_0, 0), | 5484 | BPF_MOV64_IMM(BPF_REG_0, 0), |
5484 | #ifdef __LITTLE_ENDIAN | 5485 | #if __BYTE_ORDER == __LITTLE_ENDIAN |
5485 | BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, | 5486 | BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, |
5486 | offsetof(struct __sk_buff, data)), | 5487 | offsetof(struct __sk_buff, data)), |
5487 | #else | 5488 | #else |
@@ -5497,7 +5498,7 @@ static struct bpf_test tests[] = { | |||
5497 | "check skb->tc_classid half load not permitted for lwt prog", | 5498 | "check skb->tc_classid half load not permitted for lwt prog", |
5498 | .insns = { | 5499 | .insns = { |
5499 | BPF_MOV64_IMM(BPF_REG_0, 0), | 5500 | BPF_MOV64_IMM(BPF_REG_0, 0), |
5500 | #ifdef __LITTLE_ENDIAN | 5501 | #if __BYTE_ORDER == __LITTLE_ENDIAN |
5501 | BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, | 5502 | BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, |
5502 | offsetof(struct __sk_buff, tc_classid)), | 5503 | offsetof(struct __sk_buff, tc_classid)), |
5503 | #else | 5504 | #else |
@@ -5980,6 +5981,34 @@ static struct bpf_test tests[] = { | |||
5980 | .result = REJECT, | 5981 | .result = REJECT, |
5981 | .result_unpriv = REJECT, | 5982 | .result_unpriv = REJECT, |
5982 | }, | 5983 | }, |
5984 | { | ||
5985 | "subtraction bounds (map value)", | ||
5986 | .insns = { | ||
5987 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5988 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5989 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5990 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5991 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5992 | BPF_FUNC_map_lookup_elem), | ||
5993 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 9), | ||
5994 | BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0), | ||
5995 | BPF_JMP_IMM(BPF_JGT, BPF_REG_1, 0xff, 7), | ||
5996 | BPF_LDX_MEM(BPF_B, BPF_REG_3, BPF_REG_0, 1), | ||
5997 | BPF_JMP_IMM(BPF_JGT, BPF_REG_3, 0xff, 5), | ||
5998 | BPF_ALU64_REG(BPF_SUB, BPF_REG_1, BPF_REG_3), | ||
5999 | BPF_ALU64_IMM(BPF_RSH, BPF_REG_1, 56), | ||
6000 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), | ||
6001 | BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_0, 0), | ||
6002 | BPF_EXIT_INSN(), | ||
6003 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
6004 | BPF_EXIT_INSN(), | ||
6005 | }, | ||
6006 | .fixup_map1 = { 3 }, | ||
6007 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
6008 | .errstr = "R0 min value is negative, either use unsigned index or do a if (index >=0) check.", | ||
6009 | .result = REJECT, | ||
6010 | .result_unpriv = REJECT, | ||
6011 | }, | ||
5983 | }; | 6012 | }; |
5984 | 6013 | ||
5985 | static int probe_filter_length(const struct bpf_insn *fp) | 6014 | static int probe_filter_length(const struct bpf_insn *fp) |
diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile index e2fbb890aef9..7c647f619d63 100644 --- a/tools/testing/selftests/futex/Makefile +++ b/tools/testing/selftests/futex/Makefile | |||
@@ -14,7 +14,7 @@ all: | |||
14 | done | 14 | done |
15 | 15 | ||
16 | override define RUN_TESTS | 16 | override define RUN_TESTS |
17 | @if [ `dirname $(OUTPUT)` = $(PWD) ]; then ./run.sh; fi | 17 | $(OUTPUT)/run.sh |
18 | endef | 18 | endef |
19 | 19 | ||
20 | override define INSTALL_RULE | 20 | override define INSTALL_RULE |
diff --git a/tools/testing/selftests/kmod/kmod.sh b/tools/testing/selftests/kmod/kmod.sh index 8cecae9a8bca..7956ea3be667 100644..100755 --- a/tools/testing/selftests/kmod/kmod.sh +++ b/tools/testing/selftests/kmod/kmod.sh | |||
@@ -473,8 +473,8 @@ usage() | |||
473 | echo " all Runs all tests (default)" | 473 | echo " all Runs all tests (default)" |
474 | echo " -t Run test ID the number amount of times is recommended" | 474 | echo " -t Run test ID the number amount of times is recommended" |
475 | echo " -w Watch test ID run until it runs into an error" | 475 | echo " -w Watch test ID run until it runs into an error" |
476 | echo " -c Run test ID once" | 476 | echo " -s Run test ID once" |
477 | echo " -s Run test ID x test-count number of times" | 477 | echo " -c Run test ID x test-count number of times" |
478 | echo " -l List all test ID list" | 478 | echo " -l List all test ID list" |
479 | echo " -h|--help Help" | 479 | echo " -h|--help Help" |
480 | echo | 480 | echo |
diff --git a/tools/testing/selftests/ntb/ntb_test.sh b/tools/testing/selftests/ntb/ntb_test.sh index 1c12b5855e4f..5fc7ad359e21 100755 --- a/tools/testing/selftests/ntb/ntb_test.sh +++ b/tools/testing/selftests/ntb/ntb_test.sh | |||
@@ -333,6 +333,10 @@ function ntb_tool_tests() | |||
333 | link_test $LOCAL_TOOL $REMOTE_TOOL | 333 | link_test $LOCAL_TOOL $REMOTE_TOOL |
334 | link_test $REMOTE_TOOL $LOCAL_TOOL | 334 | link_test $REMOTE_TOOL $LOCAL_TOOL |
335 | 335 | ||
336 | #Ensure the link is up on both sides before continuing | ||
337 | write_file Y $LOCAL_TOOL/link_event | ||
338 | write_file Y $REMOTE_TOOL/link_event | ||
339 | |||
336 | for PEER_TRANS in $(ls $LOCAL_TOOL/peer_trans*); do | 340 | for PEER_TRANS in $(ls $LOCAL_TOOL/peer_trans*); do |
337 | PT=$(basename $PEER_TRANS) | 341 | PT=$(basename $PEER_TRANS) |
338 | write_file $MW_SIZE $LOCAL_TOOL/$PT | 342 | write_file $MW_SIZE $LOCAL_TOOL/$PT |
diff --git a/tools/testing/selftests/sysctl/sysctl.sh b/tools/testing/selftests/sysctl/sysctl.sh index ec232c3cfcaa..ec232c3cfcaa 100644..100755 --- a/tools/testing/selftests/sysctl/sysctl.sh +++ b/tools/testing/selftests/sysctl/sysctl.sh | |||
diff --git a/tools/testing/selftests/timers/freq-step.c b/tools/testing/selftests/timers/freq-step.c index e8c61830825a..22312eb4c941 100644 --- a/tools/testing/selftests/timers/freq-step.c +++ b/tools/testing/selftests/timers/freq-step.c | |||
@@ -229,10 +229,9 @@ static void init_test(void) | |||
229 | printf("CLOCK_MONOTONIC_RAW+CLOCK_MONOTONIC precision: %.0f ns\t\t", | 229 | printf("CLOCK_MONOTONIC_RAW+CLOCK_MONOTONIC precision: %.0f ns\t\t", |
230 | 1e9 * precision); | 230 | 1e9 * precision); |
231 | 231 | ||
232 | if (precision > MAX_PRECISION) { | 232 | if (precision > MAX_PRECISION) |
233 | printf("[SKIP]\n"); | 233 | ksft_exit_skip("precision: %.0f ns > MAX_PRECISION: %.0f ns\n", |
234 | ksft_exit_skip(); | 234 | 1e9 * precision, 1e9 * MAX_PRECISION); |
235 | } | ||
236 | 235 | ||
237 | printf("[OK]\n"); | 236 | printf("[OK]\n"); |
238 | srand(ts.tv_sec ^ ts.tv_nsec); | 237 | srand(ts.tv_sec ^ ts.tv_nsec); |