Re: [PATCH RFC v5] pidns: introduce syscall translate_pid

2018-05-31 Thread Konstantin Khlebnikov
On Thu, May 31, 2018 at 9:05 PM, Eric W. Biederman wrote: > Nagarathnam Muthusamy writes: > >> Ping? Any additional comments on this patch? > > Konstantin's v5 no. > > I am uncomfortable with unnecessary flexibility. I don't want to > encourage the increased usage of pids to identify namespa

[PATCH] x86/vector: Fix the args of vector_alloc tracepoint

2018-05-31 Thread Dou Liyang
The vector_alloc tracepont reversed the reserved and ret aggs, that made the trace print wrong. Exchange them. Signed-off-by: Dou Liyang --- arch/x86/include/asm/trace/irq_vectors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/trace/irq_vectors.h b/ar

Re: [PATCH v2 3/6] clk: ti: dra7: Add clkctrl clock data for the mcan clocks

2018-05-31 Thread Faiz Abbas
Hi, On Thursday 31 May 2018 06:59 PM, Tero Kristo wrote: > On 31/05/18 13:14, Faiz Abbas wrote: >> Hi, >> >> On Thursday 31 May 2018 09:33 AM, Rob Herring wrote: >>> On Wed, May 30, 2018 at 07:41:30PM +0530, Faiz Abbas wrote: Add clkctrl data for the m_can clocks and register it within the >>

Re: [RFC PATCH 4/5] remoteproc: qcom: q6v5-pil: Use common q6v5 helpers

2018-05-31 Thread Sricharan R
Hi Bjorn, On 5/23/2018 10:50 AM, Bjorn Andersson wrote: > Migrate the MSS remoteproc driver to use the newly extracted helper > functions. > > Signed-off-by: Bjorn Andersson > --- > drivers/remoteproc/Kconfig | 4 + > drivers/remoteproc/qcom_q6v5_pil.c | 157 +++---

Re: [PATCH 30/32] vfs: Allow cloning of a mount tree with open(O_PATH|O_CLONE_MOUNT) [ver #8]

2018-05-31 Thread Al Viro
On Thu, May 31, 2018 at 11:26:54PM -0700, Christoph Hellwig wrote: > On Fri, May 25, 2018 at 01:08:38AM +0100, David Howells wrote: > > Make it possible to clone a mount tree with a new pair of open flags that > > are used in conjunction with O_PATH: > > > > (1) O_CLONE_MOUNT - Clone the mount or

Re: [RESEND PATCH v3 1/2] sched/deadline: Add cpudl_maximum_dl() for clean-up

2018-05-31 Thread Byungchul Park
On 2018-06-01 15:02, Joel Fernandes wrote: On Fri, Jun 01, 2018 at 12:07:48PM +0900, Byungchul Park wrote: On 2018-05-25 14:13, Byungchul Park wrote: On 2018-05-09 15:33, Byungchul Park wrote: On Thu, Jan 11, 2018 at 10:07:16AM +0100, Peter Zijlstra wrote: Sorry for the huge delay on

Re: [PATCH 30/32] vfs: Allow cloning of a mount tree with open(O_PATH|O_CLONE_MOUNT) [ver #8]

2018-05-31 Thread Christoph Hellwig
On Fri, May 25, 2018 at 01:08:38AM +0100, David Howells wrote: > Make it possible to clone a mount tree with a new pair of open flags that > are used in conjunction with O_PATH: > > (1) O_CLONE_MOUNT - Clone the mount or mount tree at the path. > > (2) O_NON_RECURSIVE - Don't clone recursively.

Re: [RFC PATCH 3/5] remoteproc: qcom: adsp: Use common q6v5 helpers

2018-05-31 Thread Sricharan R
Hi Bjorn, On 5/23/2018 10:50 AM, Bjorn Andersson wrote: > Migrate the Hexagon V5 PAS (ADSP) driver to using the newly extracted > helper functions. The use of the handover callback does introduce latent > disabling of proxy resources. But apart from this there should be no > change in functionalit

Re: [PATCH v4 2/6] mfd: bd71837: Devicetree bindings for ROHM BD71837 PMIC

2018-05-31 Thread Matti Vaittinen
On Thu, May 31, 2018 at 09:07:24AM -0500, Rob Herring wrote: > On Thu, May 31, 2018 at 5:23 AM, Matti Vaittinen > wrote: > > On Thu, May 31, 2018 at 10:17:17AM +0300, Matti Vaittinen wrote: > >> On Wed, May 30, 2018 at 10:01:29PM -0500, Rob Herring wrote: > >> > On Wed, May 30, 2018 at 11:42:03AM

linux-next: manual merge of the kvm-arm tree with the arm64 tree

2018-05-31 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the kvm-arm tree got conflicts in: arch/arm64/include/asm/kvm_host.h arch/arm64/kvm/hyp/switch.c between commit: 55e3748e8902 ("arm64: KVM: Add ARCH_WORKAROUND_2 support for guests") from the arm64 tree and commits: fa89d31c5306 ("KVM: arm64: Repurp

Re: [RESEND, v3, 2/2] sched/deadline: Initialize cp->elements[].cpu to an invalid value

2018-05-31 Thread Joel Fernandes
On Thu, May 31, 2018 at 11:12:55PM -0700, Joel Fernandes wrote: > On Mon, Jan 08, 2018 at 03:14:41PM +0900, byungchul park wrote: > > Currently, migrating tasks to cpu0 unconditionally happens when the > > heap is empty, since cp->elements[].cpu was initialized to 0(=cpu0). > > We have to distingui

Re: [RFC PATCH 2/5] remoteproc: q6v5: Extract common resource handling

2018-05-31 Thread Sricharan R
Hi Bjorn, Thanks for this much needed consolidation. On 5/23/2018 10:50 AM, Bjorn Andersson wrote: > Shared between all Hexagon V5 based remoteprocs is the handling of the 5 > interrupts and the SMP2P stop request, so break this out into a separate > function in order to allow these drivers to b

Re: [PATCH -mm -V3 00/21] mm, THP, swap: Swapout/swapin THP in one piece

2018-05-31 Thread Naoya Horiguchi
On Wed, May 23, 2018 at 04:26:04PM +0800, Huang, Ying wrote: > From: Huang Ying > > Hi, Andrew, could you help me to check whether the overall design is > reasonable? > > Hi, Hugh, Shaohua, Minchan and Rik, could you help me to review the > swap part of the patchset? Especially [02/21], [03/21]

linux-next: manual merge of the kvm-arm tree with the arm64 tree

2018-05-31 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the kvm-arm tree got a conflict in: arch/arm64/include/asm/cpufeature.h between commits: a43ae4dfe56a ("arm64: Add 'ssbd' command-line option") c32e1736ca03 ("arm64: ssbd: Add global mitigation state accessor") 647d0519b53f ("arm64: ssbd: Restore miti

Re: [RESEND, v3, 2/2] sched/deadline: Initialize cp->elements[].cpu to an invalid value

2018-05-31 Thread Joel Fernandes
On Mon, Jan 08, 2018 at 03:14:41PM +0900, byungchul park wrote: > Currently, migrating tasks to cpu0 unconditionally happens when the > heap is empty, since cp->elements[].cpu was initialized to 0(=cpu0). > We have to distinguish between the empty case and cpu0 to avoid the > unnecessary migrations

Re: [PATCH 1/3] staging: rtlwifi: Fix "Trafic"->"Traffic"

2018-05-31 Thread Greg KH
On Thu, May 31, 2018 at 09:48:23PM +0200, Sabin Mihai Rapan wrote: > In the first patch series I forgot to CC linux-kernel@vger.kernel.org and > assumed (wrongly) that the patch series will be ignored. > In an attempt to fix that, I sent the second patch series with proper > CC added. I should have

Re: [RESEND PATCH v3 1/2] sched/deadline: Add cpudl_maximum_dl() for clean-up

2018-05-31 Thread Joel Fernandes
On Fri, Jun 01, 2018 at 12:07:48PM +0900, Byungchul Park wrote: > > > On 2018-05-25 14:13, Byungchul Park wrote: > > > > > > On 2018-05-09 15:33, Byungchul Park wrote: > > > On Thu, Jan 11, 2018 at 10:07:16AM +0100, Peter Zijlstra wrote: > > > > > > > > > > > > Sorry for the huge delay on thi

Re: [PATCH v2 6/6] staging: lustre: mdc: use large xattr buffers for old servers

2018-05-31 Thread NeilBrown
On Thu, May 31 2018, Dilger, Andreas wrote: > On May 31, 2018, at 18:54, Greg Kroah-Hartman > wrote: >> >> On Tue, May 29, 2018 at 10:21:45AM -0400, James Simmons wrote: >>> From: "John L. Hammond" >>> >>> Pre 2.10.1 MDTs will crash when they receive a listxattr (MDS_GETXATTR >>> with OBD_MD_

How to obtain file's inode in ufshcd driver

2018-05-31 Thread Roman Storozhenko
Hello everybody. I am modifying ufshcd driver: https://elixir.bootlin.com/linux/v3.8/source/drivers/scsi/ufs/ufshcd.c I do a read of a file on ext4 filesystem and want to obtain the file's inode. But it seems that there are no structures contatin any references to inode at this level of abstracti

[PATCH] ASoC: AMD: Configure channel 1 or channel 0 for capture

2018-05-31 Thread Akshu Agrawal
ST/CZ SoC have 2 channels for capture in the I2SSP path. The DMA though these channels is done using the same dma descriptors. We configure the channel and enable it on the basis of channel selected by machine driver. Machine driver knows which codec sits on which channel and thus sends the informa

RE: [PATCH] printk: make printk_safe_flush safe in NMI context by skipping flushing

2018-05-31 Thread Hoeun Ryu
> -Original Message- > From: Petr Mladek [mailto:pmla...@suse.com] > Sent: Wednesday, May 30, 2018 5:32 PM > To: Sergey Senozhatsky > Cc: Hoeun Ryu ; Sergey Senozhatsky > ; Steven Rostedt ; > Hoeun Ryu ; linux-kernel@vger.kernel.org > Subject: Re: [PATCH] printk: make printk_safe_flush s

Re: [PATCH 20/32] vfs: Make close() unmount the attached mount if so flagged [ver #8]

2018-05-31 Thread Al Viro
On Fri, Jun 01, 2018 at 04:18:29AM +0100, Al Viro wrote: > +void umount_on_fput(struct vfsmount *mnt) > { which needs to do mntput() in case if it's attached.

Re: [PATCH v2 0/2] slimbus: Add QCOM SLIMBus NGD driver

2018-05-31 Thread Vinod
On 25-05-18, 12:15, Srinivas Kandagatla wrote: > This patchset adds support to basic version of Qualcomm NGD SLIMBus > controller driver found SoCs from B family. > > This controller is light-weight SLIMBus controller driver responsible for > communicating with slave HW directly over the bus using

[PATCH V6 29/38] x86/intel_rdt: Pseudo-lock region creation/removal core

2018-05-31 Thread Reinette Chatre
The user requests a pseudo-locked region by providing a schemata to a resource group that is in the pseudo-locksetup mode. This is the functionality that consumes the parsed user data and creates the pseudo-locked region. First, required information is deduced from user provided data. This include

Re: [PATCH v2 19/21] bcache: use match_string() helper

2018-05-31 Thread Coly Li
On 2018/6/1 12:32 PM, Yisheng Xie wrote: > Hi Coly, > > On 2018/6/1 11:45, Coly Li wrote: >> On 2018/5/31 7:11 PM, Yisheng Xie wrote: >>> match_string() returns the index of an array for a matching string, >>> which can be used instead of open coded variant. >>> >>> Cc: Kent Overstreet >>> Cc: li

Re: [PATCH] softirq: reorder trace_softirqs_on to prevent lockdep splat

2018-05-31 Thread Joel Fernandes
On Mon, May 07, 2018 at 02:21:17PM -0400, Steven Rostedt wrote: > Peter, Ingo or Thomas, > > Can you queue this up? Or would you prefer that I take it? This patch is a bug fix, could it be queued for v4.17 -rc cycle or for linux-next? I have also included it below again: thanks, - Joel ---8<

[PATCH] x86/microcode/intel: Fix memleak in save_microcode_patch

2018-05-31 Thread Zhenzhong Duan
Free useless ucode_patch entry when it's replaced. Signed-off-by: Zhenzhong Duan --- arch/x86/kernel/cpu/microcode/intel.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c index 1c2cfa

[PATCH] gcc-plugins: disable GCC_PLUGIN_STRUCTLEAK_BYREF_ALL for COMPILE_TEST

2018-05-31 Thread Masahiro Yamada
We have enabled GCC_PLUGINS for COMPILE_TEST, but allmodconfig now produces new warnings. CC [M] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.o drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function ‘wlc_phy_workarounds_nphy_rev7’: drivers/net/wireless/broadcom

Re: [PATCH 2/2] printk: make sure to print log on console.

2018-05-31 Thread Sergey Senozhatsky
On (05/31/18 14:21), Petr Mladek wrote: > > > > Upstream printk has no printing kthread. And we also run > > printk()->console_unlock() with disabled preemption. > > Yes, the comment was wrong Yes, that was the only thing I meant. I really didn't have any time to look at the patch yesterday, jus

Re: [PATCH v2 19/21] bcache: use match_string() helper

2018-05-31 Thread Yisheng Xie
Hi Coly, On 2018/6/1 11:45, Coly Li wrote: > On 2018/5/31 7:11 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used instead of open coded variant. >> >> Cc: Kent Overstreet >> Cc: linux-bca...@vger.kernel.org >> Signed-off-by: Yisheng

Re: [PATCH 0/3] Provide more fine grained control over multipathing

2018-05-31 Thread Mike Snitzer
On Thu, May 31 2018 at 10:40pm -0400, Martin K. Petersen wrote: > > Mike, > > > 1) container A is tasked with managing some dedicated NVMe technology > > that absolutely needs native NVMe multipath. > > > 2) container B is tasked with offering some canned layered product > > that was developed

Re: [PATCH v3 00/16] Provide saturating helpers for allocation

2018-05-31 Thread Kees Cook
On Thu, May 31, 2018 at 5:54 PM, Linus Torvalds wrote: > On Thu, May 31, 2018 at 7:43 PM Kees Cook wrote: >> >> So, while nothing does: >> kmalloc_array(a, b, ...) -> kmalloc(array_size(a, b), ...) >> the treewide changes DO perform changes like this: >> kmalloc(a * b, ...) -> kmalloc(arr

Re: [PATCH 0/3] Provide more fine grained control over multipathing

2018-05-31 Thread Mike Snitzer
On Thu, May 31 2018 at 12:34pm -0400, Christoph Hellwig wrote: > On Thu, May 31, 2018 at 08:37:39AM -0400, Mike Snitzer wrote: > > I saw your reply to the 1/3 patch.. I do agree it is broken for not > > checking if any handles are active. But that is easily fixed no? > > Doing a switch at runti

Re: linux-next: build warnings after merge of the kbuild tree

2018-05-31 Thread Kees Cook
On Thu, May 31, 2018 at 6:56 PM, Masahiro Yamada wrote: > 2018-05-31 12:53 GMT+09:00 Kees Cook : >> On Wed, May 30, 2018 at 6:26 PM, Kees Cook wrote: >>> On Wed, May 30, 2018 at 6:12 PM, Masahiro Yamada >>> wrote: Hi. (+CC Kees) 2018-05-31 7:40 GMT+09:00 Stephen Rothwell : >>

Re: [PATCH v2 19/21] bcache: use match_string() helper

2018-05-31 Thread Coly Li
On 2018/5/31 7:11 PM, Yisheng Xie wrote: > match_string() returns the index of an array for a matching string, > which can be used instead of open coded variant. > > Cc: Kent Overstreet > Cc: linux-bca...@vger.kernel.org > Signed-off-by: Yisheng Xie Hi Yishenng, Andy Shevchenko submitted a p

Re: [PATCH 6/6] arm64: dts: socionext: Add missing cooling device properties for CPUs

2018-05-31 Thread Masahiro Yamada
2018-05-25 14:40 GMT+09:00 Viresh Kumar : > The cooling device properties, like "#cooling-cells" and > "dynamic-power-coefficient", should either be present for all the CPUs > of a cluster or none. If these are present only for a subset of CPUs of > a cluster then things will start falling apart as

Re: [PATCH 05/15] arm: dts: uniphier: Add missing cooling device properties for CPUs

2018-05-31 Thread Masahiro Yamada
2018-05-25 19:31 GMT+09:00 Viresh Kumar : > The cooling device properties, like "#cooling-cells" and > "dynamic-power-coefficient", should either be present for all the CPUs > of a cluster or none. If these are present only for a subset of CPUs of > a cluster then things will start falling apart as

[RESEND] [PATCH] platform/x86: dell-wmi: Ignore new rfkill and fn-lock events

2018-05-31 Thread Kai-Heng Feng
There are two new events generated by dell-wmi, rfkill and fn-lock, from Dell Systems. When Fn-lock hotkey gets pressed to switch to function mode: [85951.591542] dell_wmi: Unknown key with type 0x0010 and code 0xe035 pressed [85951.591546] dell_wmi: Unknown key with type 0x0010 and code 0x pr

Re: [PATCH 20/32] vfs: Make close() unmount the attached mount if so flagged [ver #8]

2018-05-31 Thread Al Viro
FWIW, this on top of your current branch (I'll fold and reorder) gets your move_mount(2) test work, AFAICS: diff --git a/fs/file_table.c b/fs/file_table.c index 06e979e1347e..6dd9760b3ddc 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -200,9 +200,6 @@ static void __fput(struct file *file)

Re: [RESEND PATCH v3 1/2] sched/deadline: Add cpudl_maximum_dl() for clean-up

2018-05-31 Thread Byungchul Park
On 2018-05-25 14:13, Byungchul Park wrote: On 2018-05-09 15:33, Byungchul Park wrote: On Thu, Jan 11, 2018 at 10:07:16AM +0100, Peter Zijlstra wrote: Sorry for the huge delay on this, but I'll have to postpone further. Still busy with meltdown/spectre stuff. Please consider this. Even

[PATCH v3] PCI: mediatek: Add system pm support for MT2712

2018-05-31 Thread honghui.zhang
From: Honghui Zhang The MTCMOS of PCIe Host for MT2712 will be off when system suspend, and all the internal control register will be reset after system resume. The PCIe link should be re-established and the related control register values should be re-set after system resume. Signed-off-by: Hon

Re: [PATCH 0/3] Provide more fine grained control over multipathing

2018-05-31 Thread Martin K. Petersen
Mike, > 1) container A is tasked with managing some dedicated NVMe technology > that absolutely needs native NVMe multipath. > 2) container B is tasked with offering some canned layered product > that was developed ontop of dm-multipath with its own multipath-tools > oriented APIs, etc. And it

4.14.44: BUG_ON(!list_empty(&sem->wait_list));

2018-05-31 Thread Daniel J Blueman
Plugging in a USB-C power source on my Dell XPS 9550 trips an ACPI BUG_ON [1], reproducible with mainline 4.14.44, suggesting other threads are waiting for semaphore acquisition due to "BUG_ON(!list_empty(&sem->wait_list))". This is the current 1.7.0 BIOS with Ubuntu 18.04 userspace, plugging in a

Re: [PATCH v3 2/5] gpio: syscon: rockchip: add GPIO_MUTE support for rk3328

2018-05-31 Thread Levin
Hi Rob, On 2018-05-31 10:45 PM, Rob Herring wrote: On Wed, May 30, 2018 at 10:27 PM, wrote: From: Levin Du In Rockchip RK3328, the output only GPIO_MUTE pin, originally for codec mute control, can also be used for general purpose. It is manipulated by the GRF_SOC_CON10 register. Signed-off

[PATCH] rcu: Check the range of jiffies_till_{first,next}_fqs when setting them

2018-05-31 Thread Byungchul Park
Currently, the range of jiffies_till_{first,next}_fqs are checked and adjusted on and on in the loop of rcu_gp_kthread on runtime. However, it's enough to check them only when setting them, not every time in the loop. So make them handled on a setting time via sysfs. Signed-off-by: Byungchul Park

Re: [PATCH V4] mlx4_core: allocate ICM memory in page size chunks

2018-05-31 Thread Qing Huang
On 5/31/2018 2:10 AM, Michal Hocko wrote: On Thu 31-05-18 10:55:32, Michal Hocko wrote: On Thu 31-05-18 04:35:31, Eric Dumazet wrote: [...] I merely copied/pasted from alloc_skb_with_frags() :/ I will have a look at it. Thanks! OK, so this is an example of an incremental development ;).

[PATCH] clk: vc5: Avoid divide by zero when rounding or setting rates

2018-05-31 Thread Steve Longerbeam
Add checks in the .round_rate and .set_rate ops for zero requested rate or zero parent rate. If either are zero in .round_rate, just return zero. If either are zero in .set_rate, return -EINVAL. Signed-off-by: Steve Longerbeam --- drivers/clk/clk-versaclock5.c | 25 + 1 f

[PATCH] memcg: Replace mm->owner with mm->memcg

2018-05-31 Thread Eric W. Biederman
Recently Kiril Tkhai reported that mm_update_next_ownerwas executing it's expensive for_each_process fallback. Reading the code reveals that all that is needed to trigger this is a multi-threaded process where the thread group leader exits. AKA something anyone can easily trigger an any time.

Re: linux-next: build warnings after merge of the kbuild tree

2018-05-31 Thread Masahiro Yamada
2018-05-31 12:53 GMT+09:00 Kees Cook : > On Wed, May 30, 2018 at 6:26 PM, Kees Cook wrote: >> On Wed, May 30, 2018 at 6:12 PM, Masahiro Yamada >> wrote: >>> Hi. >>> (+CC Kees) >>> >>> 2018-05-31 7:40 GMT+09:00 Stephen Rothwell : Hi Masahiro, After merging the kbuild tree, today's l

linux-next: manual merge of the vfs tree with the ext3 tree

2018-05-31 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the vfs tree got a conflict in: include/linux/fs.h between commit: 29aca8b3f7cd ("fsnotify: introduce prototype struct fsnotify_obj") from the ext3 tree and commit: d9a08a9e616b ("fs: Add aio iopriority support") from the vfs tree. I fixed it up (se

Re: [PATCH v2 0/3] perf script python: Add more PMU fields

2018-05-31 Thread Andi Kleen
On Fri, Jun 01, 2018 at 05:01:00PM +0800, Jin Yao wrote: > When doing pmu sampling and then running a script with > perf script -s script.py, the process_event function gets > dictionary with some fields from the perf ring buffer > (like ip, sym, callchain etc). > > But we miss quite a few fields

RE: [PATCH] printk: make printk_safe_flush safe in NMI context by skipping flushing

2018-05-31 Thread Hoeun Ryu
I appreciate the detailed correction. I will reflect the corrections in the next patch. plus, the explanation in the code will be fixed. > -Original Message- > From: Petr Mladek [mailto:pmla...@suse.com] > Sent: Wednesday, May 30, 2018 5:32 PM > To: Sergey Senozhatsky > Cc: Hoeun Ryu ; Se

Re: [PATCH 20/32] vfs: Make close() unmount the attached mount if so flagged [ver #8]

2018-05-31 Thread Al Viro
On Thu, May 31, 2018 at 08:19:55PM +0100, Al Viro wrote: > On Fri, May 25, 2018 at 01:07:34AM +0100, David Howells wrote: > > + if (unlikely(file->f_mode & FMODE_NEED_UNMOUNT)) > > + __detach_mounts(dentry); > > + > > This is completely wrong. First of all, you want to dissolve the mo

linux-next: manual merge of the vfs tree with Linus' tree

2018-05-31 Thread Stephen Rothwell
Hi Al, Today's linux-next merge of the vfs tree got a conflict in: fs/afs/fsclient.c between commit: 684b0f68cf1c ("afs: Fix AFSFetchStatus decoder to provide OpenAFS compatibility") from Linus' tree and commit: c875c76a061d ("afs: Fix a Sparse warning in xdr_decode_AFSFetchStatus()")

Re: [PATCH] clk: vc5: Fix div-by-0 when rounding a rate of zero

2018-05-31 Thread Steve Longerbeam
On 05/31/2018 12:37 PM, Marek Vasut wrote: On 05/31/2018 08:52 PM, Steve Longerbeam wrote: On 05/31/2018 11:35 AM, Marek Vasut wrote: On 05/31/2018 08:32 PM, Steve Longerbeam wrote: Hi Marek, On 05/31/2018 11:25 AM, Marek Vasut wrote: On 05/31/2018 08:23 PM, Steve Longerbeam wrote: Jus

Re: [RFC] rcu: Check the range of jiffies_till_xxx_fqs on setting them

2018-05-31 Thread Byungchul Park
On 2018-05-31 20:17, Paul E. McKenney wrote: On Thu, May 31, 2018 at 11:51:40AM +0900, Byungchul Park wrote: On 2018-05-31 11:18, Byungchul Park wrote: On 2018-05-29 21:01, Paul E. McKenney wrote: One approach would be to embed the kernel_params_ops structure inside another structure conta

[PATCH] clocksource/drivers/imx: add input capture support

2018-05-31 Thread Fabio Estevam
From: Steve Longerbeam This patch adds support for the input capture function in the i.MX GPT. Output compare and input capture functions are mixed in the same register block, so we need to modify the irq ack/enable/ disable primitives to not stomp on the other function. The input capture API is

Re: [PATCH] autofs: make autofs4 and autofs mutually exclusive

2018-05-31 Thread Ian Kent
On Thu, 2018-05-31 at 17:13 -0700, Andrew Morton wrote: > On Wed, 30 May 2018 17:18:55 +0800 Ian Kent wrote: > > > > I actually had an alternative approach that I tried out successfully > > > but discarded as being too different from the original code. Just for > > > reference, this one would wor

Re: Can kfree() sleep at runtime?

2018-05-31 Thread Nadav Amit
Jia-Ju Bai wrote: > > > On 2018/5/31 22:30, Christopher Lameter wrote: >> On Thu, 31 May 2018, Matthew Wilcox wrote: >> Freeing a page in the page allocator also was traditionally not sleeping. That has changed? >>> No. "Your bug" being "The bug in your static analysis tool". It pr

Re: Can kfree() sleep at runtime?

2018-05-31 Thread Jia-Ju Bai
On 2018/5/31 22:30, Christopher Lameter wrote: On Thu, 31 May 2018, Matthew Wilcox wrote: Freeing a page in the page allocator also was traditionally not sleeping. That has changed? No. "Your bug" being "The bug in your static analysis tool". It probably isn't following the data flow corr

Re: [PATCH 1/2] power: supply: sbs-battery: don't assume MANUFACTURER_DATA formats

2018-05-31 Thread Guenter Roeck
Hi Brian, On 05/31/2018 05:32 PM, Brian Norris wrote: This driver was originally submitted for the TI BQ20Z75 battery IC (commit a7640bfa10c5 ("power_supply: Add driver for TI BQ20Z75 gas gauge IC")) and later renamed to express generic SBS support. While it's mostly true that this driver implem

Re: Can kfree() sleep at runtime?

2018-05-31 Thread Jia-Ju Bai
On 2018/5/31 22:09, Christopher Lameter wrote: On Thu, 31 May 2018, Jia-Ju Bai wrote: I write a static analysis tool (DSAC), and it finds that kfree() can sleep. That should not happen. Here is the call path for kfree(). Please look at it *from the bottom up*. [FUNC] alloc_pages(GFP_KERN

Re: Can kfree() sleep at runtime?

2018-05-31 Thread Jia-Ju Bai
On 2018/5/31 22:08, Matthew Wilcox wrote: On Thu, May 31, 2018 at 09:10:07PM +0800, Jia-Ju Bai wrote: I write a static analysis tool (DSAC), and it finds that kfree() can sleep. Here is the call path for kfree(). Please look at it *from the bottom up*. [FUNC] alloc_pages(GFP_KERNEL) arch/x8

include/linux/syscalls.h:211:18: error: 'sys_mmap2' alias between functions of incompatible types 'long int(long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigne

2018-05-31 Thread kbuild test robot
Hi Al, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 0512e0134582ef85dee77d51aae77dcd1edec495 commit: ee076e81fc14ca79334d02970cea66604f183a14 sparc: trivial conversions to {COMPAT_,}SYSCALL_DEFINE() date: 2 mon

Re: [PATCH 0/4] exit: Make unlikely case in mm_update_next_owner() more scalable

2018-05-31 Thread Eric W. Biederman
Michal Hocko writes: > On Thu 26-04-18 14:00:19, Kirill Tkhai wrote: >> This function searches for a new mm owner in children and siblings, >> and then iterates over all processes in the system in unlikely case. >> Despite the case is unlikely, its probability growths with the number >> of proces

[PATCH v2 0/3] perf script python: Add more PMU fields

2018-05-31 Thread Jin Yao
When doing pmu sampling and then running a script with perf script -s script.py, the process_event function gets dictionary with some fields from the perf ring buffer (like ip, sym, callchain etc). But we miss quite a few fields we report now, for example, LBRs,data source,weight,transaction,iregs

[PATCH v2 1/3] perf script python: Move dsoname code to a new function

2018-05-31 Thread Jin Yao
This patch creates a new function get_dsoname() and move the code which gets the dsoname string to this function. That's because in next patch, when we process LBR data, we will also need get_dsoname() to return dsoname for branch from/to. Signed-off-by: Jin Yao --- .../util/scripting-engines/t

[PATCH v2 2/3] perf script python: Add more PMU fields

2018-05-31 Thread Jin Yao
When doing pmu sampling and then running a script with perf script -s script.py, the process_event function gets dictionary with some fields from the perf ring buffer (like ip, sym, callchain etc). But we miss quite a few fields we report now, for example, LBRs,data source,weight,transaction,iregs

[PATCH v2 3/3] perf script python: Add fields introduction to Documentation

2018-05-31 Thread Jin Yao
Add the brief introduction of fields to perf-script-python.txt. It may help python script developer easily finding what fields are supported. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-script-python.txt | 26 + 1 file changed, 26 insertions(+) diff --git a

Re: Can printk() sleep at runtime?

2018-05-31 Thread Jia-Ju Bai
On 2018/6/1 5:13, Steven Rostedt wrote: On Thu, 31 May 2018 18:42:48 +0200 Geert Uytterhoeven wrote: Hi Stephen, On Thu, May 31, 2018 at 5:19 PM, Stephen Boyd wrote: Quoting Linus Torvalds (2018-05-31 07:32:10) On Thu, May 31, 2018 at 5:05 AM Petr Mladek wrote: Anyway, we need to fix

Re: [PATCH v3 00/16] Provide saturating helpers for allocation

2018-05-31 Thread Linus Torvalds
On Thu, May 31, 2018 at 7:43 PM Kees Cook wrote: > > So, while nothing does: > kmalloc_array(a, b, ...) -> kmalloc(array_size(a, b), ...) > the treewide changes DO perform changes like this: > kmalloc(a * b, ...) -> kmalloc(array_size(a, b), ...) Ugh. I really really still absolutely desp

Re: [PATCH v3] mm: fix race between kmem_cache destroy, create and deactivate

2018-05-31 Thread Shakeel Butt
On Thu, May 31, 2018 at 5:18 PM, Andrew Morton wrote: > On Tue, 29 May 2018 17:12:04 -0700 Shakeel Butt wrote: > >> The memcg kmem cache creation and deactivation (SLUB only) is >> asynchronous. If a root kmem cache is destroyed whose memcg cache is in >> the process of creation or deactivation,

[PATCH v3 06/16] mm: Use overflow helpers in kmalloc_array*()

2018-05-31 Thread Kees Cook
Instead of open-coded multiplication and bounds checking, use the new overflow helper. Signed-off-by: Kees Cook --- include/linux/slab.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/linux/slab.h b/include/linux/slab.h index 81ebd71f8c03..4d759e1d

[PATCH v3 05/16] lib: overflow: Add memory allocation overflow tests

2018-05-31 Thread Kees Cook
Make sure that the memory allocators are behaving as expected in the face of overflows. Signed-off-by: Kees Cook --- lib/test_overflow.c | 109 1 file changed, 109 insertions(+) diff --git a/lib/test_overflow.c b/lib/test_overflow.c index 482d71c880f

[PATCH v3 01/16] compiler.h: enable builtin overflow checkers and add fallback code

2018-05-31 Thread Kees Cook
From: Rasmus Villemoes This adds wrappers for the __builtin overflow checkers present in gcc 5.1+ as well as fallback implementations for earlier compilers. It's not that easy to implement the fully generic __builtin_X_overflow(T1 a, T2 b, T3 *d) in macros, so the fallback code assumes that T1, T

[PATCH v3 16/16] treewide: Use array_size() for devm_*alloc()-like, leftovers

2018-05-31 Thread Kees Cook
This swaps the remaining multi-factor products in handle-based allocators like devm_*alloc(), sock_*alloc(), and f2fs_*alloc(). Generated with the following Coccinelle script: // Any remaining multi-factor products, first at least 3-factor products... @@ identifier alloc =~ "devm_kmalloc|devm_kza

[PATCH v3 08/16] device: Use overflow helpers for devm_kmalloc()

2018-05-31 Thread Kees Cook
Use the overflow helpers both in existing multiplication-using inlines as well as the addition-overflow case in the core allocation routine. Signed-off-by: Kees Cook --- drivers/base/devres.c | 7 ++- include/linux/device.h | 8 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) di

[PATCH v3 07/16] mm: Use overflow helpers in kvmalloc()

2018-05-31 Thread Kees Cook
Instead of open-coded multiplication and bounds checking, use the new overflow helper. Additionally prepare for vmalloc() users to add array_size()-family helpers in the future. Signed-off-by: Kees Cook --- include/linux/mm.h | 7 +-- include/linux/vmalloc.h | 1 + 2 files changed, 6 in

[PATCH v3 15/16] treewide: Use array_size() for devm_*alloc()-like

2018-05-31 Thread Kees Cook
As done for kmalloc()-family, this handles 2 and 3 factor products in devm_*alloc(), sock_*alloc(), and f2fs_*alloc(), with the following Coccinelle script: // 2-factor product with sizeof(variable) @@ identifier alloc =~ "devm_kmalloc|devm_kzalloc|sock_kmalloc|f2fs_kmalloc|f2fs_kzalloc"; express

[PATCH v3 02/16] lib: add runtime test of check_*_overflow functions

2018-05-31 Thread Kees Cook
From: Rasmus Villemoes This adds a small module for testing that the check_*_overflow functions work as expected, whether implemented in C or using gcc builtins. Signed-off-by: Rasmus Villemoes Signed-off-by: Kees Cook --- lib/Kconfig.debug | 3 + lib/Makefile| 1 + lib/test_ove

[PATCH v3 14/16] treewide: Use array_size() for vmalloc()

2018-05-31 Thread Kees Cook
As already done for the kmalloc()-family, this is the same for vmalloc(). Generated with the following Coccinelle script: // 2-factor product with sizeof(variable) @@ identifier alloc =~ "vmalloc|vzalloc"; expression THING; identifier COUNT; @@ - alloc(sizeof(THING) * COUNT) + alloc(array_size(C

[PATCH v3 10/16] treewide: Use struct_size() for vmalloc()-family

2018-05-31 Thread Kees Cook
This only finds one hit in the entire tree, but here's the Coccinelle: // Directly refer to structure's field @@ identifier alloc =~ "vmalloc|vzalloc"; identifier VAR, ELEMENT; expression COUNT; @@ - alloc(sizeof(*VAR) + COUNT * sizeof(*VAR->ELEMENT)) + alloc(struct_size(VAR, ELEMENT, COUNT)) //

[PATCH v3 11/16] treewide: Use struct_size() for devm_kmalloc() and friends

2018-05-31 Thread Kees Cook
Replaces open-coded struct size calculations with struct_size() for devm_*, f2fs_*, and sock_* allocations. Automatically generated (and manually adjusted) from the following Coccinelle script: // Direct reference to struct field. @@ identifier alloc =~ "devm_kmalloc|devm_kzalloc|sock_kmalloc|f2f

[PATCH v3 09/16] treewide: Use struct_size() for kmalloc()-family

2018-05-31 Thread Kees Cook
Automatic conversion with manual review for non-standard cases, using the following Coccinelle script: // pkey_cache = kmalloc(sizeof *pkey_cache + tprops->pkey_tbl_len * // sizeof *pkey_cache->table, GFP_KERNEL); @@ identifier alloc =~ "kmalloc|kzalloc|kvmalloc|kvzalloc"; exp

[PATCH v3 03/16] lib: overflow: Report test failures

2018-05-31 Thread Kees Cook
This adjusts the overflow test to report failures, and prepares to add allocation tests. Signed-off-by: Kees Cook --- lib/test_overflow.c | 75 - 1 file changed, 54 insertions(+), 21 deletions(-) diff --git a/lib/test_overflow.c b/lib/test_overflow.c

[PATCH v3 04/16] overflow.h: Add allocation size calculation helpers

2018-05-31 Thread Kees Cook
In preparation for replacing unchecked overflows for memory allocations, this creates helpers for the 3 most common calculations: array_size(a, b): 2-dimensional array array3_size(a, b, c): 3-dimensional array struct_size(ptr, member, n): struct followed by n-many trailing members Each of these r

[PATCH v3 00/16] Provide saturating helpers for allocation

2018-05-31 Thread Kees Cook
This is a stab at providing three new helpers for allocation size calculation: struct_size(), array_size(), and array3_size(). These are implemented on top of Rasmus's overflow checking functions. The existing allocators are adjusted to use the more efficient overflow checks as well. While the t

[RFC PATCH] PCI: mediatek: mtk_pcie_pm_ops can be static

2018-05-31 Thread kbuild test robot
Fixes: 24dc21cd1e9d ("PCI: mediatek: Add system pm support for MT2712") Signed-off-by: kbuild test robot --- pcie-mediatek.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c index e3b16b0..e01cc66 100644 -

Re: [PATCH] PCI: mediatek: Add system pm support for MT2712

2018-05-31 Thread kbuild test robot
Hi Honghui, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on pci/next] [also build test WARNING on next-20180531] [cannot apply to v4.17-rc7] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https

Re: [PATCH v2 16/21] ASoC: max98088: use match_string() helper

2018-05-31 Thread Yisheng Xie
Hi Mark, On 2018/6/1 0:02, Mark Brown wrote: > On Thu, May 31, 2018 at 08:25:39PM +0800, Yisheng Xie wrote: > >> Anyway, Here is the cover letter of v1 and I have add v2's cover letter to >> you: >> https://lkml.org/lkml/2018/5/21/303 > >> Each patch in this patchset is a separate one, for wh

[PATCH 2/2] dt-bindings: power: sbs-battery: re-document "ti,bq20z75"

2018-05-31 Thread Brian Norris
This compatible property was documented before the driver was renamed to "SBS" (see commit e57f1b68c406 ("devicetree-bindings: Propagate bq20z75->sbs rename to dt bindings")). The driver has continued to support this property as an alternative to "sbs,sbs-battery", and because we've noticed there a

[PATCH 1/2] power: supply: sbs-battery: don't assume MANUFACTURER_DATA formats

2018-05-31 Thread Brian Norris
This driver was originally submitted for the TI BQ20Z75 battery IC (commit a7640bfa10c5 ("power_supply: Add driver for TI BQ20Z75 gas gauge IC")) and later renamed to express generic SBS support. While it's mostly true that this driver implemented a standard SBS command set, it takes liberties with

Re: linux-next: build failure after merge of the cifs tree

2018-05-31 Thread Steve French
ns) > ^~ > > Caused by commit > > 12a778233fc4 ("smb3: Add posix create context for smb3.11 posix mounts") > > # CONFIG_CIFS_SMB311 is not set > > I have used the cifs tree from next-20180531 for today. > > -- > Cheers, > Stephen Rothwell -- Thanks, Steve

Re: [PATCH v3] mm: fix race between kmem_cache destroy, create and deactivate

2018-05-31 Thread Andrew Morton
On Tue, 29 May 2018 17:12:04 -0700 Shakeel Butt wrote: > The memcg kmem cache creation and deactivation (SLUB only) is > asynchronous. If a root kmem cache is destroyed whose memcg cache is in > the process of creation or deactivation, the kernel may crash. > > Example of one such crash: >

Re: [PATCH] autofs: make autofs4 and autofs mutually exclusive

2018-05-31 Thread Andrew Morton
On Wed, 30 May 2018 17:18:55 +0800 Ian Kent wrote: > > I actually had an alternative approach that I tried out successfully > > but discarded as being too different from the original code. Just for > > reference, this one would work as well, and allow both to be > > compiled together. The version

linux-next: build failure after merge of the cifs tree

2018-05-31 Thread Stephen Rothwell
posix_extensions) ^~ Caused by commit 12a778233fc4 ("smb3: Add posix create context for smb3.11 posix mounts") # CONFIG_CIFS_SMB311 is not set I have used the cifs tree from next-20180531 for today. -- Cheers, Stephen Rothwell pgp3LcaESwiTb.pgp Description: OpenPGP digital signature

Re: [PATCH] Make elf2ecoff work on 64bit host machines

2018-05-31 Thread Paul Burton
Hi Thomas, On Mon, May 28, 2018 at 01:26:24PM +0200, Thomas Bogendoerfer wrote: > Use fixed width integer types for ecoff structs to make elf2ecoff work > on 64bit host machines > > Signed-off-by: Thomas Bogendoerfer > --- > arch/mips/boot/ecoff.h | 58 > +++

Re: [PATCH v8 0/7] i2c: Add FSI-attached I2C master algorithm

2018-05-31 Thread Benjamin Herrenschmidt
On Thu, 2018-05-31 at 09:29 +0300, Andy Shevchenko wrote: > > If you have specific issues with how this is done, please express them > > clearly. It's quite possible that there's some better way to do what > > Eddie is doing here, but without *construtive* feedback this is > > pointless. > > It fe

Re: [PATCH] mm/shmem: Zero out unused vma fields in shmem_pseudo_vma_init()

2018-05-31 Thread Hugh Dickins
On Thu, 31 May 2018, Andrew Morton wrote: > On Thu, 31 May 2018 16:56:02 +0300 "Kirill A. Shutemov" > wrote: > > > shmem/tmpfs uses pseudo vma to allocate page with correct NUMA policy. > > > > The pseudo vma doesn't have vm_page_prot set. We are going to encode > > encryption KeyID in vm_page_

Re: [PATCH 03/32] VFS: Introduce the basic header for the new mount API's filesystem context [ver #8]

2018-05-31 Thread Al Viro
On Fri, May 25, 2018 at 01:05:43AM +0100, David Howells wrote: > + void*fs_private;/* The filesystem's context */ ... > + void*s_fs_info; /* Proposed s_fs_info */ While we are at it, do we really need both in generic interface?

  1   2   3   4   5   6   >