Re: [PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking

2016-05-03 Thread Wolfram Sang
> Yes, they look like reasonable complaints. Thanks for fixing them. I just sent out my latest comments and when you fix those and send V8, I'll apply that right away. I think we are safe to fix the rest incrementally if needed. Note that I didn't review the IIO and media patches, I trust the revi

Re: [PATCH v7 18/24] i2c-mux: relax locking of the top i2c adapter during mux-locked muxing

2016-05-03 Thread Wolfram Sang
> +static int i2c_mux_trylock_bus(struct i2c_adapter *adapter, int flags) > +{ > + struct i2c_mux_priv *priv = adapter->algo_data; > + struct i2c_adapter *parent = priv->muxc->parent; > + > + if (!rt_mutex_trylock(&parent->mux_lock)) > + return 0; > + if (!(flags & I2C_L

Re: [PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking

2016-05-03 Thread Wolfram Sang
On Wed, Apr 20, 2016 at 05:17:56PM +0200, Peter Rosin wrote: > Add i2c_lock_bus() and i2c_unlock_bus(), which call the new lock_bus and > unlock_bus ops in the adapter. These funcs/ops take an additional flags > argument that indicates for what purpose the adapter is locked. > > There are two flag

[PATCH v3 4/4] x86, boot: Memory hotplug support for KASLR memory randomization

2016-05-03 Thread Thomas Garnier
Add a new option (CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING) to define the padding used for the physical memory mapping section when KASLR memory is enabled. It ensures there is enough virtual address space when CONFIG_MEMORY_HOTPLUG is used. The default value is 10 terabytes. If CONFIG_MEMORY_HOTPL

[PATCH v3 1/4] x86, boot: Refactor KASLR entropy functions

2016-05-03 Thread Thomas Garnier
Move the KASLR entropy functions in x86/libray to be used in early kernel boot for KASLR memory randomization. Signed-off-by: Thomas Garnier --- Based on next-20160502 --- arch/x86/boot/compressed/kaslr.c | 76 +++--- arch/x86/include/asm/kaslr.h | 6 +++ arc

[PATCH v3 2/4] x86, boot: PUD VA support for physical mapping (x86_64)

2016-05-03 Thread Thomas Garnier
Minor change that allows early boot physical mapping of PUD level virtual addresses. The current implementation expect the virtual address to be PUD aligned. For KASLR memory randomization, we need to be able to randomize the offset used on the PUD table. It has no impact on current usage. Signed

[PATCH v3 3/4] x86, boot: Implement ASLR for kernel memory sections (x86_64)

2016-05-03 Thread Thomas Garnier
Randomizes the virtual address space of kernel memory sections (physical memory mapping, vmalloc & vmemmap) for x86_64. This security feature mitigates exploits relying on predictable kernel addresses. These addresses can be used to disclose the kernel modules base addresses or corrupt specific str

[PATCH v3 0/4] x86, boot: KASLR memory randomization

2016-05-03 Thread Thomas Garnier
This is PATCH v3 for KASLR memory implementation for x86_64. Recent changes: Add performance information on commit. Add details on PUD alignment. Add information on testing against the KASLR bypass exploit. Rebase on next-20160502. ***Background: The current implementation of KASL

Re: [PATCH v2 3/4] x86, boot: Implement ASLR for kernel memory sections (x86_64)

2016-05-03 Thread Thomas Garnier
I don't see much difference. I will update the commits on next iteration with the following: Kernbench shows almost no difference (-+ less than 1%): Before: Average Optimal load -j 12 Run (std deviation): Elapsed Time 102.63 (1.2695) User Time 1034.89 (1.18115) System Time 87.056 (0.456416) Perc

Re: Kernel docs: muddying the waters a bit

2016-05-03 Thread Keith Packard
Daniel Vetter writes: > So sphinx/rst y/n? Jon, is that ok with you from the doc maintainer > pov? I think the right answer for today is to use sphinx to generate docs From inline comments, to encourage outline docs to give it a try but to allow doc writers to use whatever works for them. That

Re: [RFC PATCH v1 15/18] x86: Enable memory encryption on the APs

2016-05-03 Thread Tom Lendacky
On 05/01/2016 05:10 PM, Huang, Kai wrote: > > > On 4/27/2016 10:58 AM, Tom Lendacky wrote: >> Add support to set the memory encryption enable flag on the APs during >> realmode initialization. When an AP is started it checks this flag, and >> if set, enables memory encryption on its core. >> >> S

Re: [RFC PATCH v1 00/18] x86: Secure Memory Encryption (AMD)

2016-05-03 Thread Tom Lendacky
On 04/30/2016 01:13 AM, Elliott, Robert (Persistent Memory) wrote: >> -Original Message- >> From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- >> ow...@vger.kernel.org] On Behalf Of Tom Lendacky >> Sent: Tuesday, April 26, 2016 5:56 PM >> Subject: [RFC PATCH v1 00/18] x86: Secur

Re: [PATCH v2 2/4] x86, boot: PUD VA support for physical mapping (x86_64)

2016-05-03 Thread Thomas Garnier
On Mon, May 2, 2016 at 2:58 PM, Dave Hansen wrote: > On 05/02/2016 02:41 PM, Thomas Garnier wrote: >> Minor change that allows early boot physical mapping of PUD level virtual >> addresses. This change prepares usage of different virtual addresses for >> KASLR memory randomization. It has no impac

Re: [PATCH 0/6] Intel Secure Guard Extensions

2016-05-03 Thread Pavel Machek
Hi! > We have been following and analyzing this technology since the first > HASP paper was published detailing its development. We have been (1) > > I told my associates the first time I reviewed this technology that > SGX has the ability to be a bit of a Pandora's box and it seems to be > fo

Re: [PATCH v2 2/4] x86, boot: PUD VA support for physical mapping (x86_64)

2016-05-03 Thread Dave Hansen
On 05/03/2016 03:05 AM, Baoquan He wrote: > I have a tiny concern about phys_pmd_init(), both phys_pud_init and > phys_pte_init name 2nd parameter as 'addr', phys_pmd_init use 'address'. > If this can be changed to make them look consistent completist would > have a good sleep from now on. Yes, co

Re: Kernel docs: muddying the waters a bit

2016-05-03 Thread Daniel Vetter
Hi all, So sounds like moving ahead with rst/sphinx is the option that should allow us to address everyone's concerns eventually? Of course the first one won't have it all (media seems really tricky), but I'd like to get something awesome in this area closer to mainline. I'm stalling on typing mor

Re: [PATCH 1/7] reset: add devm_reset_controller_register API

2016-05-03 Thread Philipp Zabel
Am Dienstag, den 03.05.2016, 20:41 +0900 schrieb Masahiro Yamada: > 2016-05-03 19:26 GMT+09:00 Masahiro Yamada : > > 2016-05-03 19:17 GMT+09:00 Philipp Zabel : > >> Hi Masahiro, > >> > >> Am Sonntag, den 01.05.2016, 19:36 +0900 schrieb Masahiro Yamada: > >>> Add a device managed API for reset_contr

Re: [PATCH 10/12] kexec: arrange for paddr_vmcoreinfo_note() to return phys_addr_t

2016-05-03 Thread Baoquan He
On 05/03/16 at 11:12am, Russell King - ARM Linux wrote: > On Tue, May 03, 2016 at 12:24:41PM +0800, Baoquan He wrote: > > Could you please help tell why arm PAE kernel can be put above 4G? > > Since the change is related to common code, I am curious about how > > it's so different with other ARCHs.

Re: [PATCH 24/25] arm64:ilp32: add vdso-ilp32 and use for signal return

2016-05-03 Thread Zhangjian (Bamvor)
Hi, yury On 2016/4/13 23:55, Yury Norov wrote: Hi Bamvor, On Wed, Apr 13, 2016 at 05:19:28PM +0800, Zhangjian (Bamvor) wrote: Hi, Yury and Philipp There is a small fix for this patch. Othervise our tools of living patch could not work. Regards Bamvor From e05770efca9f040e0039a4a9c4e0d7d3b

Re: [PATCH 24/25] arm64:ilp32: add vdso-ilp32 and use for signal return

2016-05-03 Thread Zhangjian (Bamvor)
Hi, all On 2016/5/3 19:07, Zhangjian (Bamvor) wrote: On 2016/5/3 17:05, Arnd Bergmann wrote: On Tuesday 03 May 2016 10:00:45 Catalin Marinas wrote: On Fri, Apr 29, 2016 at 07:30:19PM +0200, Arnd Bergmann wrote: On Friday 29 April 2016 17:01:55 Catalin Marinas wrote: On Wed, Apr 06, 2016 at

Re: [PATCH 1/7] reset: add devm_reset_controller_register API

2016-05-03 Thread Masahiro Yamada
2016-05-03 19:26 GMT+09:00 Masahiro Yamada : > 2016-05-03 19:17 GMT+09:00 Philipp Zabel : >> Hi Masahiro, >> >> Am Sonntag, den 01.05.2016, 19:36 +0900 schrieb Masahiro Yamada: >>> Add a device managed API for reset_controller_register(). >>> >>> This helps in reducing code in .remove callbacks and

Re: [PATCH 24/25] arm64:ilp32: add vdso-ilp32 and use for signal return

2016-05-03 Thread Zhangjian (Bamvor)
On 2016/5/3 17:05, Arnd Bergmann wrote: On Tuesday 03 May 2016 10:00:45 Catalin Marinas wrote: On Fri, Apr 29, 2016 at 07:30:19PM +0200, Arnd Bergmann wrote: On Friday 29 April 2016 17:01:55 Catalin Marinas wrote: On Wed, Apr 06, 2016 at 01:08:46AM +0300, Yury Norov wrote: ILP32 VDSO export

Re: [PATCH 06/12] ARM: kexec: advertise location of bootable RAM

2016-05-03 Thread Russell King - ARM Linux
On Fri, Apr 29, 2016 at 08:26:00PM +0530, Pratyush Anand wrote: > Can you please also share git tree path of corresponding kexec-tools changes? On their way as a 32-patch series. I've found the userspace tools to be in particularly poor shape, so some of the patches are fixing that up. I can't be

Re: [PATCH 1/7] reset: add devm_reset_controller_register API

2016-05-03 Thread Masahiro Yamada
2016-05-03 19:17 GMT+09:00 Philipp Zabel : > Hi Masahiro, > > Am Sonntag, den 01.05.2016, 19:36 +0900 schrieb Masahiro Yamada: >> Add a device managed API for reset_controller_register(). >> >> This helps in reducing code in .remove callbacks and sometimes >> dropping .remove callbacks entirely. >>

Re: [PATCH 1/7] reset: add devm_reset_controller_register API

2016-05-03 Thread Laxman Dewangan
On Sunday 01 May 2016 04:06 PM, Masahiro Yamada wrote: Add a device managed API for reset_controller_register(). This helps in reducing code in .remove callbacks and sometimes dropping .remove callbacks entirely. Signed-off-by: Masahiro Yamada I liked it. Acked-by: Laxman Dewangan -- To

Re: [PATCH 1/7] reset: add devm_reset_controller_register API

2016-05-03 Thread Philipp Zabel
Hi Masahiro, Am Sonntag, den 01.05.2016, 19:36 +0900 schrieb Masahiro Yamada: > Add a device managed API for reset_controller_register(). > > This helps in reducing code in .remove callbacks and sometimes > dropping .remove callbacks entirely. > > Signed-off-by: Masahiro Yamada Thank you for t

Re: [PATCH 10/12] kexec: arrange for paddr_vmcoreinfo_note() to return phys_addr_t

2016-05-03 Thread Russell King - ARM Linux
On Tue, May 03, 2016 at 12:24:41PM +0800, Baoquan He wrote: > Could you please help tell why arm PAE kernel can be put above 4G? > Since the change is related to common code, I am curious about how > it's so different with other ARCHs. This is explained in the covering email to the series. The ex

Re: [PATCH v2 2/4] x86, boot: PUD VA support for physical mapping (x86_64)

2016-05-03 Thread Baoquan He
On 05/02/16 at 02:58pm, Dave Hansen wrote: > On 05/02/2016 02:41 PM, Thomas Garnier wrote: > > Minor change that allows early boot physical mapping of PUD level virtual > > addresses. This change prepares usage of different virtual addresses for > > KASLR memory randomization. It has no impact on d

[PATCH v2 1/5] thermal: Add support for hardware-tracked trip points

2016-05-03 Thread Caesar Wang
From: Sascha Hauer This adds support for hardware-tracked trip points to the device tree thermal sensor framework. The framework supports an arbitrary number of trip points. Whenever the current temperature is updated, the trip points immediately below and above the current temperature are found

[PATCH v2 0/5] Thermal: Support for hardware-tracked trip points

2016-05-03 Thread Caesar Wang
The history patches come from Mikko and Sascha. http://thread.gmane.org/gmane.linux.power-management.general/59451 Now, I pick them up to continue upstream. Nevermind! This series history patches: v1: https://lkml.org/lkml/2016/4/24/227 This series adds support for hardware trip points. It picks

Re: [PATCH 0/6] Intel Secure Guard Extensions

2016-05-03 Thread Dr. Greg Wettstein
On May 2, 11:37am, "Austin S. Hemmelgarn" wrote: } Subject: Re: [PATCH 0/6] Intel Secure Guard Extensions Good morning, I hope the day is starting out well for everyone. > On 2016-04-29 16:17, Jarkko Sakkinen wrote: > > On Tue, Apr 26, 2016 at 09:00:10PM +0200, Pavel Machek wrote: > >> On Mon 201

Re: [PATCH 24/25] arm64:ilp32: add vdso-ilp32 and use for signal return

2016-05-03 Thread Arnd Bergmann
On Tuesday 03 May 2016 10:00:45 Catalin Marinas wrote: > On Fri, Apr 29, 2016 at 07:30:19PM +0200, Arnd Bergmann wrote: > > On Friday 29 April 2016 17:01:55 Catalin Marinas wrote: > > > On Wed, Apr 06, 2016 at 01:08:46AM +0300, Yury Norov wrote: > > > > ILP32 VDSO exports next symbols: > > > > __k

[PATCH v3] crypto: Add a flag allowing the self-tests to be disabled at runtime.

2016-05-03 Thread Richard W.M. Jones
Running self-tests for a short-lived KVM VM takes 28ms on my laptop. This commit adds a flag 'cryptomgr.notests' which allows them to be disabled. However if fips=1 as well, we ignore this flag as FIPS mode mandates that the self-tests are run. Signed-off-by: Richard W.M. Jones --- Documentatio

Re: [PATCH 24/25] arm64:ilp32: add vdso-ilp32 and use for signal return

2016-05-03 Thread Catalin Marinas
On Fri, Apr 29, 2016 at 07:30:19PM +0200, Arnd Bergmann wrote: > On Friday 29 April 2016 17:01:55 Catalin Marinas wrote: > > On Wed, Apr 06, 2016 at 01:08:46AM +0300, Yury Norov wrote: > > > ILP32 VDSO exports next symbols: > > > __kernel_rt_sigreturn; > > > __kernel_gettimeofday; > > > __kernel

Re: [PATCH 10/12] kexec: arrange for paddr_vmcoreinfo_note() to return phys_addr_t

2016-05-03 Thread Baoquan He
On 05/03/16 at 11:23am, Pratyush Anand wrote: > Hi Baoquan, > > On 03/05/2016:12:24:41 PM, Baoquan He wrote: > > Hi Pratyush, > > > > Could you please help tell why arm PAE kernel can be put above 4G? > > PAE system can have physical addresses above 4G. So, if a CPU is supporting > the > LPAE p

[PATCH v3] crypto: Add a flag allowing the self-tests to be disabled at runtime.

2016-05-03 Thread Richard W.M. Jones
v2 -> v3: - Ignore the flag if FIPS mode is enabled. v1 -> v2: - Use printk_once. Because the serial console is so slow, printing the message multiple times actually consumed about 6ms extra later on during the boot. - - - I'm trying to reduce the time taken in the kernel in initcalls

Re: [PATCH] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-05-03 Thread Yongji Xie
On 2016/5/3 14:11, Tian, Kevin wrote: From: Yongji Xie [mailto:xyj...@linux.vnet.ibm.com] Sent: Tuesday, May 03, 2016 1:52 PM + + if (!(res->start & ~PAGE_MASK)) { + /* +* Add shadow resource for sub-page bar whose mmio +

Re: [PATCH v2] crypto: Add a flag allowing the self-tests to be disabled at runtime.

2016-05-03 Thread Herbert Xu
On Fri, Apr 29, 2016 at 12:03:04PM +0100, Richard W.M. Jones wrote: > Running self-tests for a short-lived KVM VM takes 28ms on my laptop. > This commit adds a flag 'cryptomgr.notests' which allows them to be > disabled. > > Signed-off-by: Richard W.M. Jones Please address the conflict with FIPS