Re: [GIT PULL] Compiler Attributes for v4.20-rc1

2018-11-02 Thread Andrey Ryabinin
On 11/01/2018 08:06 PM, Linus Torvalds wrote: > On Mon, Oct 22, 2018 at 3:59 AM Miguel Ojeda > wrote: >> >> Here it is the Compiler Attributes series/tree, which tries to disentangle >> the include/linux/compiler*.h headers and bring them up to date. > > I've finally emptied the "normal" pull que

Re: [GIT PULL] Compiler Attributes for v4.20-rc1

2018-11-02 Thread Miguel Ojeda
On Fri, Nov 2, 2018 at 2:52 AM Linus Torvalds wrote: > > Anyway, I decided to do the merge by just getting rid of the > GCC_VERSION check around __no_sanitize_address_or_inline entirely. If > you enable KASAN, then a function with that marking just won't be > marked inline. I was a bit confused w

Re: [GIT PULL] Compiler Attributes for v4.20-rc1

2018-11-02 Thread Andrey Ryabinin
On 11/02/2018 04:46 AM, Linus Torvalds wrote: > On Thu, Nov 1, 2018 at 10:06 AM Linus Torvalds > wrote: >> >> The logic for using __no_sanitize_address *used* to be >> >> #if GCC_VERSION >= 40902 > > Ok, looking around, I think this has less to do with the attribute > being recognized, and

Re: [GIT PULL] Compiler Attributes for v4.20-rc1

2018-11-02 Thread Linus Torvalds
On Fri, Nov 2, 2018 at 2:43 AM Andrey Ryabinin wrote: > > You're right, version checks shouldn't matter here. But > __no_sanitize_address_or_inline > shouldn't have been added in the first place, because we already have almost > the same >__no_kasan_or_inline: Ahh, very good. Vasily, Martin -

Re: [GIT PULL] Compiler Attributes for v4.20-rc1

2018-11-02 Thread Linus Torvalds
On Fri, Nov 2, 2018 at 6:16 AM Andrey Ryabinin wrote: > > On 11/02/2018 04:46 AM, Linus Torvalds wrote: > > > > So I _think_ the KASAN config should have a > > > > depends on CC_IS_GCC && GCC_VERSION >= 40902 > > > > on it, but maybe there is something I'm missing. > > I'd rather use cc-option

Re: [GIT PULL] Compiler Attributes for v4.20-rc1

2018-11-02 Thread Andrey Ryabinin
On 11/02/2018 07:11 PM, Linus Torvalds wrote: > On Fri, Nov 2, 2018 at 6:16 AM Andrey Ryabinin > wrote: >> >> On 11/02/2018 04:46 AM, Linus Torvalds wrote: >>> >>> So I _think_ the KASAN config should have a >>> >>> depends on CC_IS_GCC && GCC_VERSION >= 40902 >>> >>> on it, but maybe ther

Re: [PATCH v3 1/2] kretprobe: produce sane stack traces

2018-11-02 Thread Aleksa Sarai
On 2018-11-02, Aleksa Sarai wrote: > For kretprobes I think it would be fairly easy to reconstruct what > landed you into a kretprobe_trampoline by walking the set of > kretprobe_instances (since all new ones are added to the head, you can > get the real return address in-order). > > But I still

Re: [PATCH V6 1/8] pvpanic: move pvpanic to misc as common driver

2018-11-02 Thread kbuild test robot
Hi Peng, Thank you for the patch! Yet something to improve: [auto build test ERROR on char-misc/char-misc-testing] [also build test ERROR on v4.19 next-20181102] [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

Re: [PATCH v3 1/2] kretprobe: produce sane stack traces

2018-11-02 Thread Aleksa Sarai
On 2018-11-02, Aleksa Sarai wrote: > Unfortunately, I'm having a lot of trouble understanding how the current > ftrace hooking works -- ORC has a couple of ftrace hooks that seem > reasonable on the surface but I don't understand (for instance) how > HAVE_FUNCTION_GRAPH_RET_ADDR_PTR *actually* wor

Re: [PATCH v2 2/8] clk: clk-max77686: Clean clkdev lookup leak and use devm

2018-11-02 Thread Krzysztof Kozlowski
On Thu, 1 Nov 2018 at 08:19, Matti Vaittinen wrote: > > clk-max77686 never clean clkdev lookup at remove. This can cause > oops if clk-max77686 is removed and inserted again. Fix leak by > using new devm clkdev lookup registration. Simplify also error > path by using new devm_of_clk_add_parent_hw_

Re: [PATCH v2 3/8] clk: clk-s3c2410-dclk: clean up clkdev lookup leak

2018-11-02 Thread Krzysztof Kozlowski
On Thu, 1 Nov 2018 at 08:19, Matti Vaittinen wrote: > > Use devm variant of clkdev lookup registration in order to avoid > clkdev lookup leak at device remove. > > Signed-off-by: Matti Vaittinen > --- > drivers/clk/samsung/clk-s3c2410-dclk.c | 15 --- > 1 file changed, 8 insertions(+

Re: [PATCH V6 3/8] misc/pvpanic: add MMIO support

2018-11-02 Thread kbuild test robot
Hi Peng, Thank you for the patch! Yet something to improve: [auto build test ERROR on char-misc/char-misc-testing] [also build test ERROR on v4.19 next-20181102] [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

Re: [PATCH v2 3/8] clk: clk-s3c2410-dclk: clean up clkdev lookup leak

2018-11-02 Thread Matti Vaittinen
Thanks Krzysztof! On Fri, Nov 02, 2018 at 09:19:10AM +0100, Krzysztof Kozlowski wrote: > On Thu, 1 Nov 2018 at 08:19, Matti Vaittinen > wrote: > > > > Use devm variant of clkdev lookup registration in order to avoid > > clkdev lookup leak at device remove. > > > > Signed-off-by: Matti Vaittinen

Re: [PATCH V6 2/8] misc/pvpanic: simplify the code using acpi_dev_resource_io

2018-11-02 Thread kbuild test robot
Hi Peng, Thank you for the patch! Yet something to improve: [auto build test ERROR on char-misc/char-misc-testing] [also build test ERROR on v4.19 next-20181102] [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

Re: [PATCH V6 1/8] pvpanic: move pvpanic to misc as common driver

2018-11-02 Thread Andy Shevchenko
On Fri, Nov 2, 2018 at 6:46 AM Peng Hao wrote: > > Move pvpanic.c from drivers/platform/x86 to drivers/misc. > Following patches will use pvpanic device as common driver. > > Reviewed-by: Andy Shevchenko > Acked-by: Mark Rutland > Signed-off-by: Peng Hao > --- > drivers/misc/Kconfig

Re: [PATCH V6 3/8] misc/pvpanic: add MMIO support

2018-11-02 Thread Andy Shevchenko
On Fri, Nov 2, 2018 at 6:46 AM Peng Hao wrote: > > On some architectures (e.g. arm64), it's preferable to use MMIO, since > this can be used standalone. Add MMIO support to the pvpanic driver. > 0day complains b/c of 1st patch in the series. Reviewed-by: Andy Shevchenko > Suggested-by: Andy Sh

Re: [PATCH V6 5/8] misc/pvpanic: add support to get pvpanic device info by FDT

2018-11-02 Thread Andy Shevchenko
On Fri, Nov 2, 2018 at 6:46 AM Peng Hao wrote: > > By default, when ACPI tables and FDT coexist for ARM64, > current kernel takes precedence over FDT to get device information. > Virt machine in qemu provides both FDT and ACPI table. Increases the > way to get information through FDT. > so OF dep

Re: [PATCH 2/2] Compiler Attributes: auxdisplay: panel: use __fallthrough

2018-11-02 Thread Miguel Ojeda
Hi Dan, On Tue, Oct 23, 2018 at 7:37 AM Dan Carpenter wrote: > > On Mon, Oct 22, 2018 at 07:10:02AM -0700, Kees Cook wrote: > > I would prefer we continue to use the comment style until we've got > > confirmed support for (at least) Clang, Coverity, CPPcheck, smatch, > > and eclipse. > > Clang an

Re: [PATCH 2/2] Compiler Attributes: auxdisplay: panel: use __fallthrough

2018-11-02 Thread Miguel Ojeda
On Fri, Nov 2, 2018 at 11:49 AM Miguel Ojeda wrote: > > Thanks for checking! Let's wait then a few months and see if we can > get cppcheck/Eclipse to support it. In the meantime, saved here too: https://github.com/ojeda/linux/tree/compiler-attributes-fallthrough rebased on top of e468f5c06b5e

Re: [PATCH v2 2/8] clk: clk-max77686: Clean clkdev lookup leak and use devm

2018-11-02 Thread Matti Vaittinen
Thanks for taking the time and reviewing this! On Fri, Nov 02, 2018 at 09:15:17AM +0100, Krzysztof Kozlowski wrote: > On Thu, 1 Nov 2018 at 08:19, Matti Vaittinen > wrote: > > > > clk-max77686 never clean clkdev lookup at remove. This can cause > > oops if clk-max77686 is removed and inserted aga

[PATCH v3 0/7] clk: clkdev: managed clk lookup and provider registrations

2018-11-02 Thread Matti Vaittinen
Patch series adding managed clkdev and of_provider registrations Few clk drivers appear to be leaking clkdev lookup registrations at driver remove. The patch series adds devm versions of lookup registrations and cleans up few drivers. Driver clean-up patches have not been tested as I lack the HW.

[PATCH v3 1/7] clk: clkdev/of_clk - add managed lookup and provider registrations

2018-11-02 Thread Matti Vaittinen
With MFD devices the clk properties may be contained in MFD (parent) DT node. Current devm_of_clk_add_hw_provider assumes the clk is bound to MFD subdevice not to MFD device (parent). Add devm_of_clk_add_hw_provider_parent to tackle this issue. Also clkdev registration lacks of managed registratio

[PATCH v3 2/7] clk: clk-max77686: Clean clkdev lookup leak and use devm

2018-11-02 Thread Matti Vaittinen
clk-max77686 never clean clkdev lookup at remove. This can cause oops if clk-max77686 is removed and inserted again. Fix leak by using new devm clkdev lookup registration. Simplify also error path by using new devm_of_clk_add_parent_hw_provider. Signed-off-by: Matti Vaittinen Reviewed-by: Krzyszt

[PATCH v3 3/7] clk: clk-st: avoid clkdev lookup leak at remove

2018-11-02 Thread Matti Vaittinen
Use devm based clkdev lookup registration to avoid leaking lookup structures. Signed-off-by: Matti Vaittinen --- drivers/clk/x86/clk-st.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/x86/clk-st.c b/drivers/clk/x86/clk-st.c index fb62f3938008..32d8df9bd853 100

[PATCH v3 4/7] clk: clk-hi655x: Free of_provider at remove

2018-11-02 Thread Matti Vaittinen
use devm variant for of_provider registration so provider is freed at exit. Signed-off-by: Matti Vaittinen --- drivers/clk/clk-hi655x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk-hi655x.c b/drivers/clk/clk-hi655x.c index 403a0188634a..394d0109104d 100

[PATCH v3 5/7] clk: rk808: use managed version of of_provider registration

2018-11-02 Thread Matti Vaittinen
Simplify clean-up for rk808 by using managed version of of_provider registration. Signed-off-by: Matti Vaittinen --- drivers/clk/clk-rk808.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/clk/clk-rk808.c b/drivers/clk/clk-rk808.c index 6461f2820a5b..

[PATCH v3 6/7] clk: clk-twl6040: Free of_provider at remove

2018-11-02 Thread Matti Vaittinen
use devm variant for of_provider registration so provider is freed at exit. Signed-off-by: Matti Vaittinen --- drivers/clk/clk-twl6040.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-twl6040.c b/drivers/clk/clk-twl6040.c index 25dfe050ae9f..e9da09453eb2

[PATCH v3 7/7] clk: apcs-msm8916: simplify probe cleanup by using devm

2018-11-02 Thread Matti Vaittinen
use devm variant for of_provider registration. Signed-off-by: Matti Vaittinen --- drivers/clk/qcom/apcs-msm8916.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/apcs-msm8916.c b/drivers/clk/qcom/apcs-msm8916.c index b1cc8dbcd327..f4e0c136ab1a 100644 ---

Re: [PATCH v3 6/7] clk: clk-twl6040: Free of_provider at remove

2018-11-02 Thread Peter Ujfalusi
On 11/2/18 2:37 PM, Matti Vaittinen wrote: > use devm variant for of_provider registration so provider is freed > at exit. Acked-by: Peter Ujfalusi > > Signed-off-by: Matti Vaittinen > --- > drivers/clk/clk-twl6040.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --

Re: [PATCH v3 1/2] kretprobe: produce sane stack traces

2018-11-02 Thread Steven Rostedt
On Fri, 2 Nov 2018 17:59:32 +1100 Aleksa Sarai wrote: > As an aside, I just tested with the frame unwinder and it isn't thrown > off-course by kretprobe_trampoline (though obviously the stack is still > wrong). So I think we just need to hook into the ORC unwinder to get it > to continue skipping

Re: [PATCH v14 12/12] cpuset: Show descriptive text when reading cpuset.sched.partition

2018-11-02 Thread Waiman Long
On 10/19/2018 03:24 PM, Tejun Heo wrote: > On Fri, Oct 19, 2018 at 02:56:13PM -0400, Waiman Long wrote: >> On 10/17/2018 11:08 AM, Tejun Heo wrote: >>> On Mon, Oct 15, 2018 at 04:29:37PM -0400, Waiman Long wrote: Currently, cpuset.sched.partition returns the values, 0, 1 or -1 on read. A

Re: [PATCH v3 1/2] kretprobe: produce sane stack traces

2018-11-02 Thread Josh Poimboeuf
On Fri, Nov 02, 2018 at 09:16:58AM -0400, Steven Rostedt wrote: > On Fri, 2 Nov 2018 17:59:32 +1100 > Aleksa Sarai wrote: > > > As an aside, I just tested with the frame unwinder and it isn't thrown > > off-course by kretprobe_trampoline (though obviously the stack is still > > wrong). So I think

Re: [PATCH v3 1/2] kretprobe: produce sane stack traces

2018-11-02 Thread Steven Rostedt
On Fri, 2 Nov 2018 10:43:26 -0500 Josh Poimboeuf wrote: > > I'll hopefully have a prototype ready by plumbers. > > Why do we need multiple users? It would be a lot simpler if we could > just enforce a single user per fgraphed/kretprobed function (and return > -EBUSY if it's already being trac

Re: [PATCH security-next v5 12/30] LSM: Provide separate ordered initialization

2018-11-02 Thread Mimi Zohar
Hi Kees, On Wed, 2018-10-10 at 17:18 -0700, Kees Cook wrote: > This provides a place for ordered LSMs to be initialized, separate from > the "major" LSMs. This is mainly a copy/paste from major_lsm_init() to > ordered_lsm_init(), but it will change drastically in later patches. > > What is not ob

Re: [PATCH security-next v5 12/30] LSM: Provide separate ordered initialization

2018-11-02 Thread Kees Cook
On Fri, Nov 2, 2018 at 11:13 AM, Mimi Zohar wrote: > I don't recall why "integrity" is on the security_initcall, while both > IMA and EVM are on the late_initcall(). It's because integrity needs to have a VFS buffer allocated extremely early, so it used the security init to do it. While it's not

Re: [PATCH 10/17] prmem: documentation

2018-11-02 Thread Nadav Amit
From: Nadav Amit Sent: November 1, 2018 at 4:31:59 PM GMT > To: Peter Zijlstra > Cc: Andy Lutomirski , Matthew Wilcox > , Kees Cook , Igor Stoppa > , Mimi Zohar , Dave Chinner > , James Morris , Michal Hocko > , Kernel Hardening , > linux-integrity , linux-security-module > , Igor Stoppa >

[PATCH v15 00/23] Intel SGX1

2018-11-02 Thread Jarkko Sakkinen
Intel(R) SGX is a set of CPU instructions that can be used by applications to set aside private regions of code and data. The code outside the enclave is disallowed to access the memory inside the enclave by the CPU access control. In a way you can think that SGX provides inverted sandbox. It prot

[PATCH v15 23/23] x86/sgx: Driver documentation

2018-11-02 Thread Jarkko Sakkinen
Documentation of the features of the Software Guard eXtensions used by the Linux kernel and basic design choices for the core and driver and functionality. Signed-off-by: Jarkko Sakkinen --- Documentation/index.rst | 1 + Documentation/x86/intel_sgx.rst | 185 ++

[PATCH v10 1/2] dm ioctl: add a device mapper ioctl function.

2018-11-02 Thread Helen Koike
From: Enric Balletbo i Serra Add a dm_ioctl_cmd to issue the equivalent of a DM ioctl call in kernel. Signed-off-by: Enric Balletbo i Serra --- Changes since v9: - https://www.redhat.com/archives/linux-lvm/2018-September/msg00016.html - Reorganize variables --- drivers/md/dm-ioctl.c

[PATCH v10 0/2] dm: boot a mapped device without an initramfs

2018-11-02 Thread Helen Koike
As mentioned in the discussion from the previous version of this patch, Android and Chrome OS do not use initramfs mostly due to boot time and size liability. A practical example as mentioned by Kees is that Chrome OS has a limited amount of storage available for the boot image as it is covered by

[PATCH v10 2/2] init: add support to directly boot to a mapped device

2018-11-02 Thread Helen Koike
From: Will Drewry Add a dm= kernel parameter. It allows device-mapper targets to be configured at boot time for use early in the boot process (as the root device or otherwise). Signed-off-by: Will Drewry Signed-off-by: Kees Cook [rework to use dm_ioctl calls] Signed-off-by: Enric Balletbo i Se