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 tag 'powerpc-4.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

- Add handling for a missing instruction in our 32-bit BPF JIT so that
it can be used for seccomp filtering.

- Add a missing NULL pointer check before a function call in new EEH
code.

- Fix an error path in the new ocxl driver to correctly return EFAULT.

- The support for the new ibm,drc-info device tree property turns out
to need several fixes, so for now we just stop advertising to
firmware that we support it until the bugs can be ironed out.

- One fix for the new drmem code which was incorrectly modifying the
device tree in place.

- Finally two fixes for the RFI flush support, so that firmware can
advertise to us that it should be disabled entirely so as not to
affect performance.

Thanks to: Bharata B Rao, Frederic Barrat, Juan J. Alvarez, Mark Lord,
Michael Bringmann.

* tag 'powerpc-4.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/powernv: Support firmware disable of RFI flush
powerpc/pseries: Support firmware disable of RFI flush
powerpc/mm/drmem: Fix unexpected flag value in ibm,dynamic-memory-v2
powerpc/bpf/jit: Fix 32-bit JIT for seccomp_data access
powerpc/pseries: Revert support for ibm,drc-info devtree property
powerpc/pseries: Fix duplicate firmware feature for DRC_INFO
ocxl: Fix potential bad errno on irq allocation
powerpc/eeh: Fix crashes in eeh_report_resume()

+20 -9
+1 -1
arch/powerpc/include/asm/firmware.h
··· 52 52 #define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000) 53 53 #define FW_FEATURE_PRRN ASM_CONST(0x0000000200000000) 54 54 #define FW_FEATURE_DRMEM_V2 ASM_CONST(0x0000000400000000) 55 - #define FW_FEATURE_DRC_INFO ASM_CONST(0x0000000400000000) 55 + #define FW_FEATURE_DRC_INFO ASM_CONST(0x0000000800000000) 56 56 57 57 #ifndef __ASSEMBLY__ 58 58
+2 -1
arch/powerpc/kernel/eeh_driver.c
··· 384 384 eeh_pcid_put(dev); 385 385 pci_uevent_ers(dev, PCI_ERS_RESULT_RECOVERED); 386 386 #ifdef CONFIG_PCI_IOV 387 - eeh_ops->notify_resume(eeh_dev_to_pdn(edev)); 387 + if (eeh_ops->notify_resume && eeh_dev_to_pdn(edev)) 388 + eeh_ops->notify_resume(eeh_dev_to_pdn(edev)); 388 389 #endif 389 390 return NULL; 390 391 }
+1 -1
arch/powerpc/kernel/prom_init.c
··· 874 874 .mmu = 0, 875 875 .hash_ext = 0, 876 876 .radix_ext = 0, 877 - .byte22 = OV5_FEAT(OV5_DRC_INFO), 877 + .byte22 = 0, 878 878 }, 879 879 880 880 /* option vector 6: IBM PAPR hints */
+3 -3
arch/powerpc/mm/drmem.c
··· 98 98 dr_cell->base_addr = cpu_to_be64(lmb->base_addr); 99 99 dr_cell->drc_index = cpu_to_be32(lmb->drc_index); 100 100 dr_cell->aa_index = cpu_to_be32(lmb->aa_index); 101 - dr_cell->flags = cpu_to_be32(lmb->flags); 101 + dr_cell->flags = cpu_to_be32(drmem_lmb_flags(lmb)); 102 102 } 103 103 104 104 static int drmem_update_dt_v2(struct device_node *memory, ··· 121 121 } 122 122 123 123 if (prev_lmb->aa_index != lmb->aa_index || 124 - prev_lmb->flags != lmb->flags) 124 + drmem_lmb_flags(prev_lmb) != drmem_lmb_flags(lmb)) 125 125 lmb_sets++; 126 126 127 127 prev_lmb = lmb; ··· 150 150 } 151 151 152 152 if (prev_lmb->aa_index != lmb->aa_index || 153 - prev_lmb->flags != lmb->flags) { 153 + drmem_lmb_flags(prev_lmb) != drmem_lmb_flags(lmb)) { 154 154 /* end of one set, start of another */ 155 155 dr_cell->seq_lmbs = cpu_to_be32(seq_lmbs); 156 156 dr_cell++;
+3
arch/powerpc/net/bpf_jit_comp.c
··· 327 327 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, len) != 4); 328 328 PPC_LWZ_OFFS(r_A, r_skb, offsetof(struct sk_buff, len)); 329 329 break; 330 + case BPF_LDX | BPF_W | BPF_ABS: /* A = *((u32 *)(seccomp_data + K)); */ 331 + PPC_LWZ_OFFS(r_A, r_skb, K); 332 + break; 330 333 case BPF_LDX | BPF_W | BPF_LEN: /* X = skb->len; */ 331 334 PPC_LWZ_OFFS(r_X, r_skb, offsetof(struct sk_buff, len)); 332 335 break;
+4
arch/powerpc/platforms/powernv/setup.c
··· 80 80 if (np && of_property_read_bool(np, "disabled")) 81 81 enable--; 82 82 83 + np = of_get_child_by_name(fw_features, "speculation-policy-favor-security"); 84 + if (np && of_property_read_bool(np, "disabled")) 85 + enable = 0; 86 + 83 87 of_node_put(np); 84 88 of_node_put(fw_features); 85 89 }
+2 -1
arch/powerpc/platforms/pseries/setup.c
··· 482 482 if (types == L1D_FLUSH_NONE) 483 483 types = L1D_FLUSH_FALLBACK; 484 484 485 - if (!(result.behaviour & H_CPU_BEHAV_L1D_FLUSH_PR)) 485 + if ((!(result.behaviour & H_CPU_BEHAV_L1D_FLUSH_PR)) || 486 + (!(result.behaviour & H_CPU_BEHAV_FAVOUR_SECURITY))) 486 487 enable = false; 487 488 } else { 488 489 /* Default to fallback if case hcall is not available */
+4 -2
drivers/misc/ocxl/file.c
··· 133 133 if (!rc) { 134 134 rc = copy_to_user((u64 __user *) args, &irq_offset, 135 135 sizeof(irq_offset)); 136 - if (rc) 136 + if (rc) { 137 137 ocxl_afu_irq_free(ctx, irq_offset); 138 + return -EFAULT; 139 + } 138 140 } 139 141 break; 140 142 ··· 331 329 332 330 used += sizeof(header); 333 331 334 - rc = (ssize_t) used; 332 + rc = used; 335 333 return rc; 336 334 } 337 335