Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Martin Schwidefsky:
"Bug fixes.

Three for our crypto code, two for eBPF, and one memory management fix
to get machines with memory > 8TB working"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/mm: correct return value of pmd_pfn
s390/crypto: fix stckf loop
s390/zcrypt: Fix invalid domain handling during ap module unload
s390/bpf: Fix gcov stack space problem
s390/zcrypt: fixed ap poll timer behavior
s390/bpf: Adjust ALU64_DIV/MOD to match interpreter change

+21 -22
+1 -1
arch/s390/crypto/prng.c
··· 125 125 /* fill page with urandom bytes */ 126 126 get_random_bytes(pg, PAGE_SIZE); 127 127 /* exor page with stckf values */ 128 - for (n = 0; n < sizeof(PAGE_SIZE/sizeof(u64)); n++) { 128 + for (n = 0; n < PAGE_SIZE / sizeof(u64); n++) { 129 129 u64 *p = ((u64 *)pg) + n; 130 130 *p ^= get_tod_clock_fast(); 131 131 }
+1 -1
arch/s390/include/asm/pgtable.h
··· 494 494 return (pmd_val(pmd) & _SEGMENT_ENTRY_LARGE) != 0; 495 495 } 496 496 497 - static inline int pmd_pfn(pmd_t pmd) 497 + static inline unsigned long pmd_pfn(pmd_t pmd) 498 498 { 499 499 unsigned long origin_mask; 500 500
+10 -9
arch/s390/net/bpf_jit_comp.c
··· 443 443 444 444 /* 445 445 * Compile one eBPF instruction into s390x code 446 + * 447 + * NOTE: Use noinline because for gcov (-fprofile-arcs) gcc allocates a lot of 448 + * stack space for the large switch statement. 446 449 */ 447 - static int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i) 450 + static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i) 448 451 { 449 452 struct bpf_insn *insn = &fp->insnsi[i]; 450 453 int jmp_off, last, insn_count = 1; ··· 591 588 EMIT4(0xb9160000, dst_reg, rc_reg); 592 589 break; 593 590 } 594 - case BPF_ALU64 | BPF_DIV | BPF_X: /* dst = dst / (u32) src */ 595 - case BPF_ALU64 | BPF_MOD | BPF_X: /* dst = dst % (u32) src */ 591 + case BPF_ALU64 | BPF_DIV | BPF_X: /* dst = dst / src */ 592 + case BPF_ALU64 | BPF_MOD | BPF_X: /* dst = dst % src */ 596 593 { 597 594 int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; 598 595 ··· 605 602 EMIT4_IMM(0xa7090000, REG_W0, 0); 606 603 /* lgr %w1,%dst */ 607 604 EMIT4(0xb9040000, REG_W1, dst_reg); 608 - /* llgfr %dst,%src (u32 cast) */ 609 - EMIT4(0xb9160000, dst_reg, src_reg); 610 605 /* dlgr %w0,%dst */ 611 - EMIT4(0xb9870000, REG_W0, dst_reg); 606 + EMIT4(0xb9870000, REG_W0, src_reg); 612 607 /* lgr %dst,%rc */ 613 608 EMIT4(0xb9040000, dst_reg, rc_reg); 614 609 break; ··· 633 632 EMIT4(0xb9160000, dst_reg, rc_reg); 634 633 break; 635 634 } 636 - case BPF_ALU64 | BPF_DIV | BPF_K: /* dst = dst / (u32) imm */ 637 - case BPF_ALU64 | BPF_MOD | BPF_K: /* dst = dst % (u32) imm */ 635 + case BPF_ALU64 | BPF_DIV | BPF_K: /* dst = dst / imm */ 636 + case BPF_ALU64 | BPF_MOD | BPF_K: /* dst = dst % imm */ 638 637 { 639 638 int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; 640 639 ··· 650 649 EMIT4(0xb9040000, REG_W1, dst_reg); 651 650 /* dlg %w0,<d(imm)>(%l) */ 652 651 EMIT6_DISP_LH(0xe3000000, 0x0087, REG_W0, REG_0, REG_L, 653 - EMIT_CONST_U64((u32) imm)); 652 + EMIT_CONST_U64(imm)); 654 653 /* lgr %dst,%rc */ 655 654 EMIT4(0xb9040000, dst_reg, rc_reg); 656 655 break;
+9 -11
drivers/s390/crypto/ap_bus.c
··· 1158 1158 poll_timeout = time; 1159 1159 hr_time = ktime_set(0, poll_timeout); 1160 1160 1161 - if (!hrtimer_is_queued(&ap_poll_timer) || 1162 - !hrtimer_forward(&ap_poll_timer, hrtimer_get_expires(&ap_poll_timer), hr_time)) { 1163 - hrtimer_set_expires(&ap_poll_timer, hr_time); 1164 - hrtimer_start_expires(&ap_poll_timer, HRTIMER_MODE_ABS); 1165 - } 1161 + spin_lock_bh(&ap_poll_timer_lock); 1162 + hrtimer_cancel(&ap_poll_timer); 1163 + hrtimer_set_expires(&ap_poll_timer, hr_time); 1164 + hrtimer_start_expires(&ap_poll_timer, HRTIMER_MODE_ABS); 1165 + spin_unlock_bh(&ap_poll_timer_lock); 1166 + 1166 1167 return count; 1167 1168 } 1168 1169 ··· 1529 1528 ktime_t hr_time; 1530 1529 1531 1530 spin_lock_bh(&ap_poll_timer_lock); 1532 - if (hrtimer_is_queued(&ap_poll_timer) || ap_suspend_flag) 1533 - goto out; 1534 - if (ktime_to_ns(hrtimer_expires_remaining(&ap_poll_timer)) <= 0) { 1531 + if (!hrtimer_is_queued(&ap_poll_timer) && !ap_suspend_flag) { 1535 1532 hr_time = ktime_set(0, poll_timeout); 1536 1533 hrtimer_forward_now(&ap_poll_timer, hr_time); 1537 1534 hrtimer_restart(&ap_poll_timer); 1538 1535 } 1539 - out: 1540 1536 spin_unlock_bh(&ap_poll_timer_lock); 1541 1537 } 1542 1538 ··· 1950 1952 { 1951 1953 int i; 1952 1954 1953 - if (ap_domain_index != -1) 1955 + if ((ap_domain_index != -1) && (ap_test_config_domain(ap_domain_index))) 1954 1956 for (i = 0; i < AP_DEVICES; i++) 1955 1957 ap_reset_queue(AP_MKQID(i, ap_domain_index)); 1956 1958 } ··· 2095 2097 hrtimer_cancel(&ap_poll_timer); 2096 2098 destroy_workqueue(ap_work_queue); 2097 2099 tasklet_kill(&ap_tasklet); 2098 - root_device_unregister(ap_root_device); 2099 2100 while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, 2100 2101 __ap_match_all))) 2101 2102 { ··· 2103 2106 } 2104 2107 for (i = 0; ap_bus_attrs[i]; i++) 2105 2108 bus_remove_file(&ap_bus_type, ap_bus_attrs[i]); 2109 + root_device_unregister(ap_root_device); 2106 2110 bus_unregister(&ap_bus_type); 2107 2111 unregister_reset_call(&ap_reset_call); 2108 2112 if (ap_using_interrupts())