Re: char-TPM: Adjustments for ten function implementations

2017-10-18 Thread Joe Perches
On Wed, 2017-10-18 at 11:00 +0200, SF Markus Elfring wrote: > > The printk removals do change the objects. > > > > The value of that type of change is only for resource limited systems. > > I imagine that such small code adjustments are also useful for other systems. Your imagination and mine

Re: char-TPM: Adjustments for ten function implementations

2017-10-18 Thread SF Markus Elfring
>> I imagine that such small code adjustments are also useful for other systems. > > Your imagination and mine differ. This can generally be. > Where do you _think_ it matters? It seems that this discussion branch referred still to my cover letter for possible changes in the TPM software

Re: char-TPM: Adjustments for ten function implementations

2017-10-18 Thread SF Markus Elfring
> The printk removals do change the objects. > > The value of that type of change is only for resource limited systems. I imagine that such small code adjustments are also useful for other systems. > Markus' changelogs leave much to be desired. Would you like to help more to improve the

RE: char-TPM: Adjustments for ten function implementations

2017-10-18 Thread Alexander.Steffen
> On Wed, 2017-10-18 at 11:00 +0200, SF Markus Elfring wrote: > > > The printk removals do change the objects. > > > > > > The value of that type of change is only for resource limited systems. > > > > I imagine that such small code adjustments are also useful for other > systems. > > Your

RE: char-TPM: Adjustments for ten function implementations

2017-10-18 Thread Alexander.Steffen
> On Wed, 2017-10-18 at 10:44 +, alexander.stef...@infineon.com wrote: > > > For instance, nothing about > > > > > sizeof(type) > > > > > vs > > > > > sizeof(*ptr) > > > > > makes it easier for a human to read the code. > > > > > > > > If it does not make it easier to read the code

RE: char-TPM: Adjustments for ten function implementations

2017-10-18 Thread Julia Lawall
On Wed, 18 Oct 2017, alexander.stef...@infineon.com wrote: > > On Wed, 2017-10-18 at 11:00 +0200, SF Markus Elfring wrote: > > > > The printk removals do change the objects. > > > > > > > > The value of that type of change is only for resource limited systems. > > > > > > I imagine that such

Re: char-TPM: Adjustments for ten function implementations

2017-10-18 Thread Joe Perches
On Wed, 2017-10-18 at 12:00 +0200, Julia Lawall wrote: > > On Wed, 18 Oct 2017, alexander.stef...@infineon.com wrote: > > > > On Wed, 2017-10-18 at 11:00 +0200, SF Markus Elfring wrote: > > > > > The printk removals do change the objects. > > > > > > > > > > The value of that type of change is

Re: [PATCH v2 2/2] vgaarb: Factor out EFI and fallback default device selection

2017-10-18 Thread Daniel Vetter
On Wed, Oct 18, 2017 at 11:24:43AM +1100, Daniel Axtens wrote: > Hi Daniel, > > >> Initially I wondered if this info printk could be moved into > >> vga_arbiter_check_bridge_sharing(), but it's been separated out since > >> 3448a19da479b ("vgaarb: use bridges to control VGA routing where > >>

Re: [PATCH v2 2/2] vgaarb: Factor out EFI and fallback default device selection

2017-10-18 Thread Daniel Axtens
Daniel Vetter writes: > On Wed, Oct 18, 2017 at 11:24:43AM +1100, Daniel Axtens wrote: >> Hi Daniel, >> >> >> Initially I wondered if this info printk could be moved into >> >> vga_arbiter_check_bridge_sharing(), but it's been separated out since >> >> 3448a19da479b ("vgaarb:

RE: char-TPM: Adjustments for ten function implementations

2017-10-18 Thread Alexander.Steffen
> On Wed, 18 Oct 2017, alexander.stef...@infineon.com wrote: > > > > On Wed, 2017-10-18 at 11:00 +0200, SF Markus Elfring wrote: > > > > > The printk removals do change the objects. > > > > > > > > > > The value of that type of change is only for resource limited systems. > > > > > > > > I

Re: Adjusting further size determinations?

2017-10-18 Thread SF Markus Elfring
> Ugly grep follows: > > $ grep -rohP --include=*.[ch] "\w+\s*=\s*[kv].alloc\s*\(\s*sizeof.*," * | \ > sed -r -e 's/(\w+)\s*=\s*[kv].alloc\s*\(\s*sizeof\s*\(\s*\*\s*\1\s*\)/foo = > k.alloc(sizeof(*foo))/' \ > -e > 's/(\w+)\s*=\s*[kv].alloc\s*\(\s*sizeof\s*\(\s*struct\s+\w+\s*\)/foo =

[PATCH] powerpc: ipic - fix status get and status clear

2017-10-18 Thread Christophe Leroy
IPIC Status is provided by register IPIC_SERSR and not by IPIC_SERMR which is the mask register. Signed-off-by: Christophe Leroy --- arch/powerpc/sysdev/ipic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/ipic.c

Re: [PATCH] cxl: Rework the implementation of cxl_stop_trace_psl9()

2017-10-18 Thread christophe lombard
Le 11/10/2017 à 14:30, Vaibhav Jain a écrit : Presently the PSL9 specific cxl_stop_trace_psl9() only stops the RX0 traces on the CXL adapter when a PSL error irq is triggered. The patch updates the function to stop all the traces arrays and move them to the FIN state. The implementation issues

RE: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Alexander.Steffen
> On Tue, 17 Oct 2017, Mimi Zohar wrote: > > > On Tue, 2017-10-17 at 14:58 +0200, Julia Lawall wrote: > > > > > > On Tue, 17 Oct 2017, Mimi Zohar wrote: > > > > > > > On Tue, 2017-10-17 at 11:50 +, alexander.stef...@infineon.com > > > > wrote: > > > > > > > Replace the specification of data

Re: char-TPM: Adjustments for ten function implementations

2017-10-18 Thread Joe Perches
On Wed, 2017-10-18 at 10:44 +, alexander.stef...@infineon.com wrote: > > For instance, nothing about > > > > sizeof(type) > > > > vs > > > > sizeof(*ptr) > > > > makes it easier for a human to read the code. > > > > > > If it does not make it easier to read the code for you,

Re: [PATCH] powerpc/watchdog: Convert timers to use timer_setup()

2017-10-18 Thread Michael Ellerman
Michael Ellerman writes: > Kees Cook writes: >> On Tue, Oct 17, 2017 at 5:29 AM, Michael Ellerman >> wrote: >>> Nicholas Piggin writes: On Mon, 16 Oct 2017 16:47:10 -0700 Kees Cook

Re: [PATCH 3/7] powerpc: Free up four 64K PTE bits in 4K backed HPTE pages

2017-10-18 Thread Michael Ellerman
Ram Pai writes: > diff --git a/arch/powerpc/mm/hash64_64k.c b/arch/powerpc/mm/hash64_64k.c > index 1a68cb1..c6c5559 100644 > --- a/arch/powerpc/mm/hash64_64k.c > +++ b/arch/powerpc/mm/hash64_64k.c > @@ -126,18 +113,13 @@ int __hash_page_4K(unsigned long ea, unsigned long >

[PATCH] powerpc/64s: Replace CONFIG_PPC_STD_MMU_64 with CONFIG_PPC_BOOK3S_64

2017-10-18 Thread Michael Ellerman
CONFIG_PPC_STD_MMU_64 indicates support for the "standard" powerpc MMU on 64-bit CPUs. The "standard" MMU refers to the hash page table MMU found in "server" processors, from IBM mainly. Currently CONFIG_PPC_STD_MMU_64 is == CONFIG_PPC_BOOK3S_64. While it's annoying to have two symbols that

Re: [PATCH 21/25] powerpc: introduce get_pte_pkey() helper

2017-10-18 Thread Balbir Singh
On Fri, 8 Sep 2017 15:45:09 -0700 Ram Pai wrote: > get_pte_pkey() helper returns the pkey associated with > a address corresponding to a given mm_struct. > This is really get_mm_addr_key() -- no? Balbir Singh.

Re: [PATCH 10/25] powerpc: store and restore the pkey state across context switches

2017-10-18 Thread Ram Pai
On Thu, Oct 19, 2017 at 10:00:38AM +1100, Balbir Singh wrote: > On Wed, 18 Oct 2017 13:47:05 -0700 > Ram Pai wrote: > > > On Wed, Oct 18, 2017 at 02:49:14PM +1100, Balbir Singh wrote: > > > On Fri, 8 Sep 2017 15:44:58 -0700 > > > Ram Pai wrote: > > >

Re: [PATCH 1/10] KVM: PPC: Book3S HV: Use ARRAY_SIZE macro

2017-10-18 Thread Paul Mackerras
On Sun, Sep 03, 2017 at 02:19:31PM +0200, Thomas Meyer wrote: > Use ARRAY_SIZE macro, rather than explicitly coding some variant of it > yourself. > Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e > 's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\ /\s*sizeof\s*\(\s*\1\s*\[\s*0\s*\]\s*\)

Re: [PATCH 6/7] KVM: PPC: Cocci spatch "vma_pages"

2017-10-18 Thread Paul Mackerras
On Thu, Sep 21, 2017 at 12:29:36AM +0200, Thomas Meyer wrote: > Use vma_pages function on vma object instead of explicit computation. > Found by coccinelle spatch "api/vma_pages.cocci" > > Signed-off-by: Thomas Meyer Thanks, applied to my kvm-ppc-next branch, with the headline

Re: [PATCH 01/25] powerpc: initial pkey plumbing

2017-10-18 Thread Michael Ellerman
Ram Pai writes: > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 9fc3c0b..a4cd210 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -864,6 +864,22 @@ config SECCOMP > > If unsure, say Y. Only embedded should say N here. > >

Re: [V14,1/4] powerpc/vphn: Update CPU topology when VPHN enabled

2017-10-18 Thread Michael Ellerman
On Fri, 2017-09-08 at 20:47:27 UTC, Michael Bringmann wrote: > powerpc/vphn: On Power systems with shared configurations of CPUs > and memory, there are some issues with the association of additional > CPUs and memory to nodes when hot-adding resources. This patch > corrects the currently broken

Re: [PATCH 0/2] Optimize mmu_notifier->invalidate_range callback

2017-10-18 Thread Balbir Singh
On Mon, 16 Oct 2017 23:10:01 -0400 jgli...@redhat.com wrote: > From: Jérôme Glisse > > (Andrew you already have v1 in your queue of patch 1, patch 2 is new, > i think you can drop it patch 1 v1 for v2, v2 is bit more conservative > and i fixed typos) > > All this only

Re: [PATCH] KVM: PPC: Book3S HV: Delete an error message for a failed memory allocation in kvmppc_allocate_hpt()

2017-10-18 Thread Paul Mackerras
On Thu, Oct 05, 2017 at 01:23:30PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 5 Oct 2017 13:16:51 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle

[PATCH] powerpc/64: Free up CPU_FTR_ICSWX

2017-10-18 Thread Michael Ellerman
The last user of CPU_FTR_ICSWX was removed in commit 6ff4d3e96652 ("powerpc: Remove old unused icswx based coprocessor support"), so free the bit up for future use. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/cputable.h | 6 +++---

Re: powerpc/modules: Use WARN_ON() in stub_for_addr()

2017-10-18 Thread Michael Ellerman
On Tue, 2017-10-10 at 14:47:32 UTC, Kamalesh Babulal wrote: > Use WARN_ON(), while running out of stubs in stub_for_addr() > and abort loading of the module instead of BUG_ON(). > > Signed-off-by: Kamalesh Babulal Applied to powerpc next, thanks.

Re: [v2] cxl: Dump PSL_FIR register on PSL9 error irq

2017-10-18 Thread Michael Ellerman
On Wed, 2017-10-11 at 06:14:41 UTC, Vaibhav Jain wrote: > For PSL9 currently we aren't dumping the PSL FIR register when a > PSL error interrupt is triggered. Contents of this register are useful > in debugging AFU issues. > > This patch fixes issue by adding a new service_layer_ops callback >

Re: [PATCH 1/7] powerpc: introduce pte_set_hash_slot() helper

2017-10-18 Thread Michael Ellerman
Ram Pai writes: > diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h > b/arch/powerpc/include/asm/book3s/64/hash-64k.h > index 9732837..6652669 100644 > --- a/arch/powerpc/include/asm/book3s/64/hash-64k.h > +++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h > @@

Re: [PATCH] powerpc/xmon: Always enable xmon sysrq trigger

2017-10-18 Thread Michael Ellerman
"Guilherme G. Piccoli" writes: > Distros vary the way they enable SysRq by default - mostly they seem > to enable some mask and then majority of the SysRq functions are > disabled. For instance, xmon does not even have a mask, and unsless > SysRq are completely

Re: [PATCH 0/2] Optimize mmu_notifier->invalidate_range callback

2017-10-18 Thread Jerome Glisse
On Thu, Oct 19, 2017 at 01:43:19PM +1100, Balbir Singh wrote: > On Mon, 16 Oct 2017 23:10:01 -0400 > jgli...@redhat.com wrote: > > > From: Jérôme Glisse > > > > (Andrew you already have v1 in your queue of patch 1, patch 2 is new, > > i think you can drop it patch 1 v1 for

Re: [PATCH kernel] KVM: PPC: Enable in-kernel TCE handlers for PR KVM

2017-10-18 Thread Paul Mackerras
On Wed, Oct 11, 2017 at 04:01:08PM +1100, Alexey Kardashevskiy wrote: > The handlers support PR KVM from the day one; however the PR KVM's > enable/disable hcalls handler missed these ones. > > Signed-off-by: Alexey Kardashevskiy Thanks, applied to my kvm-ppc-next branch. Paul.

Re: selftests/powerpc: context_switch: Fix pthread errors

2017-10-18 Thread Michael Ellerman
On Tue, 2017-07-04 at 01:21:15 UTC, Cyril Bur wrote: > Turns out pthreads returns an errno and doesn't set errno. This doesn't > play well with perror(). > > Signed-off-by: Cyril Bur Applied to powerpc next, thanks.

Re: [PATCH] powerpc: ipic - fix status get and status clear

2017-10-18 Thread Michael Ellerman
Christophe Leroy writes: > IPIC Status is provided by register IPIC_SERSR and not by IPIC_SERMR > which is the mask register. This seems like it would be a bad bug. But I guess it hasn't mattered for some reason? cheers > diff --git a/arch/powerpc/sysdev/ipic.c

Re: [v4, 1/5] powerpc/mce.c: Remove unused function get_mce_fault_addr()

2017-10-18 Thread Michael Ellerman
On Fri, 2017-09-29 at 04:26:51 UTC, Balbir Singh wrote: > There are no users of get_mce_fault_addr() > > Fixes: b63a0ff ("powerpc/powernv: Machine check exception handling.") > > Signed-off-by: Balbir Singh > Reviewed-by: Nicholas Piggin Series

Re: cxl: Rename register PSL9_FIR2 to PSL9_FIR_MASK

2017-10-18 Thread Michael Ellerman
On Mon, 2017-10-09 at 17:56:27 UTC, Vaibhav Jain wrote: > PSL9 doesn't have a FIR2 register as was the case with PSL8. However > currently the register definitions in 'cxl.h' have a definition for > PSL9_FIR2 that actually points to PSL9_FIR_MASK register in the P1 > area at offset 0x308. > > So

Re: [RFC v7 16/25] powerpc: helper to validate key-access permissions of a pte

2017-10-18 Thread Michael Ellerman
Ram Pai writes: > On Wed, Oct 18, 2017 at 06:08:34PM +0200, Laurent Dufour wrote: >> On 31/07/2017 02:12, Ram Pai wrote: >> > diff --git a/arch/powerpc/include/asm/pkeys.h >> > b/arch/powerpc/include/asm/pkeys.h >> > index 4b7e3f4..ba7bff6 100644 >> > ---

Re: [PATCH 1/2] mm/mmu_notifier: avoid double notification when it is useless v2

2017-10-18 Thread Balbir Singh
On Mon, 16 Oct 2017 23:10:02 -0400 jgli...@redhat.com wrote: > From: Jérôme Glisse > > + /* > + * No need to call mmu_notifier_invalidate_range() as we are > + * downgrading page table protection not changing it to point > +

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jerry Snitselaar
On Wed Oct 18 17, SF Markus Elfring wrote: For 1/4 and 2/4: explain why the message can be omitted. Why did you not reply directly with this request for the update steps with the subject “Delete an error message for a failed memory allocation in tpm_…()”?

Re: [PATCH 1/2] mm/mmu_notifier: avoid double notification when it is useless v2

2017-10-18 Thread Jerome Glisse
On Thu, Oct 19, 2017 at 02:04:26PM +1100, Balbir Singh wrote: > On Mon, 16 Oct 2017 23:10:02 -0400 > jgli...@redhat.com wrote: > > > From: Jérôme Glisse > > > > + /* > > +* No need to call mmu_notifier_invalidate_range() as we are > > +*

Re: [RFC v7 15/25] powerpc: Program HPTE key protection bits

2017-10-18 Thread Michael Ellerman
Ram Pai writes: > On Wed, Oct 18, 2017 at 06:15:40PM +0200, Laurent Dufour wrote: >> On 31/07/2017 02:12, Ram Pai wrote: >> > diff --git a/arch/powerpc/include/asm/pkeys.h >> > b/arch/powerpc/include/asm/pkeys.h >> > index 1ded6df..4b7e3f4 100644 >> > ---

Re: [PATCH] powerpc: ipic - fix status get and status clear

2017-10-18 Thread Christophe LEROY
Le 19/10/2017 à 07:06, Michael Ellerman a écrit : Christophe Leroy writes: IPIC Status is provided by register IPIC_SERSR and not by IPIC_SERMR which is the mask register. This seems like it would be a bad bug. But I guess it hasn't mattered for some reason? As

Re: Adjusting further size determinations?

2017-10-18 Thread SF Markus Elfring
Unpleasant consequences are possible in both cases. >> How much do you care to reduce the failure probability further? > > Zero. I am interested to improve the software situation a bit more here. Regards, Markus

Re: [PATCH] powerpc/watchdog: Convert timers to use timer_setup()

2017-10-18 Thread Michael Ellerman
Kees Cook writes: > On Tue, Oct 17, 2017 at 5:29 AM, Michael Ellerman wrote: >> Nicholas Piggin writes: >> >>> On Mon, 16 Oct 2017 16:47:10 -0700 >>> Kees Cook wrote: >>> In preparation for

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Tue, Oct 17, 2017 at 02:03:02PM +0300, Andy Shevchenko wrote: > On Mon, 2017-10-16 at 19:33 +0200, SF Markus Elfring wrote: > > From: Markus Elfring > > Date: Mon, 16 Oct 2017 18:28:17 +0200 > > > > Replace the specification of data structures by pointer

[PATCH] powerpc/xmon: Always enable xmon sysrq trigger

2017-10-18 Thread Guilherme G. Piccoli
Distros vary the way they enable SysRq by default - mostly they seem to enable some mask and then majority of the SysRq functions are disabled. For instance, xmon does not even have a mask, and unsless SysRq are completely enabled ( == 1), xmon trigger keeps disabled. Countless times while

Re: [PATCH] powerpc/xmon: check before calling xive functions

2017-10-18 Thread Michael Ellerman
Breno Leitao writes: > Currently xmon could call XIVE functions from OPAL even if the XIVE is > disabled or does not exist in the system, as in POWER8 machines. This > causes the following exception: > > 1:mon> dx > cpu 0x1: Vector: 700 (Program Check) at [c00423c93450]

RE: Adjusting further size determinations?

2017-10-18 Thread Julia Lawall
On Wed, 18 Oct 2017, David Laight wrote: > From: SF Markus Elfring > > Unpleasant consequences are possible in both cases. > > >> How much do you care to reduce the failure probability further? > > > > > > Zero. > > > > I am interested to improve the software situation a bit more here. > >

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-18 Thread Juan Alvarez
On 10/17/17 8:36 PM, Alexey Kardashevskiy wrote: > PowerNV KVM guest is a pseries machine so this code will execute there. > The configure sriov path will fail and not enable sriov if resources are not met. I.e. the IOV Bar is not set in PF IOV Resources, which in this case gets assigned by

Re: Adjusting further size determinations?

2017-10-18 Thread SF Markus Elfring
>> If you want 'security' for kmalloc() then: >> >> #define KMALLOC_TYPE(flags) (type *)kmalloc(sizeof (type), flags) >> #define KMALLOC(ptr, flags) *(ptr) = KMALLOC_TYPE(typeof *(ptr), flags) Such an approach might help. >> and change: >> ptr = kmalloc(sizeof *ptr, flags); >> to: >>

Re: Adjusting further size determinations?

2017-10-18 Thread Joe Perches
On Wed, 2017-10-18 at 13:00 +0200, SF Markus Elfring wrote: > > Ugly grep follows: > > > > $ grep -rohP --include=*.[ch] "\w+\s*=\s*[kv].alloc\s*\(\s*sizeof.*," * | \ > > sed -r -e 's/(\w+)\s*=\s*[kv].alloc\s*\(\s*sizeof\s*\(\s*\*\s*\1\s*\)/foo > > = k.alloc(sizeof(*foo))/' \ > > -e

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Wed, Oct 18, 2017 at 08:18:58PM +0300, Jarkko Sakkinen wrote: > On Wed, Oct 18, 2017 at 06:43:10PM +0200, SF Markus Elfring wrote: > > > Commit message should just describe in plain text what you are doing > > > > Did other contributors find the wording “Replace …” > > > > > > > and why. > >

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread SF Markus Elfring
> One more word of advice: send the three as separate patches. I do not see a need for an immediate resend at the moment. > My guess is that it takes a factor longer time to apply 4/4 > than other patches because there's more limited crowd who can test it. This is fine for me if somebody would

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Andy Shevchenko
On Wed, 2017-10-18 at 19:48 +0200, SF Markus Elfring wrote: > > For 1/4 and 2/4: explain why the message can be omitted. > > That's all. > > I assume that there might be also some communication challenges > involved. > > > > 3/4: definitive NAK, too much noise compared to value. > > I tried

Re: [PATCH 0/4] char-TPM: Adjustments for ten function implementations

2017-10-18 Thread Jarkko Sakkinen
On Wed, Oct 18, 2017 at 09:09:48AM -0700, James Bottomley wrote: > On Wed, 2017-10-18 at 18:10 +0300, Jarkko Sakkinen wrote: > > On Tue, Oct 17, 2017 at 08:57:13AM -0700, James Bottomley wrote: > > > > > > On Tue, 2017-10-17 at 11:25 +0200, SF Markus Elfring wrote: > > > > > > > > > > > > > >

Re: [PATCH v12 07/11] x86/kasan: add and use kasan_map_populate()

2017-10-18 Thread Pavel Tatashin
Thank you Andrey, I will test this patch. Should it go on top or replace the existing patch in mm-tree? ARM and x86 should be done the same either both as follow-ups or both replace. Pavel

Re: [PATCH v12 07/11] x86/kasan: add and use kasan_map_populate()

2017-10-18 Thread Andrey Ryabinin
On 10/18/2017 08:14 PM, Pavel Tatashin wrote: > Thank you Andrey, I will test this patch. Should it go on top or replace the > existing patch in mm-tree? ARM and x86 should be done the same either both as > follow-ups or both replace. > It's a replacement of your patch. > Pavel > > -- >

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Wed, Oct 18, 2017 at 06:43:10PM +0200, SF Markus Elfring wrote: > > Commit message should just describe in plain text what you are doing > > Did other contributors find the wording “Replace …” > > > > and why. > > and “… a bit safer according to the Linux coding style convention.” >

Re: [PATCH v12 08/11] arm64/kasan: add and use kasan_map_populate()

2017-10-18 Thread Pavel Tatashin
Hi Andrew and Michal, There are a few changes I need to do to my series: 1. Replace these two patches: arm64/kasan: add and use kasan_map_populate() x86/kasan: add and use kasan_map_populate() With: x86/mm/kasan: don't use vmemmap_populate() to initialize shadow arm64/mm/kasan: don't use

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread SF Markus Elfring
> For 1/4 and 2/4: explain why the message can be omitted. Why did you not reply directly with this request for the update steps with the subject “Delete an error message for a failed memory allocation in tpm_…()”? https://patchwork.kernel.org/patch/10009405/

RE: Adjusting further size determinations?

2017-10-18 Thread David Laight
From: SF Markus Elfring > Unpleasant consequences are possible in both cases. > >> How much do you care to reduce the failure probability further? > > > > Zero. > > I am interested to improve the software situation a bit more here. There are probably better places to spend your time! If

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread SF Markus Elfring
> Commit message should just describe in plain text what you are doing Did other contributors find the wording “Replace …” > and why. and “… a bit safer according to the Linux coding style convention.” sufficient often enough already? Which description would you find more appropriate for this

Re: [PATCH v12 08/11] arm64/kasan: add and use kasan_map_populate()

2017-10-18 Thread Will Deacon
On Wed, Oct 18, 2017 at 01:03:10PM -0400, Pavel Tatashin wrote: > I asked Will, about it, and he preferred to have this patched added to the > end of my series instead of replacing "arm64/kasan: add and use > kasan_map_populate()". As I said, I'm fine either way, I just didn't want to cause extra

Re: [PATCH v12 08/11] arm64/kasan: add and use kasan_map_populate()

2017-10-18 Thread Pavel Tatashin
Hi Andrey, I asked Will, about it, and he preferred to have this patched added to the end of my series instead of replacing "arm64/kasan: add and use kasan_map_populate()". In addition, Will's patch stops using large pages for kasan memory, and thus might add some regression in which case

Re: [PATCH v12 08/11] arm64/kasan: add and use kasan_map_populate()

2017-10-18 Thread Pavel Tatashin
As I said, I'm fine either way, I just didn't want to cause extra work or rebasing: http://lists.infradead.org/pipermail/linux-arm-kernel/2017-October/535703.html Makes sense. I am also fine either way, I can submit a new patch merging together the two if needed. Pavel

Re: [PATCH 0/4] char-TPM: Adjustments for ten function implementations

2017-10-18 Thread Jarkko Sakkinen
On Tue, Oct 17, 2017 at 08:57:13AM -0700, James Bottomley wrote: > On Tue, 2017-10-17 at 11:25 +0200, SF Markus Elfring wrote: > > > > > > Fixes is only for bug fixes.  These don't fix any bugs. > > > > How do you distinguish these in questionable source code > > from other error categories or

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Wed, Oct 18, 2017 at 05:22:19PM +0200, SF Markus Elfring wrote: > >> Do you find my wording “This issue was detected by using the > >> Coccinelle software.” insufficient? > > > > This is fine for cover letter, not for the commits. > > I guess that there are more opinions available by other

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Tue, Oct 17, 2017 at 11:50:05AM +, alexander.stef...@infineon.com wrote: > > > Replace the specification of data structures by pointer dereferences > > > as the parameter for the operator "sizeof" to make the corresponding > > > size > > > determination a bit safer according to the Linux

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Tue, Oct 17, 2017 at 04:02:05PM +0300, Andy Shevchenko wrote: > On Tue, 2017-10-17 at 08:52 -0400, Mimi Zohar wrote: > > On Tue, 2017-10-17 at 11:50 +, alexander.stef...@infineon.com > > wrote: > > > > > Replace the specification of data structures by pointer > > > > > dereferences > > > >

Re: [PATCH v2 5/5] of/fdt: only store the device node basename in full_name

2017-10-18 Thread Alan Tull
On Tue, Oct 17, 2017 at 6:51 PM, Frank Rowand wrote: > On 10/17/17 14:46, Rob Herring wrote: >> On Tue, Oct 17, 2017 at 4:32 PM, Alan Tull wrote: >>> On Mon, Aug 21, 2017 at 10:16 AM, Rob Herring wrote: >>> >>> Hi Rob, >>> With

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread SF Markus Elfring
>> Do you find my wording “This issue was detected by using the >> Coccinelle software.” insufficient? > > This is fine for cover letter, not for the commits. I guess that there are more opinions available by other contributors for this aspect. > After your analysis software finds an issue you

Re: [RFC v7 12/25] powerpc: implementation for arch_override_mprotect_pkey()

2017-10-18 Thread Laurent Dufour
Hi Ram, On 31/07/2017 02:12, Ram Pai wrote: > arch independent code calls arch_override_mprotect_pkey() > to return a pkey that best matches the requested protection. > > This patch provides the implementation. > > Signed-off-by: Ram Pai > --- >

Re: [RFC v7 02/25] powerpc: track allocation status of all pkeys

2017-10-18 Thread Laurent Dufour
Hi Ram, On 31/07/2017 02:12, Ram Pai wrote: > Total 32 keys are available on power7 and above. However > pkey 0,1 are reserved. So effectively we have 30 pkeys. > > On 4K kernels, we do not have 5 bits in the PTE to > represent all the keys; we only have 3bits.Two of those > keys are

Re: [PATCH 0/4] char-TPM: Adjustments for ten function implementations

2017-10-18 Thread Jarkko Sakkinen
On Tue, Oct 17, 2017 at 12:44:34PM +0300, Dan Carpenter wrote: > On Tue, Oct 17, 2017 at 10:56:42AM +0200, Julia Lawall wrote: > > > > > > On Tue, 17 Oct 2017, Dan Carpenter wrote: > > > > > On Mon, Oct 16, 2017 at 09:35:12PM +0300, Jarkko Sakkinen wrote: > > > > > > > > A minor complaint: all

Re: char-TPM: Adjustments for ten function implementations

2017-10-18 Thread SF Markus Elfring
>>> A minor complaint: all commits are missing "Fixes:" tag. >> >> * Do you require it to be added to the commit messages? > > I don't require it. It's part of the development process: > > https://www.kernel.org/doc/html/v4.12/process/submitting-patches.html Yes. - But other contributors

Re: [RFC v7 16/25] powerpc: helper to validate key-access permissions of a pte

2017-10-18 Thread Laurent Dufour
On 31/07/2017 02:12, Ram Pai wrote: > helper function that checks if the read/write/execute is allowed > on the pte. > > Signed-off-by: Ram Pai > --- > arch/powerpc/include/asm/book3s/64/pgtable.h |4 +++ > arch/powerpc/include/asm/pkeys.h | 12

Re: [PATCH 0/4] char-TPM: Adjustments for ten function implementations

2017-10-18 Thread James Bottomley
On Wed, 2017-10-18 at 18:10 +0300, Jarkko Sakkinen wrote: > On Tue, Oct 17, 2017 at 08:57:13AM -0700, James Bottomley wrote: > > > > On Tue, 2017-10-17 at 11:25 +0200, SF Markus Elfring wrote: > > > > > > > > > > > > > > > Fixes is only for bug fixes.  These don't fix any bugs. > > > > > >

Re: [RFC v7 15/25] powerpc: Program HPTE key protection bits

2017-10-18 Thread Laurent Dufour
On 31/07/2017 02:12, Ram Pai wrote: > Map the PTE protection key bits to the HPTE key protection bits, > while creating HPTE entries. > > Signed-off-by: Ram Pai > --- > arch/powerpc/include/asm/book3s/64/mmu-hash.h |5 + > arch/powerpc/include/asm/mmu_context.h

Re: [PATCH 0/4] char-TPM: Adjustments for ten function implementations

2017-10-18 Thread Jarkko Sakkinen
On Mon, Oct 16, 2017 at 10:44:18PM +0200, SF Markus Elfring wrote: > > A minor complaint: all commits are missing "Fixes:" tag. > > * Do you require it to be added to the commit messages? I don't require it. It's part of the development process:

Re: [PATCH v2 5/5] of/fdt: only store the device node basename in full_name

2017-10-18 Thread Pantelis Antoniou
On Wed, 2017-10-18 at 10:44 -0500, Rob Herring wrote: > On Wed, Oct 18, 2017 at 10:12 AM, Alan Tull wrote: > > On Tue, Oct 17, 2017 at 6:51 PM, Frank Rowand > > wrote: > >> On 10/17/17 14:46, Rob Herring wrote: > >>> On Tue, Oct 17, 2017 at 4:32 PM,

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Tue, Oct 17, 2017 at 08:41:04PM +0200, SF Markus Elfring wrote: > Do you find my wording “This issue was detected by using the > Coccinelle software.” insufficient? This is fine for cover letter, not for the commits. After your analysis software finds an issue you should manually analyze what

Re: [PATCH v2 5/5] of/fdt: only store the device node basename in full_name

2017-10-18 Thread Rob Herring
On Wed, Oct 18, 2017 at 10:12 AM, Alan Tull wrote: > On Tue, Oct 17, 2017 at 6:51 PM, Frank Rowand wrote: >> On 10/17/17 14:46, Rob Herring wrote: >>> On Tue, Oct 17, 2017 at 4:32 PM, Alan Tull wrote: On Mon, Aug 21, 2017 at 10:16

Re: char/tpm: Delete an error message for a failed memory allocation in tpm_…()

2017-10-18 Thread SF Markus Elfring
>> Why did you not reply directly with this request for the update steps >> with the subject “Delete an error message for a failed memory allocation >> in tpm_…()”? >> >> https://patchwork.kernel.org/patch/10009405/ >> https://patchwork.kernel.org/patch/10009415/ >> >> I find that there can be

Re: char-TPM: Adjustments for ten function implementations

2017-10-18 Thread Michal Suchánek
On Wed, 18 Oct 2017 02:18:46 -0700 Joe Perches wrote: > On Wed, 2017-10-18 at 11:00 +0200, SF Markus Elfring wrote: > > > The printk removals do change the objects. > > > > > > The value of that type of change is only for resource limited > > > systems. > > > > I imagine

Re: [PATCH v2 5/5] of/fdt: only store the device node basename in full_name

2017-10-18 Thread Rob Herring
On Wed, Oct 18, 2017 at 10:53 AM, Pantelis Antoniou wrote: > On Wed, 2017-10-18 at 10:44 -0500, Rob Herring wrote: >> On Wed, Oct 18, 2017 at 10:12 AM, Alan Tull wrote: >> > On Tue, Oct 17, 2017 at 6:51 PM, Frank Rowand

Re: [PATCH v2 5/5] of/fdt: only store the device node basename in full_name

2017-10-18 Thread Alan Tull
On Wed, Oct 18, 2017 at 10:53 AM, Pantelis Antoniou wrote: > On Wed, 2017-10-18 at 10:44 -0500, Rob Herring wrote: >> On Wed, Oct 18, 2017 at 10:12 AM, Alan Tull wrote: >> > On Tue, Oct 17, 2017 at 6:51 PM, Frank Rowand

[PATCH 0/5] PowerPC-pSeries: Adjustments for seven function implementations

2017-10-18 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 18 Oct 2017 21:11:23 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (5): Delete five error messages for a failed memory allocation Improve nine size determinations

[PATCH 1/5] powerpc-pseries: Delete five error messages for a failed memory allocation

2017-10-18 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 18 Oct 2017 16:39:01 +0200 Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

Re: [PATCH v2] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-10-18 Thread Kamalesh Babulal
On Tuesday 17 October 2017 08:17 PM, Torsten Duwe wrote: > On Fri, Oct 06, 2017 at 11:27:42AM +0530, Kamalesh Babulal wrote: >> >> Consider the livepatch sequence[1]. Where function A calls B, B is the >> function which has been livepatched and the call to function B is >> redirected to patched

[PATCH 2/5] powerpc-pseries: Improve nine size determinations

2017-10-18 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 18 Oct 2017 18:18:11 +0200 Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style

[PATCH 3/5] powerpc-pseries: Delete an unnecessary variable initialisation in iommu_pseries_alloc_group()

2017-10-18 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 18 Oct 2017 19:14:39 +0200 The variable "table_group" will be set to an appropriate pointer. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring ---

[PATCH 4/5] powerpc-pseries: Return directly after a failed kzalloc_node() in iommu_pseries_alloc_group()

2017-10-18 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 18 Oct 2017 20:15:32 +0200 Return directly after a call of the function "kzalloc_node" failed at the beginning. Signed-off-by: Markus Elfring --- arch/powerpc/platforms/pseries/iommu.c | 2 +- 1 file

[PATCH 5/5] powerpc-pseries: Less function calls in iommu_pseries_alloc_group() after error detection

2017-10-18 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 18 Oct 2017 20:48:52 +0200 The kfree() function was called in up to two cases by the iommu_pseries_alloc_group() function during error handling even if the passed variable contained a null pointer. * Adjust jump targets according to

Re: [PATCH 0/2] PowerPC-PS3: Adjustments for three function implementations

2017-10-18 Thread Geoff Levand
On 10/17/2017 11:54 AM, SF Markus Elfring wrote: > Markus Elfring (2): > Delete an error message for a failed memory allocation in update_flash_db() > Improve a size determination in two functions For consistency, please use 'powerpc/ps3' not 'powerpc-ps3' as the commit log subject prefix.

Re: [PATCH 18/25] powerpc: check key protection for user page access

2017-10-18 Thread Balbir Singh
On Fri, 8 Sep 2017 15:45:06 -0700 Ram Pai wrote: > Make sure that the kernel does not access user pages without > checking their key-protection. > Why? This makes the routines AMR/thread specific? Looks like x86 does this as well, but these routines are used by GUP from

[PATCH V2 0/3] pseries/nodes: Fix issues with memoryless nodes

2017-10-18 Thread Michael Bringmann
pseries/nodes: Ensure enough nodes avail for operations pseries/findnodes: Find nodes with memory when booting memoryless nodes pseries/initnodes: Ensure nodes initialized for hotplug Signed-off-by: Michael Bringmann Michael Bringmann (3): pseries/nodes: Ensure

[PATCH V2 1/3] pseries/nodes: Ensure enough nodes avail for operations

2017-10-18 Thread Michael Bringmann
pseries/nodes: On pseries systems which allow 'hot-add' of CPU or memory resources, it may occur that the new resources are to be inserted into nodes that were not used for these resources at bootup. In the kernel, any node that is used must be defined and initialized. This patch ensures that

[PATCH V2 2/3] pseries/findnodes: Find nodes with memory for memoryless nodes

2017-10-18 Thread Michael Bringmann
pseries/findnodes: On pseries systems which allow 'hot-add' of resources, we may boot configurations that have CPUs, but no memory associated to a node by the affinity calculations. Previously, the software took a shortcut to collapse initialization and references to such memoryless nodes with

[PATCH V2 3/3] pseries/initnodes: Ensure nodes initialized for hotplug

2017-10-18 Thread Michael Bringmann
pseries/nodes: On pseries systems which allow 'hot-add' of CPU, it may occur that the new resources are to be inserted into nodes that were not used for memory resources at bootup. Many different configurations of PowerPC resources may need to be supported depending upon the environment. This

  1   2   >