Re: [RFC PATCH 0/5] powerpc: KASAN for 64-bit Book3E

2019-02-16 Thread Balbir Singh
On Fri, Feb 15, 2019 at 11:04:36AM +1100, Daniel Axtens wrote: > Building on the work of Christophe, Aneesh and Balbir, I've ported > KASAN to the e6500, a 64-bit Book3E processor which doesn't have a > hashed page table. It applies on top of Christophe's series, v5. > > It requires some changes

Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-16 Thread Balbir Singh
On Sat, Feb 16, 2019 at 08:22:12AM -0600, Segher Boessenkool wrote: > Hi all, > > On Sat, Feb 16, 2019 at 09:55:11PM +1100, Balbir Singh wrote: > > On Thu, Feb 14, 2019 at 05:23:39PM +1100, Michael Ellerman wrote: > > > In v4.20 we changed our pgd/pud_present() to check for _PAGE_PRESENT > > >

[RFC PATCH 2/2] powerpc/mm/hash64: Map all the kernel mapping in the same 0xc range

2019-02-16 Thread Aneesh Kumar K.V
This patch maps vmap, IO and vmemap regions in the 0xc address range instead of the current 0xd and 0xf range. This brings the mapping closer to radix translation mode. With hash 64K page size each of this region is 512TB whereas with 4K config we are limitted by the max page table range of 64TB

[RFC PATCH 1/2] powerpc/mm/hash64: Add a variable to track the end of IO mapping

2019-02-16 Thread Aneesh Kumar K.V
NOT-Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash.h| 1 + arch/powerpc/include/asm/book3s/64/pgtable.h | 8 +--- arch/powerpc/include/asm/book3s/64/radix.h | 1 + arch/powerpc/mm/hash_utils_64.c | 1 + arch/powerpc/mm/pgtable-radix.c

Re: [PATCH] powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning

2019-02-16 Thread Meelis Roos
Rather than relying on that we can pass an explict end_pos based on the sizeof(vrsave). The result should be exactly the same but it's more obviously not over-reading/writing the stack and it avoids the compiler warning. It works on my PowerMac G4 with Debian-ports unstable with gcc 8. --

[PATCH] cpufreq: powernv: fix missing check of return value in init_powernv_pstates()

2019-02-16 Thread Yangtao Li
kmalloc() could fail, so insert a check of its return value. And if it fails, returns -ENOMEM. And remove (struct pstate_idx_revmap_data *) to fix coccinelle WARNING by the way. WARNING: casting value returned by memory allocation function to (struct pstate_idx_revmap_data *) is useless.

Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-16 Thread Segher Boessenkool
Hi all, On Sat, Feb 16, 2019 at 09:55:11PM +1100, Balbir Singh wrote: > On Thu, Feb 14, 2019 at 05:23:39PM +1100, Michael Ellerman wrote: > > In v4.20 we changed our pgd/pud_present() to check for _PAGE_PRESENT > > rather than just checking that the value is non-zero, e.g.: > > > > static

Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-16 Thread Andreas Schwab
On Feb 14 2019, Michael Ellerman wrote: > The fix is simple, we need to convert the result of the bitwise && to > an int before returning it. Alternatively, the return type could be changed to bool, so that the compiler does the right thing by itself. Andreas. -- Andreas Schwab,

Re: [PATCH] ASoC: fsl_esai: fix register setting issue in RIGHT_J mode

2019-02-16 Thread Fabio Estevam
Hi Shengjiu, On Fri, Feb 15, 2019 at 9:04 AM S.j. Wang wrote: > > The ESAI_xCR_xWA is xCR's bit, not the xCCR's bit, driver set it to > wrong register, correct it. > > Signed-off-by: Shengjiu Wang Reviewed-by: Fabio Estevam Please add a Fixes tag and Cc stable. Also, it seems that Mark

Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-16 Thread Balbir Singh
On Thu, Feb 14, 2019 at 05:23:39PM +1100, Michael Ellerman wrote: > In v4.20 we changed our pgd/pud_present() to check for _PAGE_PRESENT > rather than just checking that the value is non-zero, e.g.: > > static inline int pgd_present(pgd_t pgd) > { > - return !pgd_none(pgd); > +