Re: [PATCH v2 07/10] powerpc/perf: support BHRB disable bit and new filtering modes

2020-07-08 Thread Athira Rajeev
> On 08-Jul-2020, at 5:12 PM, Michael Ellerman wrote: > > Athira Rajeev > writes: > >> PowerISA v3.1 has few updates for the Branch History Rolling Buffer(BHRB). > ^ > a >> First is the addition of BHRB disable bit and se

Re: [PATCH v2 09/10] tools/perf: Add perf tools support for extended register capability in powerpc

2020-07-08 Thread Athira Rajeev
> On 08-Jul-2020, at 5:34 PM, Michael Ellerman wrote: > > Athira Rajeev > writes: >> From: Anju T Sudhakar >> >> Add extended regs to sample_reg_mask in the tool side to use >> with `-I?` option. Perf tools side uses extended mask to display >> the platfor

[PATCH v2 4/5] powerpc/lib: Add LKDTM accessor for patching addr

2020-07-08 Thread Christopher M. Riedl
When live patching a STRICT_RWX kernel, a mapping is installed at a "patching address" with temporary write permissions. Provide a LKDTM-only accessor function for this address in preparation for a LKDTM test which attempts to "hijack" this mapping by writing to it from another CPU. Signed-off-by:

[PATCH v2 1/5] powerpc/mm: Introduce temporary mm

2020-07-08 Thread Christopher M. Riedl
x86 supports the notion of a temporary mm which restricts access to temporary PTEs to a single CPU. A temporary mm is useful for situations where a CPU needs to perform sensitive operations (such as patching a STRICT_KERNEL_RWX kernel) requiring temporary mappings without exposing said mappings to

[PATCH 0/5] Use per-CPU temporary mappings for patching

2020-07-08 Thread Christopher M. Riedl
When compiled with CONFIG_STRICT_KERNEL_RWX, the kernel must create temporary mappings when patching itself. These mappings temporarily override the strict RWX text protections to permit a write. Currently, powerpc allocates a per-CPU VM area for patching. Patching occurs as follows: 1. Ma

Re: [PATCH 1/1] KVM/PPC: Fix typo on H_DISABLE_AND_GET hcall

2020-07-08 Thread Paul Mackerras
On Mon, Jul 06, 2020 at 09:48:12PM -0300, Leonardo Bras wrote: > On PAPR+ the hcall() on 0x1B0 is called H_DISABLE_AND_GET, but got > defined as H_DISABLE_AND_GETC instead. > > This define was introduced with a typo in commit > ("[PATCH] powerpc: Extends HCALL interface for InfiniBand usage"), an

[PATCH v2 5/5] powerpc: Add LKDTM test to hijack a patch mapping

2020-07-08 Thread Christopher M. Riedl
When live patching with STRICT_KERNEL_RWX, the CPU doing the patching must use a temporary mapping which allows for writing to kernel text. During the entire window of time when this temporary mapping is in use, another CPU could write to the same mapping and maliciously alter kernel text. Implemen

[PATCH v2 3/5] powerpc/lib: Use a temporary mm for code patching

2020-07-08 Thread Christopher M. Riedl
Currently, code patching a STRICT_KERNEL_RWX exposes the temporary mappings to other CPUs. These mappings should be kept local to the CPU doing the patching. Use the pre-initialized temporary mm and patching address for this purpose. Also add a check after patching to ensure the patch succeeded. U

[PATCH v2 2/5] powerpc/lib: Initialize a temporary mm for code patching

2020-07-08 Thread Christopher M. Riedl
When code patching a STRICT_KERNEL_RWX kernel the page containing the address to be patched is temporarily mapped with permissive memory protections. Currently, a per-cpu vmalloc patch area is used for this purpose. While the patch area is per-cpu, the temporary page mapping is inserted into the ke

Re: [PATCH v2 2/3] powerpc/64s: remove PROT_SAO support

2020-07-08 Thread Paul Mackerras
On Fri, Jul 03, 2020 at 11:19:57AM +1000, Nicholas Piggin wrote: > ISA v3.1 does not support the SAO storage control attribute required to > implement PROT_SAO. PROT_SAO was used by specialised system software > (Lx86) that has been discontinued for about 7 years, and is not thought > to be used el

Re: [PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone

2020-07-08 Thread Palmer Dabbelt
On Sun, 07 Jun 2020 00:59:46 PDT (-0700), a...@ghiti.fr wrote: This is a preparatory patch for relocatable kernel. The kernel used to be linked at PAGE_OFFSET address and used to be loaded physically at the beginning of the main memory. Therefore, we could use the linear mapping for the kernel m

Re: [RFC PATCH v0 2/2] KVM: PPC: Book3S HV: Use H_RPT_INVALIDATE in nested KVM

2020-07-08 Thread Paul Mackerras
On Fri, Jul 03, 2020 at 04:14:20PM +0530, Bharata B Rao wrote: > In the nested KVM case, replace H_TLB_INVALIDATE by the new hcall > H_RPT_INVALIDATE if available. The availability of this hcall > is determined from "hcall-rpt-invalidate" string in ibm,hypertas-functions > DT property. What are we

[PATCH v5 1/2] powerpc/perf/hv-24x7: Add cpu hotplug support

2020-07-08 Thread Kajol Jain
Patch here adds cpu hotplug functions to hv_24x7 pmu. A new cpuhp_state "CPUHP_AP_PERF_POWERPC_HV_24x7_ONLINE" enum is added. The online callback function updates the cpumask only if its empty. As the primary intention of adding hotplug support is to designate a CPU to make HCALL to collect the co

[PATCH v5 0/2] Add cpu hotplug support for powerpc/perf/hv-24x7

2020-07-08 Thread Kajol Jain
This patchset add cpu hotplug support for hv_24x7 driver by adding online/offline cpu hotplug function. It also add sysfs file "cpumask" to expose current online cpu that can be used for hv_24x7 event count. Changelog: v4 -> v5 - Since we are making PMU fail incase hotplug init failed, hence dir

[PATCH v5 2/2] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask

2020-07-08 Thread Kajol Jain
Patch here adds a cpumask attr to hv_24x7 pmu along with ABI documentation. Primary use to expose the cpumask is for the perf tool which has the capability to parse the driver sysfs folder and understand the cpumask file. Having cpumask file will reduce the number of perf command line parameters (

[mm/debug_vm_pgtable] a97a171093: BUG:unable_to_handle_page_fault_for_address

2020-07-08 Thread kernel test robot
Greeting, FYI, we noticed the following commit (built with gcc-9): commit: a97a17109332c3a9e361553adfa383c1e5205f3b ("[PATCH V4 2/4] mm/debug_vm_pgtable: Add tests validating advanced arch page table helpers") url: https://github.com/0day-ci/linux/commits/Anshuman-Khandual/mm-debug_vm_pgtable-A

[PATCH v2 3/3] misc: cxl: flash: Remove unused variable 'drc_index'

2020-07-08 Thread Lee Jones
Keeping the pointer increment though. Fixes the following W=1 kernel build warning: drivers/misc/cxl/flash.c: In function ‘update_devicetree’: drivers/misc/cxl/flash.c:178:16: warning: variable ‘drc_index’ set but not used [-Wunused-but-set-variable] 178 | __be32 *data, drc_index, phandle; |

<    1   2