[PATCH] drivers: cpuidle: This patch fix the following checkpatch warning.

2019-04-17 Thread Mohan Kumar
Use pr_debug instead of printk WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... Signed-off-by: Mohan Kumar --- drivers/cpuidle/cpuidle-pseries.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] powerpc/mm/radix: Make Radix require HUGETLB_PAGE

2019-04-17 Thread Michael Ellerman
Joel reported weird crashes using skiroot_defconfig, in his case we jumped into an NX page: kernel tried to execute exec-protected page (c2bff4f0) - exploit attempt? (uid: 0) BUG: Unable to handle kernel instruction fetch Faulting instruction address: 0xc2bff4f0 Looking at

Re: Linux 5.1-rc5

2019-04-17 Thread Martin Schwidefsky
On Tue, 16 Apr 2019 09:49:46 -0700 Linus Torvalds wrote: > On Tue, Apr 16, 2019 at 9:16 AM Linus Torvalds > wrote: > > > > We actually already *have* this function. > > > > It's called "gup_fast_permitted()" and it's used by x86-64 to verify > > the proper address range. Exactly like s390 needs.

Re: Linux 5.1-rc5

2019-04-17 Thread Martin Schwidefsky
On Wed, 17 Apr 2019 09:46:37 +0200 Martin Schwidefsky wrote: > On Tue, 16 Apr 2019 09:49:46 -0700 > Linus Torvalds wrote: > > > On Tue, Apr 16, 2019 at 9:16 AM Linus Torvalds > > wrote: > > > > > > We actually already *have* this function. > > > > > > It's called "gup_fast_permitted()" and i

Re: [PATCH] powerpc/mm/radix: Make Radix require HUGETLB_PAGE

2019-04-17 Thread Michael Ellerman
Michael Ellerman writes: > Joel reported weird crashes using skiroot_defconfig, in his case we > jumped into an NX page: > > kernel tried to execute exec-protected page (c2bff4f0) - exploit > attempt? (uid: 0) > BUG: Unable to handle kernel instruction fetch > Faulting instruction a

Re: [PATCH V2 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-17 Thread S.j. Wang
Hi > > > On Thu, Apr 11, 2019 at 09:39:06AM +, S.j. Wang wrote: > > > +/* > > + * Select the pre-processing and post-processing options > > By aligning with other function comments: > /** > * Select the pre-processing and post-processing options > > > + * > > + * Fsin: input sample rate

[PATCH V3 0/2] Support more sample rate in asrc

2019-04-17 Thread S.j. Wang
Support more sample rate in asrc Shengjiu Wang (2): ASoC: fsl_asrc: replace the process_option table with function ASoC: fsl_asrc: Unify the supported input and output rate Changes in v3 - remove FSL_ASRC_RATES - refine fsl_asrc_sel_proc according to comments Changes in v2 - add more comment

[PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-17 Thread S.j. Wang
When we want to support more sample rate, for example 12kHz/24kHz we need update the process_option table, if we want to support more sample rate next time, the table need to be updated again. which is not flexible. We got a function fsl_asrc_sel_proc to replace the table, which can give the pre-p

[PATCH V3 2/2] ASoC: fsl_asrc: Unify the supported input and output rate

2019-04-17 Thread S.j. Wang
Unify the supported input and output rate, add the 12kHz/24kHz/128kHz to the support list Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_as

Re: [PATCH v3 00/26] compat_ioctl: cleanups

2019-04-17 Thread Arnd Bergmann
On Wed, Apr 17, 2019 at 12:33 AM Douglas Gilbert wrote: > > On 2019-04-16 4:19 p.m., Arnd Bergmann wrote: > > Hi Al, > > > > It took me way longer than I had hoped to revisit this series, see > > https://lore.kernel.org/lkml/20180912150142.157913-1-a...@arndb.de/ > > for the previously posted vers

[PATCH v3 11/21] docs: hwmon: ibmpowernv: convert to ReST format

2019-04-17 Thread Mauro Carvalho Chehab
Convert ibmpowernv to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/ibmpowernv | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/Documentation/hwmon/ibmpowernv b/Documenta

[PATCH v3 21/21] docs: hwmon: Add an index file and rename docs to *.rst

2019-04-17 Thread Mauro Carvalho Chehab
Now that all files were converted to ReST format, rename them and add an index. Signed-off-by: Mauro Carvalho Chehab --- .../devicetree/bindings/hwmon/g762.txt| 2 +- Documentation/hwmon/{ab8500 => ab8500.rst}| 2 +- ...guru-datasheet => abituguru-datasheet.rst} | 0 .../hwmon/

Re: [PATCH v2 00/21] Convert hwmon documentation to ReST

2019-04-17 Thread Mauro Carvalho Chehab
indeed automated) > >> can be generated and pushed right after a commit window closes. Would > >> that by any chance be possible ? > > > > No, those patches are hand-maid, but I can surely rebase it on the top of > > your tree. Is your tree already merged at linux-next, or should I use some > > other branch/tree for rebase? > > > > linux-next merges hwmon-next. next-20190416 is missing one patch which touches > Documentation/hwmon, but that should be easy to deal with. Ok, did a rebase on the top of next-20190417. While re-reading the output of the html files, I noticed a few minor issues on some tables and fixed. Thanks, Mauro

Re: [PATCH v3 21/21] docs: hwmon: Add an index file and rename docs to *.rst

2019-04-17 Thread Liviu Dudau
On Wed, Apr 17, 2019 at 06:46:29AM -0300, Mauro Carvalho Chehab wrote: > Now that all files were converted to ReST format, rename them > and add an index. > > Signed-off-by: Mauro Carvalho Chehab > --- > .../devicetree/bindings/hwmon/g762.txt| 2 +- > Documentation/hwmon/{ab8500 => ab8

Re: [PATCH v3 7/8] powerpc/mm: Consolidate radix and hash address map details

2019-04-17 Thread Michael Ellerman
Nicholas Piggin writes: > Aneesh Kumar K.V's on April 16, 2019 8:07 pm: >> We now have >> >> 4K page size config >> >> kernel_region_map_size = 16TB >> kernel vmalloc start = 0xc0001000 >> kernel IO start= 0xc0002000 >> kernel vmemmap start = 0xc0003000 >>

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

2019-04-17 Thread Aneesh Kumar K.V
This makes it easy to update the region mapping in the later patch Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash.h| 3 ++- arch/powerpc/include/asm/book3s/64/pgtable.h | 8 +--- arch/powerpc/include/asm/book3s/64/radix.h | 1 + arch/powerpc/mm/hash_utils_6

[PATCH v4 0/8] Update hash MMU kernel mapping to be in sync with radix

2019-04-17 Thread Aneesh Kumar K.V
This patch series map all the kernel regions (vmalloc, IO and vmemmap) using 0xc top nibble address. This brings hash translation kernel mapping in sync with radix. Each of these regions can now map 512TB. We use one context to map these regions and hence the 512TB limit. We also update radix to u

[PATCH v4 2/8] powerpc/mm/hash64: Map all the kernel regions in the same 0xc range

2019-04-17 Thread Aneesh Kumar K.V
This patch maps vmalloc, 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 limited by the max page table range of 64TB

[PATCH v4 3/8] powerpc/mm: Validate address values against different region limits

2019-04-17 Thread Aneesh Kumar K.V
This adds an explicit check in various functions. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/hash_utils_64.c | 18 +++--- arch/powerpc/mm/pgtable-hash64.c | 13 ++--- arch/powerpc/mm/pgtable-radix.c | 16 arch/powerpc/mm/pgtable_64.c | 5 +

[PATCH v4 4/8] powerpc/mm: Drop the unnecessary region check

2019-04-17 Thread Aneesh Kumar K.V
All the regions are now mapped with top nibble 0xc. Hence the region id check is not needed for virt_addr_valid() Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/page.h | 12 1 file changed, 12 deletions(-) diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/in

[PATCH v4 5/8] powerpc/mm/hash: Simplify the region id calculation.

2019-04-17 Thread Aneesh Kumar K.V
This reduces multiple comparisons in get_region_id to a bit shift operation. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-4k.h | 4 ++- arch/powerpc/include/asm/book3s/64/hash-64k.h | 1 + arch/powerpc/include/asm/book3s/64/hash.h | 31 +-- a

[PATCH v4 6/8] powerpc/mm: Print kernel map details to dmesg

2019-04-17 Thread Aneesh Kumar K.V
This helps in debugging. We can look at the dmesg to find out different kernel mapping details. On 4K config this shows kernel vmalloc start = 0xc0001000 kernel IO start= 0xc0002000 kernel vmemmap start = 0xc0003000 On 64K config: kernel vmalloc start =

[PATCH v4 7/8] powerpc/mm/hash: Rename KERNEL_REGION_ID to LINEAR_MAP_REGION_ID

2019-04-17 Thread Aneesh Kumar K.V
The region actually point to linear map. Rename the #define to clarify thati. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash.h | 4 ++-- arch/powerpc/include/asm/book3s/64/mmu-hash.h | 2 +- arch/powerpc/mm/copro_fault.c | 4 ++-- arch/powerpc/mm/

[PATCH v4 8/8] powerpc/mm/hash/4K: Update the vmalloc start for hash 4K config

2019-04-17 Thread Aneesh Kumar K.V
This updates hash 4k VMALLOC_START to 0xc008. Our page table still limit max addr to 64TB. But with hash translation we map only vmalloc and IO region and we ignore top bits (0xc008) when mapping the addr to page table. That means VMALLOC_START get mapped as 0 addr on linux page table.

[PATCH v3 0/6] Reduce memory usage for mm_context_t

2019-04-17 Thread Aneesh Kumar K.V
This patch moves hash translation related context variables to another structure and runtime allocate that based on translation mode. Aneesh Kumar K.V (6): powerpc/mm/radix: Do slb preload only with hash translation mode powerpc/mm: Remove PPC_MM_SLICES #ifdef for book3s64 powerpc/mm: Add he

[PATCH v3 2/6] powerpc/mm: Remove PPC_MM_SLICES #ifdef for book3s64

2019-04-17 Thread Aneesh Kumar K.V
Book3s64 always have PPC_MM_SLICES enabled. So remove the unncessary #ifdef Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/mmu.h | 4 arch/powerpc/include/asm/book3s/64/slice.h | 13 - 2 files changed, 17 deletions(-) diff --git a/arch/powerpc/include

[PATCH v3 1/6] powerpc/mm/radix: Do slb preload only with hash translation mode

2019-04-17 Thread Aneesh Kumar K.V
Add radix_enabled check to avoid slb preload with radix translation. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/kernel/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index dd9e0d5386ee..f7b2e3b3d

[PATCH v3 3/6] powerpc/mm: Add helpers for accessing hash translation related variables

2019-04-17 Thread Aneesh Kumar K.V
We want to switch to allocating them runtime only when hash translation is enabled. Add helpers so that both book3s and nohash can be adapted to upcoming change easily. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/mmu-hash.h | 4 +- arch/powerpc/include/asm/book3s/64/m

[PATCH v3 4/6] powerpc/mm: Move slb_addr_linit to early_init_mmu

2019-04-17 Thread Aneesh Kumar K.V
Avoid #ifdef in generic code. Also enables us to do this specific to MMU translation mode on book3s64 Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/kernel/setup-common.c | 11 --- arch/powerpc/mm/hash_utils_64.c| 2 ++ arch/powerpc/mm/tlb_nohash.c | 6 ++ 3 files chang

[PATCH v3 5/6] powerpc/mm: Reduce memory usage for mm_context_t for radix

2019-04-17 Thread Aneesh Kumar K.V
Currently, our mm_context_t on book3s64 include all hash specific context details like slice mask and subpage protection details. We can skip allocating these with radix translation. This will help us to save 8K per mm_context with radix translation. With the patch applied we have sizeof(mm_conte

[PATCH v3 6/6] powerc/mm/hash: Reduce hash_mm_context size

2019-04-17 Thread Aneesh Kumar K.V
Allocate subpage protect related variables only if we use the feature. This helps in reducing the hash related mm context struct by around 4K Before the patch sizeof(struct hash_mm_context) = 8288 After the patch sizeof(struct hash_mm_context) = 4160 Signed-off-by: Aneesh Kumar K.V --- arch/p

Re: [PATCH v5 10/10] powerpc/mm: Detect bad KUAP faults

2019-04-17 Thread Michael Ellerman
Christophe Leroy writes: > Le 08/03/2019 à 02:16, Michael Ellerman a écrit : >> When KUAP is enabled we have logic to detect page faults that occur >> outside of a valid user access region and are blocked by the AMR. >> >> What we don't have at the moment is logic to detect a fault *within* a >>

Re: [PATCH v5 10/10] powerpc/mm: Detect bad KUAP faults

2019-04-17 Thread Michael Ellerman
christophe leroy writes: > Le 08/03/2019 à 09:53, Christophe Leroy a écrit : >> Le 08/03/2019 à 02:16, Michael Ellerman a écrit : ... >>> diff --git a/arch/powerpc/include/asm/book3s/64/kup-radix.h >>> b/arch/powerpc/include/asm/book3s/64/kup-radix.h >>> index 3d60b04fc3f6..8d2ddc61e92e 100644 >>

Re: [PATCH v4 1/7] ocxl: Split pci.c

2019-04-17 Thread Frederic Barrat
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit : From: Alastair D'Silva In preparation for making core code available for external drivers, move the core code out of pci.c and into core.c Signed-off-by: Alastai Acked-by: Frederic Barrat drivers/misc/ocxl/Makefile| 1 +

Re: [PATCH v4 2/7] ocxl: Don't pass pci_dev around

2019-04-17 Thread Frederic Barrat
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit : From: Alastair D'Silva This data is already available in a struct Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/misc/ocxl/core.c | 38 +- 1 file changed, 21 insertions(+),

Re: [PATCH v5 09/10] powerpc/64s: Implement KUAP for Radix MMU

2019-04-17 Thread Michael Ellerman
Christophe Leroy writes: > Le 08/03/2019 à 02:16, Michael Ellerman a écrit : ... >> diff --git a/arch/powerpc/include/asm/book3s/64/kup-radix.h >> b/arch/powerpc/include/asm/book3s/64/kup-radix.h >> new file mode 100644 >> index ..3d60b04fc3f6 >> --- /dev/null >> +++ b/arch/powerpc/in

[PATCH] drivers: cpuidle: This patch fix the following checkpatch warning.

2019-04-17 Thread Mohan Kumar
Use pr_debug instead of printk WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... Signed-off-by: Mohan Kumar --- drivers/cpuidle/cpuidle-powernv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH -next] ALSA: ps3: Remove set but not used variables 'start_vaddr' and 'pcm_index'

2019-04-17 Thread Yue Haibing
From: YueHaibing Fixes gcc '-Wunused-but-set-variable' warnings: sound/ppc/snd_ps3.c: In function 'snd_ps3_program_dma': sound/ppc/snd_ps3.c:236:8: warning: variable 'start_vaddr' set but not used [-Wunused-but-set-variable] sound/ppc/snd_ps3.c: In function 'snd_ps3_pcm_open': sound/ppc/snd_ps3

[PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'

2019-04-17 Thread Yue Haibing
From: YueHaibing Fixes gcc '-Wunused-but-set-variable' warning: sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div': sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable] It is never used since introduction in commit 47a70e6fc9a8 ("ASoC: Add M

Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'

2019-04-17 Thread Daniel Baluta
Hi Yue, Looks good to me. Just one question for Cosmin: On Wed, Apr 17, 2019 at 6:10 PM Yue Haibing wrote: > > From: YueHaibing > > Fixes gcc '-Wunused-but-set-variable' warning: > > sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div': > sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'os

Re: [PATCH v4 3/7] ocxl: Create a clear delineation between ocxl backend & frontend

2019-04-17 Thread Frederic Barrat
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit : From: Alastair D'Silva The OCXL driver contains both frontend code for interacting with userspace, as well as backend code for interacting with the hardware. This patch separates the backend code from the frontend so that it can be used by o

Re: [PATCH v4 4/7] ocxl: Allow external drivers to use OpenCAPI contexts

2019-04-17 Thread Frederic Barrat
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit : From: Alastair D'Silva Most OpenCAPI operations require a valid context, so exposing these functions to external drivers is necessary. Signed-off-by: Alastair D'Silva Reviewed-by: Greg Kurz --- There's a small memory leak in here on con

Re: [PATCH v4 5/7] ocxl: afu_irq only deals with IRQ IDs, not offsets

2019-04-17 Thread Frederic Barrat
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit : From: Alastair D'Silva The use of offsets is required only in the frontend, so alter the IRQ API to only work with IRQ IDs in the backend. Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/misc/ocxl/afu_irq.c

Re: [PATCH v4 6/7] ocxl: move event_fd handling to frontend

2019-04-17 Thread Frederic Barrat
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit : From: Alastair D'Silva Event_fd is only used in the driver frontend, so it does not need to exist in the backend code. Relocate it to the frontend and provide an opaque mechanism for consumers instead. Signed-off-by: Alastair D'Silva ---

Re: [PATCH v4 7/7] ocxl: Provide global MMIO accessors for external drivers

2019-04-17 Thread Frederic Barrat
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit : From: Alastair D'Silva External drivers that communicate via OpenCAPI will need to make MMIO calls to interact with the devices. Signed-off-by: Alastair D'Silva Reviewed-by: Greg Kurz --- Acked-by: Frederic Barrat And that's the final

Applied "ASoC: fsl_micfil: Remove set but not used variable 'osr'" to the asoc tree

2019-04-17 Thread Mark Brown
The patch ASoC: fsl_micfil: Remove set but not used variable 'osr' has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24

Re: [PATCH v3 21/21] docs: hwmon: Add an index file and rename docs to *.rst

2019-04-17 Thread Guenter Roeck
On Wed, Apr 17, 2019 at 06:46:29AM -0300, Mauro Carvalho Chehab wrote: > Now that all files were converted to ReST format, rename them > and add an index. > > Signed-off-by: Mauro Carvalho Chehab > Acked-by: Liviu Dudau I applied all patches except this one, which fails due to a conflict in ab8

Re: [PATCH v3 21/21] docs: hwmon: Add an index file and rename docs to *.rst

2019-04-17 Thread Guenter Roeck
On Wed, Apr 17, 2019 at 09:47:41AM -0700, Guenter Roeck wrote: > On Wed, Apr 17, 2019 at 06:46:29AM -0300, Mauro Carvalho Chehab wrote: > > Now that all files were converted to ReST format, rename them > > and add an index. > > > > Signed-off-by: Mauro Carvalho Chehab > > Acked-by: Liviu Dudau >

Re: Linux 5.1-rc5

2019-04-17 Thread Linus Torvalds
On Wed, Apr 17, 2019 at 1:02 AM Martin Schwidefsky wrote: > > Grumpf, that does *not* work. For gup the table entries may be read only > once. Now I remember why I open-coded p4d_offset, pud_offset and pmd_offset > in arch/s390/mm/gup.c, to avoid to read the table entries twice. > It will be hard

Re: [PATCH v3 21/21] docs: hwmon: Add an index file and rename docs to *.rst

2019-04-17 Thread Mauro Carvalho Chehab
Em Wed, 17 Apr 2019 09:47:41 -0700 Guenter Roeck escreveu: > On Wed, Apr 17, 2019 at 06:46:29AM -0300, Mauro Carvalho Chehab wrote: > > Now that all files were converted to ReST format, rename them > > and add an index. > > > > Signed-off-by: Mauro Carvalho Chehab > > Acked-by: Liviu Dudau >

Re: [PATCH v3 21/21] docs: hwmon: Add an index file and rename docs to *.rst

2019-04-17 Thread Mauro Carvalho Chehab
Em Wed, 17 Apr 2019 14:13:52 -0300 Mauro Carvalho Chehab escreveu: > Em Wed, 17 Apr 2019 09:47:41 -0700 > Guenter Roeck escreveu: > > > On Wed, Apr 17, 2019 at 06:46:29AM -0300, Mauro Carvalho Chehab wrote: > > > Now that all files were converted to ReST format, rename them > > > and add an i

Re: [PATCH v3 21/21] docs: hwmon: Add an index file and rename docs to *.rst

2019-04-17 Thread Guenter Roeck
On Wed, Apr 17, 2019 at 02:22:15PM -0300, Mauro Carvalho Chehab wrote: > Em Wed, 17 Apr 2019 14:13:52 -0300 > Mauro Carvalho Chehab escreveu: > > > Em Wed, 17 Apr 2019 09:47:41 -0700 > > Guenter Roeck escreveu: > > > > > On Wed, Apr 17, 2019 at 06:46:29AM -0300, Mauro Carvalho Chehab wrote: >

Re: [PATCH v3 21/21] docs: hwmon: Add an index file and rename docs to *.rst

2019-04-17 Thread Guenter Roeck
On Wed, Apr 17, 2019 at 10:43:37AM -0700, Guenter Roeck wrote: > On Wed, Apr 17, 2019 at 02:22:15PM -0300, Mauro Carvalho Chehab wrote: > > Em Wed, 17 Apr 2019 14:13:52 -0300 > > Mauro Carvalho Chehab escreveu: > > > > > Em Wed, 17 Apr 2019 09:47:41 -0700 > > > Guenter Roeck escreveu: > > > > >

Re: [PATCH -next] ALSA: ps3: Remove set but not used variables 'start_vaddr' and 'pcm_index'

2019-04-17 Thread Geoff Levand
On 4/17/19 7:57 AM, Yue Haibing wrote: > From: YueHaibing > > Fixes gcc '-Wunused-but-set-variable' warnings: > > sound/ppc/snd_ps3.c: In function 'snd_ps3_program_dma': > sound/ppc/snd_ps3.c:236:8: warning: variable 'start_vaddr' set but not used > [-Wunused-but-set-variable] > sound/ppc/snd_p

Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'

2019-04-17 Thread Nicolin Chen
On Wed, Apr 17, 2019 at 06:25:11PM +0300, Daniel Baluta wrote: > Looks good to me. Just one question for Cosmin: > > diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c > > index 40c07e7..f7f2d29 100644 > > --- a/sound/soc/fsl/fsl_micfil.c > > +++ b/sound/soc/fsl/fsl_micfil.c > >

Re: [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-17 Thread Nicolin Chen
Hi Shengjiu, This looks better. Just a couple of more small comments inline. On Wed, Apr 17, 2019 at 09:06:18AM +, S.j. Wang wrote: > +static int fsl_asrc_sel_proc(int inrate, int outrate, int *pre_proc, > + int *post_proc) Just a nit: it looks better by grouping th

Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'

2019-04-17 Thread Nicolin Chen
On Wed, Apr 17, 2019 at 09:58:37PM +0300, gabrielc...@gmail.com wrote: > Nicolin, I am pretty sure I've ran the get_maintainer.pl script but > I will pay more attention next time... sorry if I forgot to add you. It's okay for that one as I trust Mark's review anyway. Just adding us would offload

Re: [PATCH -next] ALSA: ps3: Remove set but not used variables 'start_vaddr' and 'pcm_index'

2019-04-17 Thread Takashi Iwai
On Wed, 17 Apr 2019 20:19:30 +0200, Geoff Levand wrote: > > On 4/17/19 7:57 AM, Yue Haibing wrote: > > From: YueHaibing > > > > Fixes gcc '-Wunused-but-set-variable' warnings: > > > > sound/ppc/snd_ps3.c: In function 'snd_ps3_program_dma': > > sound/ppc/snd_ps3.c:236:8: warning: variable 'start

Re: [PATCH v3 10/26] compat_ioctl: use correct compat_ptr() translation in drivers

2019-04-17 Thread Al Viro
On Tue, Apr 16, 2019 at 10:19:48PM +0200, Arnd Bergmann wrote: > A handful of drivers all have a trivial wrapper around their ioctl > handler, but don't call the compat_ptr() conversion function at the > moment. In practice this does not matter, since none of them are used > on the s390 architectur

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-04-17 Thread Thiago Jung Bauermann
Michael S. Tsirkin writes: > On Thu, Mar 21, 2019 at 09:05:04PM -0300, Thiago Jung Bauermann wrote: >> >> Michael S. Tsirkin writes: >> >> > On Wed, Mar 20, 2019 at 01:13:41PM -0300, Thiago Jung Bauermann wrote: >> >> >From what I understand of the ACCESS_PLATFORM definition, the host will >>

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-04-17 Thread Thiago Jung Bauermann
David Gibson writes: > On Sat, Mar 23, 2019 at 05:01:35PM -0400, Michael S. Tsirkin wrote: >> On Thu, Mar 21, 2019 at 09:05:04PM -0300, Thiago Jung Bauermann wrote: >> > Michael S. Tsirkin writes: > [snip] >> > >> > Is there any justification to doing that beyond someone putting >> > >> > out

Re: [PATCH] Linux: Define struct termios2 in under _GNU_SOURCE [BZ #10339]

2019-04-17 Thread Joseph Myers
On Tue, 9 Apr 2019, Florian Weimer wrote: > diff --git a/sysdeps/unix/sysv/linux/Makefile > b/sysdeps/unix/sysv/linux/Makefile > index 52ac6ad484..4cb5e4f0d2 100644 > --- a/sysdeps/unix/sysv/linux/Makefile > +++ b/sysdeps/unix/sysv/linux/Makefile > @@ -156,6 +156,7 @@ endif > > ifeq ($(subdir)

Re: [PATCH] Linux: Define struct termios2 in under _GNU_SOURCE [BZ #10339]

2019-04-17 Thread H. Peter Anvin
On 4/15/19 10:22 AM, Adhemerval Zanella wrote: >> >> New interfaces are only necessary for the handful of architectures that >> don't have the speed fields *and* to space to put them in. > > Based on your WIP, it seems that both sparc and mips could be adapted. > Do we still have glibc supported

Re: [PATCH] Linux: Define struct termios2 in under _GNU_SOURCE [BZ #10339]

2019-04-17 Thread H. Peter Anvin
On 4/16/19 2:59 AM, Florian Weimer wrote: > * hpa: > >> Using symbol versioning doesn't really help much since the real >> problem is that struct termios can be passed around in userspace, and >> the interfaces between user space libraries don't have any >> versioning. However, my POC code deals w

Re: [PATCH v4 2/8] powerpc/mm/hash64: Map all the kernel regions in the same 0xc range

2019-04-17 Thread kbuild test robot
Hi "Aneesh, I love your patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.1-rc5 next-20190417] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/

Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'

2019-04-17 Thread gabrielcsmo
On Wed, 2019-04-17 at 11:35 -0700, Nicolin Chen wrote: > On Wed, Apr 17, 2019 at 06:25:11PM +0300, Daniel Baluta wrote: > > > Looks good to me. Just one question for Cosmin: > > > diff --git a/sound/soc/fsl/fsl_micfil.c > > > b/sound/soc/fsl/fsl_micfil.c > > > index 40c07e7..f7f2d29 100644 > > > -

Re: [PATCH RFT V2 2/8] clk: fractional-divider: add explicit big endian support

2019-04-17 Thread Stephen Boyd
Quoting Jonas Gorski (2019-04-15 03:10:40) > diff --git a/drivers/clk/clk-fractional-divider.c > b/drivers/clk/clk-fractional-divider.c > index fdfe2e423d15..b9988d3b3828 100644 > --- a/drivers/clk/clk-fractional-divider.c > +++ b/drivers/clk/clk-fractional-divider.c > @@ -13,6 +13,22 @@ > #inclu

Re: [PATCH RFT V2 1/8] clk: divider: add explicit big endian support

2019-04-17 Thread Stephen Boyd
Quoting Jonas Gorski (2019-04-15 03:10:39) > @@ -370,7 +388,7 @@ static long clk_divider_round_rate(struct clk_hw *hw, > unsigned long rate, > if (divider->flags & CLK_DIVIDER_READ_ONLY) { > u32 val; > > - val = clk_readl(divider->reg) >> divider->shift; > +

Re: [PATCH v3] powerpc/pseries: Only wait for dying CPU after call to rtas_stop_self()

2019-04-17 Thread Thiago Jung Bauermann
Hello Nick, Thank you very much for reviewing this patch! Nicholas Piggin writes: > Thiago Jung Bauermann's on April 11, 2019 9:08 am: >> >> Thiago Jung Bauermann writes: >> >>> diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c >>> b/arch/powerpc/platforms/pseries/hotplug-cpu.c >>>

Re: [PATCH v3 7/8] powerpc/mm: Consolidate radix and hash address map details

2019-04-17 Thread Nicholas Piggin
Michael Ellerman's on April 17, 2019 10:34 pm: > Nicholas Piggin writes: >> Aneesh Kumar K.V's on April 16, 2019 8:07 pm: >>> We now have >>> >>> 4K page size config >>> >>> kernel_region_map_size = 16TB >>> kernel vmalloc start = 0xc0001000 >>> kernel IO start= 0xc00020

Re: [PATCH v3] powerpc/pseries: Only wait for dying CPU after call to rtas_stop_self()

2019-04-17 Thread Nicholas Piggin
Thiago Jung Bauermann's on April 18, 2019 11:00 am: > > Hello Nick, > > Thank you very much for reviewing this patch! > > Nicholas Piggin writes: > >> Thiago Jung Bauermann's on April 11, 2019 9:08 am: >>> >>> Thiago Jung Bauermann writes: >>> diff --git a/arch/powerpc/platforms/pseries/

Re: [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-17 Thread S.j. Wang
Hi > > Hi Shengjiu, > > This looks better. Just a couple of more small comments inline. > > On Wed, Apr 17, 2019 at 09:06:18AM +, S.j. Wang wrote: > > > +static int fsl_asrc_sel_proc(int inrate, int outrate, int *pre_proc, > > + int *post_proc) > > Just a nit: it

[PATCH] ASoC: fsl_esai: Add pm runtime function

2019-04-17 Thread S.j. Wang
In imx8 when systerm enter suspend state, the power of subsystem will be off, the clock enable state will be lost and register configuration will be lost. So the driver need to enter runtime suspend state in suspend. With this implementation the suspend function almost same as runtime suspend func

Re: [PATCH v4 2/8] powerpc/mm/hash64: Map all the kernel regions in the same 0xc range

2019-04-17 Thread Aneesh Kumar K.V
On 4/17/19 6:29 PM, Aneesh Kumar K.V wrote: This patch maps vmalloc, 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 a

[PATCH v10 00/12] Appended signatures support for IMA appraisal

2019-04-17 Thread Thiago Jung Bauermann
Hello, There are two big changes in this version: 1. The modsig contents aren't stored anymore in the struct xattr_value which is passed around in IMA for the xattr sig or digest. Instead, a new struct modsig argument is passed alongside xattr_value in relevant IMA functions. This change was sugg

[PATCH v10 01/12] MODSIGN: Export module signature definitions

2019-04-17 Thread Thiago Jung Bauermann
IMA will use the module_signature format for append signatures, so export the relevant definitions and factor out the code which verifies that the appended signature trailer is valid. Also, create a CONFIG_MODULE_SIG_FORMAT option so that IMA can select it and be able to use mod_check_sig() withou

[PATCH v10 02/12] PKCS#7: Refactor verify_pkcs7_signature()

2019-04-17 Thread Thiago Jung Bauermann
IMA will need to verify a PKCS#7 signature which has already been parsed. For this reason, factor out the code which does that from verify_pkcs7_signature() into a new function which takes a struct pkcs7_message instead of a data buffer. Signed-off-by: Thiago Jung Bauermann Reviewed-by: Mimi Zoha

[PATCH v10 03/12] PKCS#7: Introduce pkcs7_get_digest()

2019-04-17 Thread Thiago Jung Bauermann
IMA will need to access the digest of the PKCS7 message (as calculated by the kernel) before the signature is verified, so introduce pkcs7_get_digest() for that purpose. Also, modify pkcs7_digest() to detect when the digest was already calculated so that it doesn't have to do redundant work. Verif

[PATCH v10 04/12] integrity: Introduce struct evm_xattr

2019-04-17 Thread Thiago Jung Bauermann
Even though struct evm_ima_xattr_data includes a fixed-size array to hold a SHA1 digest, most of the code ignores the array and uses the struct to mean "type indicator followed by data of unspecified size" and tracks the real size of what the struct represents in a separate length variable. The on

[PATCH v10 05/12] integrity: Select CONFIG_KEYS instead of depending on it

2019-04-17 Thread Thiago Jung Bauermann
This avoids a dependency cycle in soon-to-be-introduced CONFIG_IMA_APPRAISE_MODSIG: it will select CONFIG_MODULE_SIG_FORMAT which in turn selects CONFIG_KEYS. Kconfig then complains that CONFIG_INTEGRITY_SIGNATURE depends on CONFIG_KEYS. Signed-off-by: Thiago Jung Bauermann Signed-off-by: Mimi Zo

[PATCH v10 06/12] ima: Use designated initializers for struct ima_event_data

2019-04-17 Thread Thiago Jung Bauermann
Designated initializers allow specifying only the members of the struct that need initialization. Non-mentioned members are initialized to zero. This makes the code a bit clearer (particularly in ima_add_boot_aggregate() and also allows adding a new member to the struct without having to update al

[PATCH v10 07/12] ima: Add modsig appraise_type option for module-style appended signatures

2019-04-17 Thread Thiago Jung Bauermann
Introduce the modsig keyword to the IMA policy syntax to specify that a given hook should expect the file to have the IMA signature appended to it. Here is how it can be used in a rule: appraise func=KEXEC_KERNEL_CHECK appraise_type=imasig|modsig With this rule, IMA will accept either a signature

[PATCH v10 08/12] ima: Factor xattr_verify() out of ima_appraise_measurement()

2019-04-17 Thread Thiago Jung Bauermann
Verify xattr signature in a separate function so that the logic in ima_appraise_measurement() remains clear when it gains the ability to also verify an appended module signature. The code in the switch statement is unchanged except for having to dereference the status and cause variables (since th

[PATCH v10 09/12] ima: Implement support for module-style appended signatures

2019-04-17 Thread Thiago Jung Bauermann
Implement the appraise_type=imasig|modsig option, allowing IMA to read and verify modsig signatures. In case a file has both an xattr signature and an appended modsig, IMA will only use the appended signature if the key used by the xattr signature isn't present in the IMA or platform keyring. Bec

[PATCH v10 10/12] ima: Collect modsig

2019-04-17 Thread Thiago Jung Bauermann
Obtain the modsig and calculate its corresponding hash in ima_collect_measurement(). Signed-off-by: Thiago Jung Bauermann --- security/integrity/ima/ima.h | 8 - security/integrity/ima/ima_api.c | 5 ++- security/integrity/ima/ima_appraise.c | 2 +- security/integrity/ima/im

[PATCH v10 11/12] ima: Define ima-modsig template

2019-04-17 Thread Thiago Jung Bauermann
Define new "d-modsig" template field which holds the digest that is expected to match the one contained in the modsig, and also new "modsig" template field which holds the appended file signature. Add a new "ima-modsig" defined template descriptor with the new fields as well as the ones from the "

[PATCH v10 12/12] ima: Store the measurement again when appraising a modsig

2019-04-17 Thread Thiago Jung Bauermann
If the IMA template contains the "modsig" or "d-modsig" field, then the modsig should be added to the measurement list when the file is appraised. And that is what normally happens, but if a measurement rule caused a file containing a modsig to be measured before a different rule causes it to be a

Re: [PATCH V32 01/27] Add the ability to lock down access to the running kernel image

2019-04-17 Thread Daniel Axtens
Hi Andrew, >> +If CONFIG_LOCK_DOWN_KERNEL is enabled, the kernel can be >> +moved to a more locked down state at runtime by writing to >> +this attribute. Valid values are: >> + >> +integrity: >> +The kernel will disable functiona

[PATCH v6 05/10] powerpc: Add a framework for Kernel Userspace Access Protection

2019-04-17 Thread Michael Ellerman
From: Christophe Leroy This patch implements a framework for Kernel Userspace Access Protection. Then subarches will have the possibility to provide their own implementation by providing setup_kuap() and allow/prevent_user_access(). Some platforms will need to know the area accessed and whether

[PATCH v6 01/10] powerpc/powernv/idle: Restore IAMR after idle

2019-04-17 Thread Michael Ellerman
From: Russell Currey Without restoring the IAMR after idle, execution prevention on POWER9 with Radix MMU is overwritten and the kernel can freely execute userspace without faulting. This is necessary when returning from any stop state that modifies user state, as well as hypervisor state. To t

[PATCH v6 02/10] powerpc/powernv/idle: Restore AMR/UAMOR/AMOR after idle

2019-04-17 Thread Michael Ellerman
In order to implement KUAP (Kernel Userspace Access Protection) on Power9 we will be using the AMR, and therefore indirectly the UAMOR/AMOR. So save/restore these regs in the idle code. Signed-off-by: Michael Ellerman --- v6: Unchanged. v5: Unchanged. v4: New. --- arch/powerpc/kernel/idle_book3

[PATCH v6 04/10] powerpc: Add skeleton for Kernel Userspace Execution Prevention

2019-04-17 Thread Michael Ellerman
From: Christophe Leroy This patch adds a skeleton for Kernel Userspace Execution Prevention. Then subarches implementing it have to define CONFIG_PPC_HAVE_KUEP and provide setup_kuep() function. Signed-off-by: Christophe Leroy [mpe: Don't split strings, use pr_crit_ratelimited()] Signed-off-by

[PATCH v6 03/10] powerpc: Add framework for Kernel Userspace Protection

2019-04-17 Thread Michael Ellerman
From: Christophe Leroy This patch adds a skeleton for Kernel Userspace Protection functionnalities like Kernel Userspace Access Protection and Kernel Userspace Execution Prevention The subsequent implementation of KUAP for radix makes use of a MMU feature in order to patch out assembly when KUAP

[PATCH v6 06/10] powerpc/64: Setup KUP on secondary CPUs

2019-04-17 Thread Michael Ellerman
From: Russell Currey Some platforms (i.e. Radix MMU) need per-CPU initialisation for KUP. Any platforms that only want to do KUP initialisation once globally can just check to see if they're running on the boot CPU, or check if whatever setup they need has already been performed. Note that this