Re: [PATCH V9 05/21] csky: System Call

2018-10-17 Thread Guo Ren
On Wed, Oct 17, 2018 at 05:02:33PM +0200, Arnd Bergmann wrote: > On Tue, Oct 16, 2018 at 5:01 AM Guo Ren wrote: > > > > This patch adds files related to syscall. > > > > Signed-off-by: Guo Ren > > Cc: Arnd Bergmann > > Reviewed-by: Arnd Bergmann > > I had a detailed look at this one and provi

Re: [Lkcamp] [PATCH 4/4] Changes macro usage to avoid shadowing a variable.

2018-10-17 Thread Leonardo Bras
Hello Helen, On Wed, Oct 17, 2018 at 1:18 AM Helen Koike wrote: > > Hi Leonardo, > > Thanks for the patch, just some small comments below. > > On 10/16/18 9:09 PM, Leonardo Brás wrote: > > Changes the usage of DEF_FIELD_ADDR in this function to create a > > reference and operate over it using an

in_compat_syscall() returns from kernel thread for X86_32.

2018-10-17 Thread NeilBrown
Was: Re: [tip:x86/asm] x86/entry: Rename is_{ia32,x32}_task() to in_{ia32,x32}_syscall() On Tue, Apr 19 2016, tip-bot for Dmitry Safonov wrote: > Commit-ID: abfb9498ee1327f534df92a7ecaea81a85913bae > Gitweb: http://git.kernel.org/tip/abfb9498ee1327f534df92a7ecaea81a85913bae > Author: Dm

Re: [PATCH 1/3] driver core: add probe_err log helper

2018-10-17 Thread Joe Perches
On Wed, 2018-10-17 at 12:29 +0100, Russell King - ARM Linux wrote: > On Tue, Oct 16, 2018 at 04:55:00PM +0300, Andy Shevchenko wrote: > > On Tue, Oct 16, 2018 at 3:55 PM Andrzej Hajda wrote: > > > On 16.10.2018 13:29, Andrzej Hajda wrote: > > > > On 16.10.2018 13:01, Andy Shevchenko wrote: > > > >

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

2018-10-17 Thread Brendan Higgins
On Wed, Oct 17, 2018 at 3:47 PM Rob Herring wrote: > > 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

[PATCH v2] Staging iio: adc: Match parenthesis alignment

2018-10-17 Thread Marcelo Schmitt
Change close parenthesis alignment to match respective open parenthesis at iio/drivers/staging/iio/adc/ad7606.c line 379. This makes the file more compliant with the preferred coding style for the linux kernel. Signed-of-by: Marcelo Schmitt --- drivers/staging/iio/adc/ad7606.c | 2 +- 1 file cha

Re: [PATCH 2/2] dmaengine: mediatek: Add MediaTek Command-Queue DMA controller for MT6765 SoC

2018-10-17 Thread kbuild test robot
Hi Shun-Chih, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linux-sof-driver/master] [also build test WARNING 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

Re: [PATCH] pstore: Refactor compression initialization

2018-10-17 Thread Joel Fernandes
On Wed, Oct 17, 2018 at 02:41:24PM -0700, Kees Cook wrote: > 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

Re: [PATCH v8 0/9] PCI: mediatek: fixup find_port, enable_msi and add PM, module support

2018-10-17 Thread Honghui Zhang
On Wed, 2018-10-17 at 16:19 +0100, Lorenzo Pieralisi wrote: > On Mon, Oct 15, 2018 at 04:08:51PM +0800, honghui.zh...@mediatek.com wrote: > > From: Honghui Zhang > > > > This patchset includes misc patchs: > > > > The patch 1 fixup the mtk_pcie_find_port logic which will cause system > > could n

Re: [PATCH v9 2/9] PCI: Using PCI configuration space header type instead of class type to assign resource

2018-10-17 Thread Honghui Zhang
On Wed, 2018-10-17 at 08:22 -0500, Bjorn Helgaas wrote: > On Tue, Oct 16, 2018 at 03:53:55PM +0100, Lorenzo Pieralisi wrote: > > On Tue, Oct 16, 2018 at 06:44:43PM +0800, honghui.zh...@mediatek.com wrote: > > > From: Honghui Zhang > > > > > > The PCI configuration space header type defines the la

Re: [RFC PATCH 1/5] x86: introduce preemption disable prefix

2018-10-17 Thread Andy Lutomirski
> On Oct 17, 2018, at 5:54 PM, Nadav Amit wrote: > > It is sometimes beneficial to prevent preemption for very few > instructions, or prevent preemption for some instructions that precede > a branch (this latter case will be introduced in the next patches). > > To provide such functionality on

Re: [PATCH] cacheinfo: Keep the old value if of_property_read_u32 fails

2018-10-17 Thread Huacai Chen
Hi, Sudeep, Please see this call-graph: static int detect_cache_attributes(unsigned int cpu) ret = populate_cache_leaves(cpu); ret = cache_shared_cpu_map_setup(cpu); --> cache_setup_of_node() --> cache_of_set_props() --> cache_size()/cache_nr_sets popula

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

2018-10-17 Thread Brendan Higgins
On Wed, Oct 17, 2018 at 3:28 PM Rob Herring wrote: > > diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common > > index 07f84c842cc31..72e7efb74f7fd 100644 > > --- a/arch/um/Kconfig.common > > +++ b/arch/um/Kconfig.common > > @@ -19,7 +19,13 @@ config MMU > > default y > > > > conf

Re: [RFC PATCH 0/5] device property: Introducing software nodes

2018-10-17 Thread Dmitry Torokhov
Hi Heikki, On Wed, Oct 17, 2018 at 04:36:12PM +0300, Heikki Krogerus wrote: > @@ -189,7 +210,7 @@ static int cht_int33fe_probe(struct i2c_client *client) > memset(&board_info, 0, sizeof(board_info)); > strlcpy(board_info.type, "typec_fusb302", I2C_NAME_SIZE); > board_info.dev_nam

[RFC PATCH 0/5] x86: dynamic indirect call promotion

2018-10-17 Thread Nadav Amit
This RFC introduces indirect call promotion in runtime, which for the matter of simplification (and branding) will be called here "relpolines" (relative call + trampoline). Relpolines are mainly intended as a way of reducing retpoline overheads due to Spectre v2. Unlike indirect call promotion thr

[PATCH] mfd: db8500-prcmu: Fix some section annotations

2018-10-17 Thread Nathan Chancellor
When building the kernel with Clang, the following section mismatch warnings appear: WARNING: vmlinux.o(.text+0x7239cc): Section mismatch in reference from the function db8500_prcmu_probe() to the function .init.text:init_prcm_registers() The function db8500_prcmu_probe() references the function _

[RFC PATCH 1/5] x86: introduce preemption disable prefix

2018-10-17 Thread Nadav Amit
It is sometimes beneficial to prevent preemption for very few instructions, or prevent preemption for some instructions that precede a branch (this latter case will be introduced in the next patches). To provide such functionality on x86-64, we use an empty REX-prefix (opcode 0x40) as an indicatio

[RFC PATCH 2/5] x86: patch indirect branch promotion

2018-10-17 Thread Nadav Amit
To perform indirect branch promotion, we need to find all the locations. Retpolines make it relatively easy to find these branches, by looking at the assembly and finding calls to the indirect thunks. An assembly macro named CALL is used to catch all assembly calls, find these the use indirect thu

[RFC PATCH 3/5] x86: interface for accessing indirect branch locations

2018-10-17 Thread Nadav Amit
Adding a C interface to access the locations of indirect branches. To be used for dynamic patching. Signed-off-by: Nadav Amit --- arch/x86/include/asm/nospec-branch.h | 1 - arch/x86/include/asm/sections.h | 2 ++ include/linux/module.h | 5 + kernel/module.c

[RFC PATCH 4/5] x86: learning and patching indirect branch targets

2018-10-17 Thread Nadav Amit
During runtime, we collect the targets of indirect branch targets and patch them in. Patching is done asynchronously, by modifying each of the relpoline code-paths separately while diverting code execution to the other path during patching. Preemption is disabled while the code runs, and we wait fo

[RFC PATCH 5/5] x86: relpoline: disabling interface

2018-10-17 Thread Nadav Amit
In certain cases it is beneficial not to use indirect branch promotion. One such case is seccomp, which may hold multiple filters and different ones for different processes. The interface indicates to the macro not to add a relpoline to the the indirect branch. Signed-off-by: Nadav Amit --- arch

Re: [RFC PATCH v2] soc: qcom: rmtfs_mem: Control remoteproc from rmtfs_mem

2018-10-17 Thread Brian Norris
Hi Sibi, On Sun, Sep 30, 2018 at 09:26:46PM +0530, Sibi Sankar wrote: > From: Bjorn Andersson > > rmtfs_mem provides access to physical storage and is crucial for the > operation of the Qualcomm modem subsystem. > > The rmtfs_mem implementation must be available before the modem > subsystem is

[PATCH] ARM: OMAP2+: prm44xx: Fix section annotation on omap44xx_prm_enable_io_wakeup

2018-10-17 Thread Nathan Chancellor
When building the kernel with Clang, the following section mismatch warning appears: WARNING: vmlinux.o(.text+0x38b3c): Section mismatch in reference from the function omap44xx_prm_late_init() to the function .init.text:omap44xx_prm_enable_io_wakeup() The function omap44xx_prm_late_init() referenc

[PATCH] ARM: OMAP2+: hwmod: Fix some section annotations

2018-10-17 Thread Nathan Chancellor
When building the kernel with Clang, the following section mismatch warnings appears: WARNING: vmlinux.o(.text+0x2d398): Section mismatch in reference from the function _setup() to the function .init.text:_setup_iclk_autoidle() The function _setup() references the function __init _setup_iclk_autoi

Re: [PATCH] pstore/ram: Clarify resource reservation labels

2018-10-17 Thread Dan Williams
On Wed, Oct 17, 2018 at 5:29 PM Kees Cook wrote: > > When ramoops reserved a memory region in the kernel, it had an unhelpful > label of "persistent_memory". When reading /proc/iomem, it would be > repeated many times, did not hint that it was ramoops in particular, > and didn't clarify very much

[PATCH] ARM: dts: omap3-gta04: Fix comment block

2018-10-17 Thread Nathan Chancellor
When compiling the kernel with Clang, the following warning appears: arch/arm/boot/dts/omap3-gta04.dtsi:385:56: warning: '/*' within block comment [-Wcomment] /* OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT | MUX_MODE0) /* mcbsp_clks.mcbsp_clks */

Re: [PATCH] dt-bindings: ufs: Fix the compatible string definition

2018-10-17 Thread Rob Herring
On Fri, 12 Oct 2018 14:39:26 -0700, Douglas Anderson wrote: > If you look at the bindings for the UFS Host Controller it says: > > - compatible: must contain "jedec,ufs-1.1" or "jedec,ufs-2.0", may > also list one or more of the following: > "qcom,msm8994-ufshc" >

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

2018-10-17 Thread Leonardo Bras
Hello Boris, > Next question: why not -Wshadow simply? Good question. I can change it to -Wshadow and fix stuff for v2. > > Also, -Wshadow for the target compiler is an extra warning (W=2). Why is > it enabled by default here? The idea was to put it as default and fix all the shadowing warning

Re: [PATCH] dt-bindings: phy-qcom-qmp: Fix several mistakes from prior commits

2018-10-17 Thread Rob Herring
On Fri, 12 Oct 2018 14:36:32 -0700, Douglas Anderson wrote: > Digging through the "phy-qcom-qmp" showed me many inconsistencies > between the bindings and the reality of the driver. Let's fix them > all. > > * In commit 2d66eab18375 ("dt-bindings: phy: qmp: Add support for QMP > phy in IPQ8074"

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

2018-10-17 Thread Leonardo Bras
On Wed, Oct 17, 2018 at 5:21 AM Masahiro Yamada wrote: > > On Wed, Oct 17, 2018 at 5:11 PM Borislav Petkov wrote: > > > > On Tue, Oct 16, 2018 at 09:08:09PM -0300, Leonardo Brás wrote: > > > Adds -Wshadow=local on KBUILD_HOSTCFLAGS to show shadow warnings > > > on tools built for HOST. > > > > >

[PATCH] pstore/ram: Clarify resource reservation labels

2018-10-17 Thread Kees Cook
When ramoops reserved a memory region in the kernel, it had an unhelpful label of "persistent_memory". When reading /proc/iomem, it would be repeated many times, did not hint that it was ramoops in particular, and didn't clarify very much about what each was used for: 4-407ff : Persist

Re: [PATCH 0/7] drivers: tty: Fix kernel-docs comments

2018-10-17 Thread Tobin C. Harding
On Wed, Oct 17, 2018 at 09:00:26AM +0200, Geert Uytterhoeven wrote: > Hi Tobin, > > Thanks for your series! > > On Wed, Oct 17, 2018 at 1:23 AM Tobin C. Harding wrote: > > My first patch set using kernel.org email address. I've been so careful > > with this one I'm expecting some epic fail :) >

Re: [RFC PATCH] soc: qcom: rmtfs_mem: Control remoteproc from rmtfs_mem

2018-10-17 Thread Brian Norris
Hi Sibi, On Sun, Sep 30, 2018 at 08:58:49PM +0530, Sibi Sankar wrote: > On 2018-09-25 22:59, Brian Norris wrote: > > On Tue, Sep 25, 2018 at 01:06:07AM -0700, Bjorn Andersson wrote: > > So rather than looking for open(), I think somebody needs to be looking > > for the appearance and disappearance

Re: [PATCH 1/2] dt-bindings: clock: add description of 74aup1g157gw

2018-10-17 Thread Kuninori Morimoto
Hi Rob Thank you for your feedback > > From: Kuninori Morimoto > > > > 74aup1g157gw needs i0 and i1 pin as input, select and output it by > > sel gpio pin. This patch adds description for 74aup1g157gw as clock > > multiplexer. > > "nxp,74aup1g157gw-clk" will select most closest input as outpu

[PATCH] leds: gpio: set led_dat->gpiod pointer for OF defined GPIO leds

2018-10-17 Thread Liviu Dudau
Anaszewski Signed-off-by: Liviu Dudau --- Hi, I found this issue while testing linux-next-20181017, I don't know how stable the leds for-next tree is in terms of commit IDs, if that gets rebased then the Fixes commit ID needs updating. Best regards, Liviu drivers/leds/leds-gpio

Re: [PATCH] tpm: tpm_try_transmit() refactor error flow.

2018-10-17 Thread Jarkko Sakkinen
On Tue, 16 Oct 2018, Tomas Winkler wrote: First, rename out_no_locality to out_locality for bailing out on both tpm_cmd_ready() and tpm_request_locality() failure. This is unnecessary change and technically it is not a rename: the commit message text and the code change do not match. Rename is

Re: [PATCH 4/6] mm: introduce page->dma_pinned_flags, _count

2018-10-17 Thread John Hubbard
On 10/17/18 4:09 AM, Michal Hocko wrote: > On Tue 16-10-18 18:48:23, John Hubbard wrote: > [...] >> It's hard to say exactly what the active/inactive/unevictable list should >> be when DMA is done and put_user_page*() is called, because we don't know >> if some device read, wrote, or ignored any of

[mm PATCH v4 6/6] mm: Use common iterator for deferred_init_pages and deferred_free_pages

2018-10-17 Thread Alexander Duyck
This patch creates a common iterator to be used by both deferred_init_pages and deferred_free_pages. By doing this we can cut down a bit on code overhead as they will likely both be inlined into the same function anyway. This new approach allows deferred_init_pages to make use of __init_pageblock.

Re: possible deadlock in aio_poll

2018-10-17 Thread Andrea Arcangeli
On Mon, Sep 10, 2018 at 09:53:17AM -0700, Christoph Hellwig wrote: > On Mon, Sep 10, 2018 at 12:41:05AM -0700, syzbot wrote: > > = > > WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected > > 4.19.0-rc2+ #229 Not tainted > > ---

[mm PATCH v4 4/6] mm: Move hot-plug specific memory init into separate functions and optimize

2018-10-17 Thread Alexander Duyck
This patch is going through and combining the bits in memmap_init_zone and memmap_init_zone_device that are related to hotplug into a single function called __memmap_init_hotplug. I also took the opportunity to integrate __init_single_page's functionality into this function. In doing so I can get

[mm PATCH v4 5/6] mm: Add reserved flag setting to set_page_links

2018-10-17 Thread Alexander Duyck
This patch modifies the set_page_links function to include the setting of the reserved flag via a simple AND and OR operation. The motivation for this is the fact that the existing __set_bit call still seems to have effects on performance as replacing the call with the AND and OR can reduce initial

[mm PATCH v4 2/6] mm: Drop meminit_pfn_in_nid as it is redundant

2018-10-17 Thread Alexander Duyck
As best as I can tell the meminit_pfn_in_nid call is completely redundant. The deferred memory initialization is already making use of for_each_free_mem_range which in turn will call into __next_mem_range which will only return a memory range if it matches the node ID provided assuming it is not NU

[mm PATCH v4 3/6] mm: Use memblock/zone specific iterator for handling deferred page init

2018-10-17 Thread Alexander Duyck
This patch introduces a new iterator for_each_free_mem_pfn_range_in_zone. This iterator will take care of making sure a given memory range provided is in fact contained within a zone. It takes are of all the bounds checking we were doing in deferred_grow_zone, and deferred_init_memmap. In addition

[mm PATCH v4 1/6] mm: Use mm_zero_struct_page from SPARC on all 64b architectures

2018-10-17 Thread Alexander Duyck
This change makes it so that we use the same approach that was already in use on Sparc on all the archtectures that support a 64b long. This is mostly motivated by the fact that 7 to 10 store/move instructions are likely always going to be faster than having to call into a function that is not spe

[mm PATCH v4 0/6] Deferred page init improvements

2018-10-17 Thread Alexander Duyck
This patchset is essentially a refactor of the page initialization logic that is meant to provide for better code reuse while providing a significant improvement in deferred page initialization performance. In my testing on an x86_64 system with 384GB of RAM and 3TB of persistent memory per node I

Re: [RFC PATCH] soc: qcom: rmtfs_mem: Control remoteproc from rmtfs_mem

2018-10-17 Thread Brian Norris
Hi Bjorn, Sorry for getting back to this late. On Tue, Oct 02, 2018 at 12:34:45PM -0700, Bjorn Andersson wrote: > On Tue 25 Sep 10:29 PDT 2018, Brian Norris wrote: > For the record; I did consider making the rmtfs implementation the one > driving the remoteproc state through /sys/class/remoteproc

Re: [PATCH] dt-bindings: phy-qcom-qmp: Fix several mistakes from prior commits

2018-10-17 Thread Evan Green
On Fri, Oct 12, 2018 at 2:36 PM Douglas Anderson wrote: > > Digging through the "phy-qcom-qmp" showed me many inconsistencies > between the bindings and the reality of the driver. Let's fix them > all. > > * In commit 2d66eab18375 ("dt-bindings: phy: qmp: Add support for QMP > phy in IPQ8074")

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

2018-10-17 Thread Viacheslav Dubeyko
On Wed, 2018-10-17 at 15:01 -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 extrane

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-17 Thread Al Viro
On Wed, Oct 17, 2018 at 10:11:47AM +, David Laight wrote: > From: Phillip Potter > > Sent: 17 October 2018 11:08 > > > > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > > header and replace with simple assignment. For each case, S_IFx >> 12 > > is equal to DT_x, so in

Re: [PATCH 2/2] cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver

2018-10-17 Thread Stephen Boyd
Quoting Taniya Das (2018-10-11 04:36:01) > --- a/drivers/cpufreq/Kconfig.arm > +++ b/drivers/cpufreq/Kconfig.arm > @@ -121,6 +121,17 @@ config ARM_QCOM_CPUFREQ_KRYO > > If in doubt, say N. > > +config ARM_QCOM_CPUFREQ_HW > + bool "QCOM CPUFreq HW driver" Is there any reason this

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

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

[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: [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 > > ---

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: [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 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 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

[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

[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

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 ..

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: [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: [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 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

[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

[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 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 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 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] 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

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

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: [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: [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 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

[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

[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 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 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 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 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 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 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 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 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 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,

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

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: [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/

<    1   2   3   4   5   6   7   8   9   >