Re: [PATCH V2 1/2] tty/hvc: Use IRQF_SHARED for OPAL hvc consoles

2016-07-10 Thread Michael Ellerman
Samuel Mendoza-Jonas writes: > Commit 2def86a7200c > ("hvc: Convert to using interrupts instead of opal events") > enabled the use of interrupts in the hvc_driver for OPAL platforms. > However on machines with more than one hvc console, any console after > the first will fail to register an inter

Re: [PATCH V2 2/2] tty/hvc: Use opal irqchip interface if available

2016-07-10 Thread Michael Ellerman
Samuel Mendoza-Jonas writes: > Update the hvc driver to use the OPAL irqchip if made available by the > running firmware. If it is not present, the driver falls back to the > existing OPAL event number. > > Signed-off-by: Samuel Mendoza-Jonas > Cc: # 4.1.x- > --- > v2: Always try irq_of_parse_a

Re: [kernel-hardening] Re: [PATCH 9/9] mm: SLUB hardened usercopy support

2016-07-10 Thread Joonsoo Kim
On Fri, Jul 08, 2016 at 04:48:38PM -0400, Kees Cook wrote: > On Fri, Jul 8, 2016 at 1:41 PM, Kees Cook wrote: > > On Fri, Jul 8, 2016 at 12:20 PM, Christoph Lameter wrote: > >> On Fri, 8 Jul 2016, Kees Cook wrote: > >> > >>> Is check_valid_pointer() making sure the pointer is within the usable >

Re: [PATCH 1/4] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array

2016-07-10 Thread Suraj Jitindar Singh
On 29/06/16 22:51, Paolo Bonzini wrote: > > On 29/06/2016 06:44, Suraj Jitindar Singh wrote: >> Thanks for catching that, yeah I see. >> >> I don't think we can trivially move the struct kvmppc_vcore definition into >> kvm_book3s.h as other code in kvm_host.h (i.e. struct kvm_vcpu_arch) requires >

[PATCH] selftests/powerpc: Add a test for PROT_SAO

2016-07-10 Thread Michael Ellerman
PROT_SAO is a powerpc-specific flag to mmap(), and we rely on arch specific logic to allow it to be passed to mmap(). Add a small test to ensure mmap() accepts PROT_SAO. We don't have a good way to test that it actually causes the mapping to be created with the right flags, so for now we just touc

Re: [PATCH] powerpc/crash: Rearrange loop condition to avoid out of bounds array access

2016-07-10 Thread Andrew Donnellan
On 11/07/16 14:17, Suraj Jitindar Singh wrote: The array crash_shutdown_handles[] has size CRASH_HANDLER_MAX, thus when we loop over the elements of the list we check crash_shutdown_handles[i] && i < CRASH_HANDLER_MAX. However this means that when we increment i to CRASH_HANDLER_MAX we will perfo

[PATCH] powerpc/crash: Rearrange loop condition to avoid out of bounds array access

2016-07-10 Thread Suraj Jitindar Singh
The array crash_shutdown_handles[] has size CRASH_HANDLER_MAX, thus when we loop over the elements of the list we check crash_shutdown_handles[i] && i < CRASH_HANDLER_MAX. However this means that when we increment i to CRASH_HANDLER_MAX we will perform an out of bound array access checking the firs

[PATCH V2 2/2] tty/hvc: Use opal irqchip interface if available

2016-07-10 Thread Samuel Mendoza-Jonas
Update the hvc driver to use the OPAL irqchip if made available by the running firmware. If it is not present, the driver falls back to the existing OPAL event number. Signed-off-by: Samuel Mendoza-Jonas Cc: # 4.1.x- --- v2: Always try irq_of_parse_and_map before falling back drivers/tty/hvc/h

[PATCH V2 1/2] tty/hvc: Use IRQF_SHARED for OPAL hvc consoles

2016-07-10 Thread Samuel Mendoza-Jonas
Commit 2def86a7200c ("hvc: Convert to using interrupts instead of opal events") enabled the use of interrupts in the hvc_driver for OPAL platforms. However on machines with more than one hvc console, any console after the first will fail to register an interrupt handler in notifier_add_irq() since

Re: [PATCH v4 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-07-10 Thread Dave Young
On 07/07/16 at 01:23pm, Thiago Jung Bauermann wrote: > kexec_locate_mem_hole will be used by the PowerPC kexec_file_load > implementation to find free memory for the purgatory stack. > > Signed-off-by: Thiago Jung Bauermann > Cc: Eric Biederman > Cc: Dave Young > --- > include/linux/kexec.h |

Re: [PATCH v4 2/9] kexec_file: Change kexec_add_buffer to take kexec_buf as argument.

2016-07-10 Thread Dave Young
On 07/07/16 at 01:23pm, Thiago Jung Bauermann wrote: > Adapt all callers to the new function prototype. > > In addition, change the type of kexec_buf.buffer from char * to void *. > There is no particular reason for it to be a char *, and the change > allows us to get rid of 3 existing casts to ch

Re: [PATCH v4 1/9] kexec_file: Allow arch-specific memory walking for kexec_add_buffer

2016-07-10 Thread Dave Young
On 07/07/16 at 01:23pm, Thiago Jung Bauermann wrote: > Allow architectures to specify a different memory walking function for > kexec_add_buffer. x86 uses iomem to track reserved memory ranges, but > PowerPC uses the memblock subsystem. > > Signed-off-by: Thiago Jung Bauermann > Cc: Eric Biederma

Re: [RFC] arm64: kexec_file_load support

2016-07-10 Thread Dave Young
On 07/08/16 at 11:48am, Thiago Jung Bauermann wrote: > Am Donnerstag, 07 Juli 2016, 14:12:45 schrieb Dave Young: > > If so maybe change a bit from your precious mentioned 7 args proposal like > > below? > > > > struct kexec_file_fd { > > enum kexec_file_type; > > int fd; > > } > > > > str

Re: [PATCH v4 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-07-10 Thread Dave Young
On 07/10/16 at 04:11pm, Michael Ellerman wrote: > Thiago Jung Bauermann writes: > > > kexec_locate_mem_hole will be used by the PowerPC kexec_file_load > > implementation to find free memory for the purgatory stack. > > > > Signed-off-by: Thiago Jung Bauermann > > Cc: Eric Biederman > > Cc: Dav

Re: [PATCH] include: mman: Use bool instead of int for the return value of arch_validate_prot

2016-07-10 Thread Dave Hansen
On 07/09/2016 09:29 AM, cheng...@emindsoft.com.cn wrote: > -static inline int arch_validate_prot(unsigned long prot) > +static inline bool arch_validate_prot(unsigned long prot) > { > if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM | PROT_SAO)) > - return 0; > - if

Linux 4.7: Reported regressions as of Sunday, 2016-07-10

2016-07-10 Thread Thorsten Leemhuis
Hi! Here is my fifth regression report for Linux 4.7. It lists 10 regressions I'm currently aware of; 2 of them are new; 1 of those seems to be a a side effect of a fix for another regression. The report also mentions 3 regression that I removed from the list, as it looks like those issues are no

Re: [PATCH 0/9] mm: Hardened usercopy

2016-07-10 Thread Andy Lutomirski
On Sun, Jul 10, 2016 at 5:03 AM, PaX Team wrote: > On 10 Jul 2016 at 11:16, Ingo Molnar wrote: > >> * PaX Team wrote: >> >> > On 9 Jul 2016 at 14:27, Andy Lutomirski wrote: >> > >> > > I like the series, but I have one minor nit to pick. The effect of this >> > > series is to harden usercopy, bu

Re: [PATCH 0/9] mm: Hardened usercopy

2016-07-10 Thread PaX Team
On 10 Jul 2016 at 11:16, Ingo Molnar wrote: > * PaX Team wrote: > > > On 9 Jul 2016 at 14:27, Andy Lutomirski wrote: > > > > > I like the series, but I have one minor nit to pick. The effect of this > > > series is to harden usercopy, but most of the code is really about > > > infrastructure

Re: [PATCH 0/9] mm: Hardened usercopy

2016-07-10 Thread Ingo Molnar
* PaX Team wrote: > On 9 Jul 2016 at 14:27, Andy Lutomirski wrote: > > > I like the series, but I have one minor nit to pick. The effect of this > > series is to harden usercopy, but most of the code is really about > > infrastructure to validate that a pointed-to object is valid. > > actua