Pull s390 fixes from Martin Schwidefsky: "Two bug fixes, one to fix a potential information leak in the BPF jit and common-io-layer fix for old firmware levels" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/bpf,jit: initialize A register if 1st insn is BPF_S_LDX_B_MSH s390/chsc: fix SEI usage on old FW levels
Unified · Split
| @@ -276,7 +276,6 @@ static void bpf_jit_noleaks(struct bpf_jit *jit, struct sock_filter *filter) · 275 unmodified lines | ||
| 276 | 276 | case BPF_S_LD_W_IND: |
| 277 | 277 | case BPF_S_LD_H_IND: |
| 278 | 278 | case BPF_S_LD_B_IND: |
| 279 | − case BPF_S_LDX_B_MSH: | |
| 280 | 279 | case BPF_S_LD_IMM: |
| 281 | 280 | case BPF_S_LD_MEM: |
| 282 | 281 | case BPF_S_MISC_TXA: |
| @@ -541,18 +541,27 @@ static void chsc_process_sei_nt0(struct chsc_sei_nt0_area *sei_area) · 540 unmodified lines | ||
| 541 | 541 | |
| 542 | 542 | static void chsc_process_event_information(struct chsc_sei *sei, u64 ntsm) |
| 543 | 543 | { |
| 544 | − do { | |
| 544 | + static int ntsm_unsupported; | |
| 545 | + | |
| 546 | + while (true) { | |
| 545 | 547 | memset(sei, 0, sizeof(*sei)); |
| 546 | 548 | sei->request.length = 0x0010; |
| 547 | 549 | sei->request.code = 0x000e; |
| 548 | − sei->ntsm = ntsm; | |
| 550 | + if (!ntsm_unsupported) | |
| 551 | + sei->ntsm = ntsm; | |
| 549 | 552 | |
| 550 | 553 | if (chsc(sei)) |
| 551 | 554 | break; |
| 552 | 555 | |
| 553 | 556 | if (sei->response.code != 0x0001) { |
| 554 | − CIO_CRW_EVENT(2, "chsc: sei failed (rc=%04x)\n", | |
| 555 | − sei->response.code); | |
| 557 | + CIO_CRW_EVENT(2, "chsc: sei failed (rc=%04x, ntsm=%llx)\n", | |
| 558 | + sei->response.code, sei->ntsm); | |
| 559 | + | |
| 560 | + if (sei->response.code == 3 && sei->ntsm) { | |
| 561 | + /* Fallback for old firmware. */ | |
| 562 | + ntsm_unsupported = 1; | |
| 563 | + continue; | |
| 564 | + } | |
| 556 | 565 | break; |
| 557 | 566 | } |
| 558 | 567 | |
| @@ -568,7 +577,10 @@ static void chsc_process_event_information(struct chsc_sei *sei, u64 ntsm) · 9 unmodified lines | ||
| 568 | 577 | CIO_CRW_EVENT(2, "chsc: unhandled nt: %d\n", sei->nt); |
| 569 | 578 | break; |
| 570 | 579 | } |
| 571 | − } while (sei->u.nt0_area.flags & 0x80); | |
| 580 | + | |
| 581 | + if (!(sei->u.nt0_area.flags & 0x80)) | |
| 582 | + break; | |
| 583 | + } | |
| 572 | 584 | } |
| 573 | 585 | |
| 574 | 586 | /* |