Re: [PATCH v9 2/5] clk: imx: add fractional PLL output clock

2018-10-17 Thread Stephen Boyd
Quoting Abel Vesa (2018-09-24 03:39:54) > From: Lucas Stach > > This is a new clock type introduced on i.MX8. Ok, what's the clock type? Add another sentence please. > > Signed-off-by: Lucas Stach > Signed-off-by: Abel Vesa [..] > diff --git a/drivers/clk/imx/clk-frac-pll.c b/drivers/clk/imx

Re: [PATCH v9 1/5] dt-bindings: add binding for i.MX8MQ CCM

2018-10-17 Thread Stephen Boyd
Quoting Abel Vesa (2018-09-24 03:39:53) > From: Lucas Stach > > This adds the binding for the i.MX8MQ Clock Controller Module. > > Signed-off-by: Lucas Stach > Signed-off-by: Abel Vesa > Reviewed-by: Rob Herring > --- I'll wait for the resend.

Re: [PATCH v2 2/2] dt-bindings: uniphier: move cache-uniphier.txt to vendor directory

2018-10-17 Thread Rob Herring
On Fri, 12 Oct 2018 13:25:24 +0900, Masahiro Yamada wrote: > Now, the Socionext vendor directory is available at > Documentation/devicetree/bindings/arm/socionext/ > > Move cache-uniphier.txt over to it. > > Signed-off-by: Masahiro Yamada > --- > > Changes in v2: > - New patch > > .../devic

Re: [PATCH 1/3] kbuild: Add -Wshadow to sparse

2018-10-17 Thread Sebastian Andrzej Siewior
On 2018-10-17 21:25:02 [+0200], Luc Van Oostenryck wrote: > Hi, Hi, > I made a quick test and I saw it would add a lot of noise because of > (valid) warnings coming from macros using a statement expression > redeclaring variables like '__u', 'tmp', ... > > BTW, as far as I can see, sparse never h

Re: [PATCH 3/5] dt-bindings: add more optional properties for elan_i2c touchpads

2018-10-17 Thread Rob Herring
On Fri, Oct 12, 2018 at 04:24:11PM +0200, Benjamin Tissoires wrote: > Some new touchpads IC are connected through PS/2 and I2C. On some of these > new IC, the I2C part doesn't have all of the information available. > We need to be able to forward the touchpad parameters from PS/2 and > thus, we nee

Re: [PATCH V12 00/14] Krait clocks + Krait CPUfreq

2018-10-17 Thread Stephen Boyd
Quoting Stephen Boyd (2018-10-17 08:44:12) > Quoting Sricharan R (2018-09-20 06:03:31) > > > > > > On 9/20/2018 1:54 AM, Craig wrote: > > > Yup, this patch seems to have fixed the higher frequencies from the quick > > > test I did. > > > > > Thanks !!. Can i take that as > > Tes

Re: [PATCH] tracing: Export trace_dump_stack to modules

2018-10-17 Thread Steven Rostedt
On Wed, 17 Oct 2018 09:51:43 +0300 Nikolay Borisov wrote: > There is no reason for this function to be unexprted and it's a useful > debugging aid. > > Signed-off-by: Nikolay Borisov Thanks, I added this to my queue for the merge window. -- Steve > --- > kernel/trace/trace.c | 1 + > 1 file

Re: statx(2) API and documentation

2018-10-17 Thread Andreas Dilger
On Oct 17, 2018, at 1:04 PM, Miklos Szeredi wrote: > > On Wed, Oct 17, 2018 at 8:45 PM, Andreas Dilger wrote: >> On Oct 17, 2018, at 12:24 PM, Miklos Szeredi wrote: >>> >>> I'm trying to implement statx for fuse and ran into the following issues: >>> >>> - Need a STATX_ATTRIBUTES bit, so that

Re: [PATCH 1/3] MIPS: jz4780: Allow access to jz4740-i2s

2018-10-17 Thread Mathieu Malaterre
Paul, On Mon, Sep 3, 2018 at 8:15 AM Mathieu Malaterre wrote: > > On Fri, Aug 31, 2018 at 10:59 PM Paul Burton wrote: > > > > On Fri, Aug 31, 2018 at 01:37:52PM -0700, Paul Burton wrote: > > > Further to that, this series doesn't seem to work for me. With > > > v4.19-rc1, with the patch from [1]

Re: [PATCH 0/7] selftests/resctrl: Add resctrl selftest

2018-10-17 Thread Fenghua Yu
On Wed, Oct 17, 2018 at 11:04 AM Moger, Babu wrote: > > Hi Fenghua, > My few comments. > > On 10/17/2018 09:40 AM, Moger, Babu wrote: > > On 10/16/2018 03:32 PM, Fenghua Yu wrote: > >>> From: Moger, Babu [mailto:babu.mo...@amd.com] > >>> On 10/16/2018 11:56 AM, Fenghua Y

Re: [PATCH 2/3] MIPS: Ci20: Enable SND_JZ4740_SOC driver

2018-10-17 Thread Mathieu Malaterre
On Wed, Jun 6, 2018 at 9:38 PM Mathieu Malaterre wrote: > > Update the Ci20's defconfig to enable the JZ4780's SND driver. > > Signed-off-by: Mathieu Malaterre > --- > arch/mips/configs/ci20_defconfig | 4 > 1 file changed, 4 insertions(+) > > diff --git a/arch/mips/configs/ci20_defconfig

Re: [PATCH v7 1/6] seccomp: add a return code to trap to userspace

2018-10-17 Thread Tycho Andersen
On Thu, Sep 27, 2018 at 02:31:24PM -0700, Kees Cook wrote: > On Thu, Sep 27, 2018 at 8:11 AM, Tycho Andersen wrote: > > @@ -60,4 +62,29 @@ struct seccomp_data { > > __u64 args[6]; > > }; > > > > +struct seccomp_notif { > > + __u16 len; > > + __u64 id; > > + __u32 pid; >

Re: [PATCH v13 07/12] livepatch: Use lists to manage patches, objects and functions

2018-10-17 Thread Josh Poimboeuf
On Mon, Oct 15, 2018 at 02:37:08PM +0200, Petr Mladek wrote: > +static int klp_init_lists(struct klp_patch *patch) > +{ > + struct klp_object *obj; > + struct klp_func *func; > + > + INIT_LIST_HEAD(&patch->obj_list); > + if (!patch->objs) > + return -EINVAL; > + > +

Re: [PATCH] selftests/ftrace: Use colored output when available

2018-10-17 Thread Steven Rostedt
On Tue, 16 Oct 2018 12:02:20 -0500 Daniel Díaz wrote: > If test is being directly executed (with stdout opened on the > terminal) and the terminal capabilities indicate enough > colors, then use the existing scheme of green, red, and blue > to show when tests pass, fail or end in a different way.

Re: [RFC v1 00/31] kunit: Introducing KUnit, the Linux kernel unit testing framework

2018-10-17 Thread Rob Herring
On Tue, Oct 16, 2018 at 6:53 PM Brendan Higgins wrote: > > This patch set proposes KUnit, a lightweight unit testing and mocking > framework for the Linux kernel. > > Unlike Autotest and kselftest, KUnit is a true unit testing framework; > it does not require installing the kernel on a test machin

Re: [PATCH] selftests/ftrace: Strip escape sequences for log file

2018-10-17 Thread Steven Rostedt
On Wed, 17 Oct 2018 12:33:23 +0900 Masami Hiramatsu wrote: > Strip escape sequences from the stream to the ftracetest > summary log file. Note that all test-case results are > dumped raw in each file. > Acked-by: Steven Rostedt (VMware) Shuah, Please take this one too. Thanks! -- Steve

Re: [PATCH v13 09/12] livepatch: Remove Nop structures when unused

2018-10-17 Thread Josh Poimboeuf
On Mon, Oct 15, 2018 at 02:37:10PM +0200, Petr Mladek wrote: > +void klp_discard_replaced_stuff(struct klp_patch *new_patch) > +{ > + klp_discard_replaced_patches(new_patch); > + klp_discard_nops(new_patch); > +} > + > +/* Stuff? Really? :-) How about klp_discard_replaced()? -- Josh

Re: [PATCH v13 12/12] selftests/livepatch: introduce tests

2018-10-17 Thread Josh Poimboeuf
On Mon, Oct 15, 2018 at 02:37:13PM +0200, Petr Mladek wrote: > From: Joe Lawrence > > Add a few livepatch modules and simple target modules that the included > regression suite can run tests against: > > - basic livepatching (multiple patches, atomic replace) > - pre/post (un)patch callbacks

Re: [PATCH v1] i2c: tegra: Remove suspend-resume

2018-10-17 Thread Dmitry Osipenko
On 10/17/18 10:41 PM, Jon Hunter wrote: > > On 17/10/2018 15:30, Dmitry Osipenko wrote: >> On 10/17/18 4:59 PM, Jon Hunter wrote: >>> >>> On 13/05/2018 22:13, Dmitry Osipenko wrote: Nothing prevents I2C clients to access I2C while Tegra's driver is being suspended, this results in -EBUSY

Re: [PATCH] spi: pxa2xx: fix PCI dependency

2018-10-17 Thread Geert Uytterhoeven
Hi Arnd, On Wed, Oct 17, 2018 at 8:52 PM Arnd Bergmann wrote: > The code reorganization broke building without CONFIG_PCI: > > drivers/spi/spi-pxa2xx.c: In function 'pxa2xx_spi_init_pdata': > drivers/spi/spi-pxa2xx.c:1457:15: error: implicit declaration of function > 'pci_match_id'; did you mean

Re: [PATCH v1 1/5] dt-bindings: cpufreq: Add binding for NVIDIA Tegra20/30

2018-10-17 Thread Dmitry Osipenko
On 10/17/18 10:29 PM, Jon Hunter wrote: > > On 17/10/2018 15:43, Dmitry Osipenko wrote: >> On 10/17/18 5:14 PM, Jon Hunter wrote: >>> >>> On 17/10/2018 14:46, Dmitry Osipenko wrote: On 10/17/18 4:34 PM, Jon Hunter wrote: > > On 17/10/2018 14:07, Dmitry Osipenko wrote: >> On 10/17/

[PATCH v2] x86: ptrace.h: Make regs_get_kernel_stack_nth() not fault on bad stack

2018-10-17 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" Andy had some concerns about using regs_get_kernel_stack_nth() in a new function regs_get_kernel_argument() as if there's any error in the stack code, it could cause a bad memory access. To be on the safe side, call probe_kernel_read() on the stack address to be ex

[PATCH 1/3] staging: emxx_udc: Added static modifier to udc_controller

2018-10-17 Thread Carmeli Tamir
Added static modifier to the udc_controller, since it's only required within emxx_udc.c. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_u

[PATCH 2/3] staging: emxx_udc: Added missing __iomem modifier to handle p_regs

2018-10-17 Thread Carmeli Tamir
Since in nbu2ss_drv_probe() p_regs is assigned from mmio_base, which is marked as __iomem, p_regs also should be market with __iomem. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 44 ++--- drivers/staging/emxx_udc/emxx_udc.h | 2 +- 2 f

[PATCH 3/3] staging: emxx_udc: Added missing le16_to_cpu conversions

2018-10-17 Thread Carmeli Tamir
Fixed sparse tool warnings due to missing convesion from le16 to cpu endienness. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/stagin

Re: [PATCH 1/2] locking/qspinlock_stat: Count instances of nested lock slowpaths

2018-10-17 Thread Waiman Long
On 10/17/2018 03:38 AM, Peter Zijlstra wrote: > On Tue, Oct 16, 2018 at 09:45:06AM -0400, Waiman Long wrote: >> Queued spinlock supports up to 4 levels of lock slowpath nesting - >> user context, soft IRQ, hard IRQ and NMI. However, we are not sure how >> often the nesting happens. So 3 more per-cp

Re: [RFC v1 06/31] arch: um: enabled running kunit from User Mode Linux

2018-10-17 Thread Brendan Higgins
On Wed, Oct 17, 2018 at 10:52 AM wrote: > > > > It might be of interest to the automated testing mailing list too ? (Tim?) > > I think this is interesting to groups doing automated testing of the kernel > (including myself) as another set of tests to run. Right now I don't see it > as having any

Re: [PATCH] drivers/vfio: Fix an 8-byte alignment issue

2018-10-17 Thread Konrad Rzeszutek Wilk
On Wed, Oct 17, 2018 at 01:18:19PM -0500, Wenwen Wang wrote: > This patch adds a 4-byte reserved field in the structure > vfio_eeh_pe_op to make sure that the u64 fields in the structure > vfio_eeh_pe_err are 8-byte aligned. Won't this break 32-bit kernels? That is the size of the structure will n

RE: [RFC v1 06/31] arch: um: enabled running kunit from User Mode Linux

2018-10-17 Thread Tim.Bird
> -Original Message- > From: Brendan Higgins > > On Wed, Oct 17, 2018 at 10:52 AM wrote: > > > > > > It might be of interest to the automated testing mailing list too ? (Tim?) > > > > I think this is interesting to groups doing automated testing of the kernel > > (including myself) as

Re: [PATCH 31/34] vfs: syscall: Add fspick() to select a superblock for reconfiguration [ver #12]

2018-10-17 Thread David Howells
Alan Jenkins wrote: > static int do_remount > (struct path > *path > , int ms_flags, int > sb_flags, > int mnt

[PATCH 1/2] gpio: gpio-mmio: Allow volatile shadow regs

2018-10-17 Thread Kun Yi
Currently the generic GPIO driver stores the direction and data shadow register when the driver probes. However, in embedded SOCs the GPIO pins are often interleaved with pins muxed to other functions, and pinctrl driver might toggle the direction/data register values for these pins. With GPIO driv

[PATCH 0/2] Allow gpio-mmio to co-exist with pinctrl driver

2018-10-17 Thread Kun Yi
This patchset is to resolve an issue found with Nuvoton pinctrl driver when it uses a generic GPIO interface. Since the generic GPIO driver stores the bgpio_data and bgpio_dir shadow register values and later on modify based on the stored values, any change to the pin states in between by the pinct

[PATCH 2/2] pinctrl: pinctrl-npcm7xx: Set BGPIOF_VOLATILE_REG

2018-10-17 Thread Kun Yi
Indicate that the pins are both controlled by the pinctrl driver and the generic GPIO driver, thus GPIO driver should read the register value before updating, instead of using the stored shadow register values. Signed-off-by: Kun Yi --- drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 3 ++- 1 file c

Re: [PATCH v4 01/18] of: overlay: add tests to validate kfrees from overlay removal

2018-10-17 Thread Alan Tull
On Mon, Oct 15, 2018 at 9:39 PM wrote: Hi Frank, > > From: Frank Rowand > > Add checks: > - attempted kfree due to refcount reaching zero before overlay > is removed > - properties linked to an overlay node when the node is removed > - node refcount > one during node removal in a chan

Re: [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement

2018-10-17 Thread Marcel Ziswiler
On Wed, 2018-10-17 at 20:16 +0100, Mark Brown wrote: > On Wed, Oct 17, 2018 at 02:28:22PM +, Marcel Ziswiler wrote: > > > Some questions: > > - How exactly are devm allocations supposed to work concerning > > probe > > deferrals? > > Probe deferrals are just normal probe errors, any devm_ all

[PATCH] pstore: Refactor compression initialization

2018-10-17 Thread Kees Cook
With compression initialization now separated from pstore_register(), there is no longer a good reason to do compression method selection during fs init. Instead, merge everything together into the late init. Additionally cleans up the reporting to be more clear. Signed-off-by: Kees Cook --- This

Re: [RFC 1/4] pwm: sifive: Add DT documentation for SiFive PWM Controller.

2018-10-17 Thread Atish Patra
On 10/17/18 8:58 AM, Rob Herring wrote: On Tue, Oct 16, 2018 at 03:20:34PM -0700, Atish Patra wrote: On 10/16/18 3:04 PM, Thierry Reding wrote: On Tue, Oct 16, 2018 at 10:31:42AM -0700, Paul Walmsley wrote: On 10/16/18 4:01 AM, Thierry Reding wrote: On Mon, Oct 15, 2018 at 03:57:35PM -0700,

linux-next: build warning after merge of the clk tree

2018-10-17 Thread Stephen Rothwell
Hi all, After merging the clk tree, today's linux-next build (x86_64 allmodconfig) produced this warning: WARNING: modpost: missing MODULE_LICENSE() in drivers/clk/qcom/gcc-sdm660.o see include/linux/module.h for more information Introduced by commit f2a76a2955c0 ("clk: qcom: Add Global Clock

Re: [PATCH v4 2/4] perf: add arm64 smmuv3 pmu driver

2018-10-17 Thread kbuild test robot
Hi Neil, Thank you for the patch! Yet something to improve: [auto build test ERROR on linux-sof-driver/master] [also build test ERROR on v4.19-rc8 next-20181017] [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] drivers/vfio: Fix an 8-byte alignment issue

2018-10-17 Thread Alex Williamson
On Wed, 17 Oct 2018 17:15:33 -0400 Konrad Rzeszutek Wilk wrote: > On Wed, Oct 17, 2018 at 01:18:19PM -0500, Wenwen Wang wrote: > > This patch adds a 4-byte reserved field in the structure > > vfio_eeh_pe_op to make sure that the u64 fields in the structure > > vfio_eeh_pe_err are 8-byte aligned.

Re: [PATCH 1/2] serial: set suppress_bind_attrs flag only if builtin

2018-10-17 Thread Andrew Morton
On Wed, 17 Oct 2018 16:03:10 +0200 Anders Roxell wrote: > Cc: Arnd Bergmann > Co-developed-by: Arnd Bergmann > Signed-off-by: Anders Roxell This should have Arnd's Signed-off-by: as well.

[tip:ras/core] x86/mcelog: Remove one mce_helper definition

2018-10-17 Thread tip-bot for Sebastian Andrzej Siewior
Commit-ID: 711f76a328cbe5b49164bb14bcb593fa52102051 Gitweb: https://git.kernel.org/tip/711f76a328cbe5b49164bb14bcb593fa52102051 Author: Sebastian Andrzej Siewior AuthorDate: Wed, 17 Oct 2018 19:05:53 +0200 Committer: Borislav Petkov CommitDate: Thu, 18 Oct 2018 00:05:04 +0200 x86/mcelo

Re: [PATCH 2/2] writeback: don't decrement wb->refcnt if !wb->bdi

2018-10-17 Thread Andrew Morton
On Wed, 17 Oct 2018 16:03:11 +0200 Anders Roxell wrote: > When enabling CONFIG_DEBUG_TEST_DRIVER_REMOVE devtmpfs gets killed > because we try to remove a file and decrement the wb reference count > before the noop_backing_device_info gets initialized. > > Since arch_initcall(pl011_init) came be

Re: [PATCH 31/34] vfs: syscall: Add fspick() to select a superblock for reconfiguration [ver #12]

2018-10-17 Thread Alan Jenkins
[resent, hopefully with slightly less formatting damage] On 17/10/2018 16:45, David Howells wrote: Alan Jenkins wrote: I agree. I'm happy to see this is using the same check as do_remount(). * change filesystem flags. dir should be a physical root of filesystem. * If you've mounted a non-r

Re: statx(2) API and documentation

2018-10-17 Thread Amir Goldstein
On Wed, Oct 17, 2018 at 10:12 PM Miklos Szeredi wrote: > >> - STATX_ALL definition is unclear, can this change, or is it fixed? > >> If it's the former, than that's a backward compatibility nightmare. > >> If it's the latter, then what's the point? > > > > The value can change over time. It is i

Re: [PATCH v7 1/6] seccomp: add a return code to trap to userspace

2018-10-17 Thread Kees Cook
On Wed, Oct 17, 2018 at 1:29 PM, Tycho Andersen wrote: > On Thu, Sep 27, 2018 at 02:31:24PM -0700, Kees Cook wrote: >> On Thu, Sep 27, 2018 at 8:11 AM, Tycho Andersen wrote: >> > @@ -60,4 +62,29 @@ struct seccomp_data { >> > __u64 args[6]; >> > }; >> > >> > +struct seccomp_notif { >> > +

Re: l1tf: Kernel suggests I throw away third of my memory. I'd rather not

2018-10-17 Thread Dave Hansen
On 10/17/2018 04:32 AM, Pavel Machek wrote: >> Well, that depends. Do you care about PROT_NONE attacks as well? If not >> then no-swap would help you. But even then no-swap is rather theoretical >> attack on a physical host unless you allow an arbitrary swapout to a >> malicious user (e.g. allow a

Re: [PATCH 1/2] serial: set suppress_bind_attrs flag only if builtin

2018-10-17 Thread Jeffrey Hugo
On 10/17/2018 4:05 PM, Andrew Morton wrote: On Wed, 17 Oct 2018 16:03:10 +0200 Anders Roxell wrote: Cc: Arnd Bergmann Co-developed-by: Arnd Bergmann Signed-off-by: Anders Roxell This should have Arnd's Signed-off-by: as well. I'm just interested to know, why? -- Jeffrey Hugo Qualcomm

Re: statx(2) API and documentation

2018-10-17 Thread Florian Weimer
* Andreas Dilger: >> So what's the point exactly? > > Ah, I see your point... STATX_ALL seems to be mostly useful for the kernel > to mask off flags that it doesn't currently understand. It doesn't make > much sense for applications to specify STATX_ALL, since they don't have any > way to know w

Re: [RFC v1 00/31] kunit: Introducing KUnit, the Linux kernel unit testing framework

2018-10-17 Thread Brendan Higgins
On Wed, Oct 17, 2018 at 10:49 AM wrote: > > > -Original Message- > > From: Brendan Higgins > > > > This patch set proposes KUnit, a lightweight unit testing and mocking > > framework for the Linux kernel. > > I'm interested in this, and think the kernel might benefit from this, > but I hav

Re: [LKP] [mm/memory.c] 6558038e45: general_protection_fault:#[##]

2018-10-17 Thread Andrew Morton
On Wed, 17 Oct 2018 09:36:00 +0800 kernel test robot wrote: > FYI, we noticed the following commit (built with gcc-6): > > commit: 6558038e4540a22ee4f99a5def74791189102bc0 ("mm/memory.c: recheck page > table entry with page table lock held") > https://git.kernel.org/cgit/linux/kernel/git/next/

Re: [RFC v1 26/31] arch: um: added stubs for mock iomem for KUnit

2018-10-17 Thread Rob Herring
On Tue, Oct 16, 2018 at 6:54 PM Brendan Higgins wrote: > > This mocks out some iomem functions (functions like readl and writel), > for mocking hardware interfaces. > > Signed-off-by: Brendan Higgins > --- > arch/um/Kconfig.common | 8 +- > arch/um/Kconfig.um

Re: [PATCH 1/2] serial: set suppress_bind_attrs flag only if builtin

2018-10-17 Thread Andrew Morton
On Wed, 17 Oct 2018 16:21:08 -0600 Jeffrey Hugo wrote: > On 10/17/2018 4:05 PM, Andrew Morton wrote: > > On Wed, 17 Oct 2018 16:03:10 +0200 Anders Roxell > > wrote: > > > >> Cc: Arnd Bergmann > >> Co-developed-by: Arnd Bergmann > >> Signed-off-by: Anders Roxell > > > > This should have Arn

[POC 02/12] init/main.c: call update_rai_access()

2018-10-17 Thread Rasmus Villemoes
I hope that one can actually interchange the order of these calls a bit so that they read mark_readonly(); update_rai_access(); free_initmem(); because there will be some metadata associated to each rai_* macro invocation that might as well live in __initdata. But for now,

[POC 06/12] ugly ugly hack

2018-10-17 Thread Rasmus Villemoes
Just to have a quick way of seeing that rai-patching works (i.e., once we implement rai_load, we'd not expect the output to change). Also, inside virtme we can do a quick "gdb vmlinux /proc/kcode" and disassemble rai_proc_show to see how the patched function looks. Signed-off-by: Rasmus Villemoes

Re: [PATCH v7 1/6] seccomp: add a return code to trap to userspace

2018-10-17 Thread Tycho Andersen
On Wed, Oct 17, 2018 at 03:21:02PM -0700, Kees Cook wrote: > On Wed, Oct 17, 2018 at 1:29 PM, Tycho Andersen wrote: > > On Thu, Sep 27, 2018 at 02:31:24PM -0700, Kees Cook wrote: > >> On Thu, Sep 27, 2018 at 8:11 AM, Tycho Andersen wrote: > >> > @@ -60,4 +62,29 @@ struct seccomp_data { > >> >

[POC 12/12] fs/dcache.c: use rai_bucket_shift for dentry hashtable

2018-10-17 Thread Rasmus Villemoes
Before this, the disassembly of __d_lookup_rcu begins 0x2d10 <__d_lookup_rcu>: push %r15 0x2d12 <__d_lookup_rcu+2>: push %r14 0x2d14 <__d_lookup_rcu+4>: push %r13 0x2d16 <__d_lookup_rcu+6>: push %r12 0x2d18 <__d_lookup_rcu+8>: push %rbp 0x2d19 <__d_lookup_rc

[POC 11/12] x86-64: implement _rai_bucket_shift

2018-10-17 Thread Rasmus Villemoes
The only slightly tricky issue is that for implementing the thunk, we need some temporary registers (with %ecx being one of them), and we don't know whether the hash input and/or destination register collide with whichever we choose. One _could_ attempt text parsing in asm in order to find a safe s

[POC 10/12] hack: /proc/rai: add rai_bucket_shift use

2018-10-17 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- arch/x86/kernel/rai.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/x86/kernel/rai.c b/arch/x86/kernel/rai.c index e55e85f11a2e..c4284ce7478f 100644 --- a/arch/x86/kernel/rai.c +++ b/arch/x86/kernel/rai.c @@ -63,11 +63,21 @@ update_rai_

[POC 03/12] arch/Kconfig: add ARCH_HAS_RAI symbol

2018-10-17 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- arch/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 9d329608913e..160893bd6a5c 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -275,6 +275,9 @@ config ARCH_THREAD_STACK_ALLOCATOR config ARCH_WANTS_DYNAMIC_TASK_

[POC 04/12] vmlinux.lds.h: handle various rai sections

2018-10-17 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- include/asm-generic/vmlinux.lds.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index f09ee3c544bc..f38510c6bfcc 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-g

[POC 09/12] fs/inode.c: access inode_cachep via rai_load

2018-10-17 Thread Rasmus Villemoes
This avoids a cacheline access to get the value of the inode_cachep pointer in the places that do a kmem_cache_*(inode_cachep, ...); Signed-off-by: Rasmus Villemoes --- fs/inode.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index 42f6d25f32a5

[POC 05/12] x86-64: initial ro-after-init patching support

2018-10-17 Thread Rasmus Villemoes
This just sets things up so that the ARCH_HAS_RAI symbol gets selected, and prepare the arch-specific headers and support functions. Signed-off-by: Rasmus Villemoes --- arch/x86/Kconfig | 1 + arch/x86/include/asm/rai.S | 18 ++ arch/x86/include/asm/rai.h | 25

[POC 07/12] x86-64: rai: implement _rai_load

2018-10-17 Thread Rasmus Villemoes
This implements the simplest of the rai_* operations, loading a value. For load of an 8-byte value, I believe we do need to keep room for a movabs, since there's no guarantee the final value can be loaded with as an imm32 or using a %rip-relative leaq. It wouldn't hurt to add some sanity checking

[POC 08/12] fs/dcache.c: access dentry_cache via rai_load

2018-10-17 Thread Rasmus Villemoes
This avoids a cacheline access to get the value of the dentry_cache pointer in the places that do a kmem_cache_*(dentry_cache, ...); Signed-off-by: Rasmus Villemoes --- fs/dcache.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/dcache.c b/fs/dcache.c index 2e7e8d85e

[POC 01/12] Accessing __ro_after_init variables as immediates

2018-10-17 Thread Rasmus Villemoes
[This is on top of 58d20fcbd005 "Merge branch 'x86/grub2'" from the -tip tree, to have the macros.S mechanism available]. One can replace various uses of variables that are initialized at init and then never changed, so that the code never actually loads the variable from memory. Instead, the valu

Re: [PATCH 1/2] serial: set suppress_bind_attrs flag only if builtin

2018-10-17 Thread Jeffrey Hugo
On 10/17/2018 4:32 PM, Andrew Morton wrote: On Wed, 17 Oct 2018 16:21:08 -0600 Jeffrey Hugo wrote: On 10/17/2018 4:05 PM, Andrew Morton wrote: On Wed, 17 Oct 2018 16:03:10 +0200 Anders Roxell wrote: Cc: Arnd Bergmann Co-developed-by: Arnd Bergmann Signed-off-by: Anders Roxell This sh

Re: [PATCH v6 3/5] seccomp: add a way to get a listener fd from ptrace

2018-10-17 Thread Michael Tirado
Tycho, Sorry for the duplicate, I forgot to CC the list :( On Wed, Oct 17, 2018 at 3:00 PM Tycho Andersen wrote: > > > That's one of the use cases, but there are a large number of others. I > discuss a few in patch 1: > https://www.spinics.net/lists/linux-containers/msg33956.html > Thanks this i

Re: [PATCH] docs: Introduce deprecated APIs list

2018-10-17 Thread Randy Dunlap
On 10/17/18 3:37 PM, Kees Cook wrote: > On Wed, Oct 17, 2018 at 10:08 AM, Randy Dunlap wrote: >> On 10/17/18 3:00 AM, Jani Nikula wrote: >>> On Tue, 16 Oct 2018, Randy Dunlap wrote: On 10/16/18 7:17 PM, Kees Cook wrote: > As discussed in the "API replacement/deprecation" thread[1], this

Re: [RFC v1 06/31] arch: um: enabled running kunit from User Mode Linux

2018-10-17 Thread Brendan Higgins
On Wed, Oct 17, 2018 at 2:18 PM wrote: > > There are some > > other features we would like to add which would help with that goal as > > well like test isolation. We actually have a presubmit server > > internally for running KUnit tests that can usually respond to patches > > with test results w

Re: [RFC v1 22/31] kunit: mock: add the concept of spyable functions

2018-10-17 Thread Rob Herring
On Tue, Oct 16, 2018 at 6:54 PM Brendan Higgins wrote: > > Adds the concept of spying like in Mockito > (http://static.javadoc.io/org.mockito/mockito-core/2.20.0/org/mockito/Mockito.html#spy-T-). > This allows a function declaration to be labled as spyable which allows > the function to be mocked

[PATCH] proc: use ns_capable instead of capable for timerslack_ns

2018-10-17 Thread bmgordon
From: Benjamin Gordon Access to timerslack_ns is controlled by a process having CAP_SYS_NICE in its effective capability set, but the current check looks in the root namespace instead of the process' user namespace. Since a process is allowed to do other activities controlled by CAP_SYS_NICE ins

[PATCH 01/11] tools arch uapi: Sync the x86 kvm.h copy

2018-10-17 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo To get the changes in: d1766202779e ("x86/kvm/lapic: always disable MMIO interface in x2APIC mode") That at this time will not generate changes in tools such as 'perf trace', that still needs more work in tools/perf/examples/bpf/augmented_syscalls.c to need such

[PATCH 03/11] Revert "perf tools: Fix PMU term format max value calculation"

2018-10-17 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa This reverts commit ac0e2cd555373ae6f8f3a3ad3fbbf5b6d1e7. Michael reported an issue with oversized terms values assignment and I noticed there was actually a misunderstanding of the max value check in the past. The above commit's changelog says: If bit 21 is set, there is

[PATCH 10/11] perf tools: Pass build flags to traceevent build

2018-10-17 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa So the extra user build flags are propagated to libtraceevent. Signed-off-by: Jiri Olsa Cc: "Herton R. Krzesinski" Cc: Steven Rostedt (VMware) Cc: Tzvetomir Stoyanov (VMware) Cc: Yordan Karadzhov (VMware) Link: http://lkml.kernel.org/r/20181016150614.21260-3-jo...@kernel.org

[PATCH 05/11] perf evsel: Store ids for events with their own cpus perf_event__synthesize_event_update_cpus

2018-10-17 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa John reported crash when recording on an event under PMU with cpumask defined: root@localhost:~# ./perf_debug_ record -e armv8_pmuv3_0/br_mis_pred/ sleep 1 perf: Segmentation fault Obtained 9 stack frames. ./perf_debug_() [0x4c5ef8] [0x82ba267c] ./perf_debug_() [0

[PATCH 06/11] perf tools: Fix use of alternatives to find JDIR

2018-10-17 Thread Arnaldo Carvalho de Melo
From: Jarod Wilson When a build is run from something like a cron job, the user's $PATH is rather minimal, of note, not including /usr/sbin in my own case. Because of that, an automated rpm package build ultimately fails to find libperf-jvmti.so, because somewhere within the build, this happens..

[PATCH 02/11] tools headers uapi: Sync kvm.h copy

2018-10-17 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo To pick up the changes introduced in: 6fbbde9a1969 ("KVM: x86: Control guest reads of MSR_PLATFORM_INFO") That is not yet used in tools such as 'perf trace'. The type of the change in this file, a simple integer parameter to the KVM_CHECK_EXTENSION ioctl should

[PATCH 09/11] perf report: Don't crash on invalid inline debug information

2018-10-17 Thread Arnaldo Carvalho de Melo
From: Milian Wolff When the function name for an inline frame is invalid, we must not try to demangle this symbol, otherwise we crash with: #0 0x55895c01 in bfd_demangle () #1 0x55823262 in demangle_sym (dso=0x55d92b90, elf_name=0x0, kmodule=0) at util/symbol-elf.c:215

[GIT PULL 00/11] perf/urgent fixes

2018-10-17 Thread Arnaldo Carvalho de Melo
nux/kernel/git/acme/linux into perf/urgent (2018-10-05 18:14:00 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo-4.19-20181017 for you to fetch changes up to edeb0c90df3581b821a764052d185df985f8b8dc: perf t

[PATCH 11/11] perf tools: Stop fallbacking to kallsyms for vdso symbols lookup

2018-10-17 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo David reports that: Perf has this hack where it uses the kernel symbol map as a backup when a symbol can't be found in the user's symbol table(s). This causes problems because the tests driving this code path use machine__kernel_ip(), and that is completely meani

[PATCH 07/11] perf tools: Fix tracing_path_mount proper path

2018-10-17 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa If there's no tracefs (RHEL7) support the tracing_path_mount returns debugfs path which results in following fail: # perf probe sys_write kprobe_events file does not exist - please rebuild kernel with CONFIG_KPROBE_EVENTS. Error: Failed to add events. In tracing_path_debu

[PATCH 08/11] perf cpu_map: Align cpu map synthesized events properly.

2018-10-17 Thread Arnaldo Carvalho de Melo
From: David Miller The size of the resulting cpu map can be smaller than a multiple of sizeof(u64), resulting in SIGBUS on cpus like Sparc as the next event will not be aligned properly. Signed-off-by: David S. Miller Cc: Jiri Olsa Cc: Kan Liang Fixes: 6c872901af07 ("perf cpu_map: Add cpu_map

[PATCH 04/11] perf vendor events intel: Fix wrong filter_band* values for uncore events

2018-10-17 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Michael reported that he could not stat following event: $ perf stat -e unc_p_freq_ge_1200mhz_cycles -a -- ls event syntax error: '..e_1200mhz_cycles' \___ value too big for format, maximum is 255 Run 'perf list' for a list of valid even

Re: [PATCH] tpm: tpm_try_transmit() ignore value of go_to_idle()

2018-10-17 Thread Jarkko Sakkinen
On Mon, 15 Oct 2018, Tomas Winkler wrote: Ignore the return value of go_to_idle() in tpm_try_transmit(). Once it may shadow the return value of actual tpm operation, second the consequent command will fail as well and the error will be caought anyway. Last fix wrong goto, that jumped back instead

Re: [PATCH] selftests/ftrace: Use colored output when available

2018-10-17 Thread Shuah Khan
On 10/17/2018 02:41 PM, Steven Rostedt wrote: > On Tue, 16 Oct 2018 12:02:20 -0500 > Daniel Díaz wrote: > >> If test is being directly executed (with stdout opened on the >> terminal) and the terminal capabilities indicate enough >> colors, then use the existing scheme of green, red, and blue >>

Re: [PATCH] selftests/ftrace: Strip escape sequences for log file

2018-10-17 Thread Shuah Khan
On 10/17/2018 02:45 PM, Steven Rostedt wrote: > On Wed, 17 Oct 2018 12:33:23 +0900 > Masami Hiramatsu wrote: > >> Strip escape sequences from the stream to the ftracetest >> summary log file. Note that all test-case results are >> dumped raw in each file. >> > > Acked-by: Steven Rostedt (VMware)

RE: [PATCH] tpm: tpm_try_transmit() ignore value of go_to_idle()

2018-10-17 Thread Winkler, Tomas
> -Original Message- > From: Jarkko Sakkinen [mailto:jarkko.sakki...@linux.intel.com] > Sent: Thursday, October 18, 2018 02:01 > To: Winkler, Tomas > Cc: Jarkko Sakkinen ; Jason Gunthorpe > ; Nayna Jain ; Usyskin, > Alexander ; Struk, Tadeusz > ; linux-integr...@vger.kernel.org; linux-s

Re: [Lkcamp] [PATCH 2/4] Renames variable to fix shadow warning.

2018-10-17 Thread Leonardo Bras
Hello Helen, Thanks for the suggestions! On Tue, Oct 16, 2018 at 11:57 PM Helen Koike wrote: > > Hi Leonardo, > > Thanks for the patch, just some small comments below. > > Please, check previous log messages with git log > arch/x86/entry/vdso/vdso2c.h, you will see that most patches had the > pre

Re: [RFC v1 00/31] kunit: Introducing KUnit, the Linux kernel unit testing framework

2018-10-17 Thread Randy Dunlap
On 10/16/18 4:50 PM, Brendan Higgins wrote: > This patch set proposes KUnit, a lightweight unit testing and mocking > framework for the Linux kernel. Hi, Just a general comment: Documentation/process/submitting-patches.rst says: <> That also means saying things like: ... test: add instead of ..

[PATCH 0/1] fs: cap max_files at LONG_MAX

2018-10-17 Thread Christian Brauner
Hey, This is a follow-up to [1] and [2] that caps the file-max sysctl at LONG_MAX and rejects any larger values with EINVAL because of the way percup counters work. This intends to align the kernel side of files_max handling as well by capping the maximum number of files at LONG_MAX until such tim

[PATCH 1/1] fs: cap max_files at LONG_MAX

2018-10-17 Thread Christian Brauner
The percpu counters can only deal with long ints but max_files is declared as an unsigned long. We have already started to reject anything exceeding LONG_INT in the file-max sysctl as well [1]. Should we ever have the need and precision for unsigned long percpu counters we can simply switch to that

Re: [PATCH 2/4] Renames variable to fix shadow warning.

2018-10-17 Thread Leonardo Bras
Thanks Ingo, On Wed, Oct 17, 2018 at 3:01 AM Ingo Molnar wrote: > > > * Leonardo Brás wrote: > > > Renames the char variable to avoid shadowing a variable previously > > declared on this function. > > > > Signed-off-by: Leonardo Brás > > --- > > arch/x86/entry/vdso/vdso2c.h | 4 ++-- > > 1 file

Re: [PATCH 2/4] Renames variable to fix shadow warning.

2018-10-17 Thread Leonardo Bras
Hello Andy, Thanks for the suggestion. I renamed them as suggested and it will be available on v2. Regards, Leonardo On Wed, Oct 17, 2018 at 2:54 PM Andy Lutomirski wrote: > > On Tue, Oct 16, 2018 at 11:01 PM Ingo Molnar wrote: > > > > > > * Leonardo Brás wrote: > > > > > Renames the char var

Re: [PATCH 1/2] dt-bindings: cpufreq: Introduce QCOM CPUFREQ Firmware bindings

2018-10-17 Thread Stephen Boyd
Quoting Taniya Das (2018-10-11 04:36:00) > Add QCOM cpufreq firmware device bindings for Qualcomm Technology Inc's > SoCs. This is required for managing the cpu frequency transitions which are > controlled by the hardware engine. > > Signed-off-by: Taniya Das > --- Reviewed-by: Stephen Boyd

Re: [PATCH] hfs: fix array out of bounds read of array extent

2018-10-17 Thread Al Viro
On Wed, Oct 17, 2018 at 03:01:17PM -0700, Andrew Morton wrote: > On Fri, 31 Aug 2018 15:05:38 +0100 Colin King > wrote: > > > From: Colin Ian King > > > > Currently extent and index i are both being incremented causing > > an array out of bounds read on extent[i]. Fix this by removing > > the

Re: [Lkcamp] [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-17 Thread Leonardo Bras
Hello Helen, On Wed, Oct 17, 2018 at 1:32 AM Helen Koike wrote: > > Hi Leonardo, > > Thanks for the patch. > > On 10/16/18 9:08 PM, Leonardo Brás wrote: > > Adds -Wshadow=local on KBUILD_HOSTCFLAGS to show shadow warnings > > on tools built for HOST. > > > > Signed-off-by: Leonardo Brás > > ---

[RFC PATCH] smack: fix access permissions for keyring

2018-10-17 Thread Zoran Markovic
Function smack_key_permission() only issues smack requests for the following operations: - KEY_NEED_READ (issues MAY_READ) - KEY_NEED_WRITE (issues MAY_WRITE) - KEY_NEED_LINK (issues MAY_WRITE) - KEY_NEED_SETATTR (issues MAY_WRITE) A blank smack request is issued in all other cases, resulting i

Re: [PATCH] hfs: fix array out of bounds read of array extent

2018-10-17 Thread Ernesto A . Fernández
On Wed, Oct 17, 2018 at 03:01:17PM -0700, Andrew Morton wrote: > On Fri, 31 Aug 2018 15:05:38 +0100 Colin King > wrote: > > > From: Colin Ian King > > > > Currently extent and index i are both being incremented causing > > an array out of bounds read on extent[i]. Fix this by removing > > the

Re: [PATCH] ext4: direct return when jinode allocate failed

2018-10-17 Thread Andreas Dilger
> On Oct 16, 2018, at 8:26 PM, liu.son...@zte.com.cn wrote: > >> On Tue, Oct 16, 2018 at 10:55:26PM +0800, fishland wrote: >>> The jinode does not need protected by *i_lock*, we can return >>> directly if memory allocation fails. >>> >> >> I don't see anything wrong with this patch, but at the

<    2   3   4   5   6   7   8   9   >