Re: [PATCH kernel 5/9] KVM: PPC: Account TCE-containing pages in locked_vm

2015-11-29 Thread Alexey Kardashevskiy
On 11/30/2015 01:06 PM, Paul Mackerras wrote: On Tue, Sep 15, 2015 at 08:49:35PM +1000, Alexey Kardashevskiy wrote: At the moment pages used for TCE tables (in addition to pages addressed by TCEs) are not counted in locked_vm counter so a malicious userspace tool can call ioctl(KVM_CREATE_SPAPR_

[PATCH v13 6/6] QE: Move QE from arch/powerpc to drivers/soc

2015-11-29 Thread Zhao Qiang
ls1 has qe and ls1 has arm cpu. move qe from arch/powerpc to drivers/soc/fsl to adapt to powerpc and arm Signed-off-by: Zhao Qiang --- Changes for v2: - move code to driver/soc Changes for v3: - change drivers/soc/qe to drivers/soc/fsl-qe Changes for v4: - move drivers/soc

[PATCH v13 5/6] QE: use subsys_initcall to init qe

2015-11-29 Thread Zhao Qiang
Use subsys_initcall to init qe to adapt ARM architecture. Remove qe_reset from PowerPC platform file. Signed-off-by: Zhao Qiang --- Changes for v12: - Nil Changes for v13: - drop a print arch/powerpc/platforms/83xx/km83xx.c | 2 -- arch/powerpc/platforms/83xx/mpc832x_mds.c

[PATCH v13 4/6] QE/CPM: move muram management functions to qe_common

2015-11-29 Thread Zhao Qiang
QE and CPM have the same muram, they use the same management functions. Now QE support both ARM and PowerPC, it is necessary to move QE to "driver/soc", so move the muram management functions from cpm_common to qe_common for preparing to move QE code to "driver/soc" Signed-off-by: Zhao Qiang ---

[PATCH v13 3/6] CPM/QE: use genalloc to manage CPM/QE muram

2015-11-29 Thread Zhao Qiang
Use genalloc to manage CPM/QE muram instead of rheap. Signed-off-by: Zhao Qiang --- Changes for v9: - splitted from patch 3/5, modify cpm muram management functions. Changes for v10: - modify cpm muram first, then move to qe_common - modify commit. Changes for v11:

[PATCH v13 2/6] genalloc:support allocating specific region

2015-11-29 Thread Zhao Qiang
Add new algo for genalloc, it reserve a specific region of memory Signed-off-by: Zhao Qiang --- Changes for v9: - reserve a specific region, if the return region - is not during the specific region, return fail. Changes for v10: - rename gen_pool_fixed_fit to gen_pool_fixe

[PATCH v13 1/6] genalloc:support memory-allocation with bytes-alignment to genalloc

2015-11-29 Thread Zhao Qiang
Bytes alignment is required to manage some special RAM, so add gen_pool_first_fit_align to genalloc, meanwhile add gen_pool_alloc_algo to pass algo in case user layer using more than one algo, and pass data to gen_pool_first_fit_align(modify gen_pool_alloc as a wrapper) Signed-off-by: Zhao Qiang

Re: [PATCH V2] powerpc/powernv: Add a kmsg_dumper that flushes console output on panic

2015-11-29 Thread Russell Currey
On Fri, 2015-11-27 at 18:21 +1100, Stewart Smith wrote: > Russell Currey writes: > > On Fri, 2015-11-27 at 16:40 +1100, Stewart Smith wrote: > > > Russell Currey writes: > > > > On BMC machines, console output is controlled by the OPAL firmware and > > > > is > > > > only flushed when its pollers

Re: [PATCH kernel 5/9] KVM: PPC: Account TCE-containing pages in locked_vm

2015-11-29 Thread Paul Mackerras
On Tue, Sep 15, 2015 at 08:49:35PM +1000, Alexey Kardashevskiy wrote: > At the moment pages used for TCE tables (in addition to pages addressed > by TCEs) are not counted in locked_vm counter so a malicious userspace > tool can call ioctl(KVM_CREATE_SPAPR_TCE) as many times as RLIMIT_NOFILE and > l

Re: [PATCH 1/4] powerpc/powernv: panic() on OPAL < V3

2015-11-29 Thread Andrew Donnellan
On 27/11/15 16:36, Andrew Donnellan wrote: Reviewed-by: Andrew Donnellan And withdrawing my Reviewed-by: because apparently I'm not capable of spotting missing semicolons, please move the semicolon from patch 2 to this patch... Andrew -- Andrew Donnellan Software Engineer,

[P.A. Semi] Does the ethernet interface work on your Electra, Chitra, Nemo, and Athena board?

2015-11-29 Thread Christian Zigotzky
Hi All, Does the ethernet interface on your Electra, Chitra, Nemo, and Athena board work with the release candidates of the kernel 4.4? Unfortunately the P.A. Semi ethernet doesn't work on our Nemo boards with the release candidates of the kernel 4.4. We have set the following entries in the

Re: [RFC] kvm - possible out of bounds

2015-11-29 Thread Geyslan Gregório Bem
2015-11-29 18:33 GMT-03:00 Paul Mackerras : > On Sun, Nov 29, 2015 at 05:14:03PM -0300, Geyslan Gregório Bem wrote: >> Hello, >> >> I have found a possible out of bounds reading in >> arch/powerpc/kvm/book3s_64_mmu.c (kvmppc_mmu_book3s_64_xlate >> function). pteg[] array could be accessed twice usi

Re: [RFC] kvm - possible out of bounds

2015-11-29 Thread Paul Mackerras
On Sun, Nov 29, 2015 at 05:14:03PM -0300, Geyslan Gregório Bem wrote: > Hello, > > I have found a possible out of bounds reading in > arch/powerpc/kvm/book3s_64_mmu.c (kvmppc_mmu_book3s_64_xlate > function). pteg[] array could be accessed twice using the i variable > after the for iteration. What

[RFC] kvm - possible out of bounds

2015-11-29 Thread Geyslan Gregório Bem
Hello, I have found a possible out of bounds reading in arch/powerpc/kvm/book3s_64_mmu.c (kvmppc_mmu_book3s_64_xlate function). pteg[] array could be accessed twice using the i variable after the for iteration. What happens is that in the last iteration the i index is incremented to 16, checked (i