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

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

[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

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

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

[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

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:

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

[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

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

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,

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:

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

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

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

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

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

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

[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

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:

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(>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(>wait_list))". This is the current 1.7.0 BIOS with Ubuntu 18.04 userspace, plugging in an LG

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.

[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

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

[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

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

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 ;

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

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:

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

[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

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

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

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

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

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]

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)

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

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

[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

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

[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

[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

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

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

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

[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

[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 =~

[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

[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(-)

[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";

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

[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) +

[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 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";

[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 =~

[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

[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

[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

[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

[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

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

2018-05-31 Thread Steve French
sed 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

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

2018-05-31 Thread Stephen Rothwell
sed 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

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

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?

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: > + booldrop_sb:1; /* T if need to drop an SB > reference */ IMO that should be simply fc->root != NULL - if you keep a dentry, you'd better make sure that its superblock has an active reference, so

Re: [PATCH V2] platform/x86: intel_pmc_core: Add CNP SLPS0 debug registers

2018-05-31 Thread David E. Box
On Thu, 2018-05-31 at 21:38 +0300, Andy Shevchenko wrote: > On Fri, May 25, 2018 at 4:10 AM, David E. Box > wrote: > > Adds debugfs access to registers in the Cannon Point PCH PMC that > > are > > useful for debugging #SLP_S0 signal assertion and other low power > > related > > activities. Device

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

2018-05-31 Thread Andrew Morton
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_prot. Having garbage there causes problems. > > Zero

[RFC/RFT] [PATCH v3 0/4] Intel_pstate: HWP Dynamic performance boost

2018-05-31 Thread Srinivas Pandruvada
v3 - Removed atomic bit operation as suggested. - Added description of contention with user space. - Removed hwp cache, boost utililty function patch and merged with util callback patch. This way any value set is used somewhere. Waiting for test results from Mel Gorman, who is the original

[RFC/RFT] [PATCH v3 1/4] cpufreq: intel_pstate: Add HWP boost utility and sched util hooks

2018-05-31 Thread Srinivas Pandruvada
Added two utility functions to HWP boost up gradually and boost down to the default cached HWP request values. Boost up: Boost up updates HWP request minimum value in steps. This minimum value can reach upto at HWP request maximum values depends on how frequently, this boost up function is

[RFC/RFT] [PATCH v3 4/4] cpufreq: intel_pstate: enable boost for SKX

2018-05-31 Thread Srinivas Pandruvada
Enable HWP boost on Skylake server platform. Signed-off-by: Srinivas Pandruvada --- drivers/cpufreq/intel_pstate.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 254e30a6c1e0..75c5a95bc0ac 100644 ---

[RFC/RFT] [PATCH v3 2/4] cpufreq: intel_pstate: HWP boost performance on IO wakeup

2018-05-31 Thread Srinivas Pandruvada
This change uses SCHED_CPUFREQ_IOWAIT flag to boost HWP performance. Since SCHED_CPUFREQ_IOWAIT flag is set frequently, we don't start boosting steps unless we see two consecutive flags in two ticks. This avoids boosting due to IO because of regular system activities. To avoid synchronization

[RFC/RFT] [PATCH v3 3/4] cpufreq: intel_pstate: New sysfs entry to control HWP boost

2018-05-31 Thread Srinivas Pandruvada
A new attribute is added to intel_pstate sysfs to enable/disable HWP dynamic performance boost. Signed-off-by: Srinivas Pandruvada --- drivers/cpufreq/intel_pstate.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/cpufreq/intel_pstate.c

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, 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_prot. Having garbage there causes problems. > > Zero out all unused

Re: [PATCH v6 4/4] vsprintf: Add command line option debug_boot_weak_hash

2018-05-31 Thread Tobin C. Harding
On Thu, May 31, 2018 at 05:35:15PM -0400, Steven Rostedt wrote: > On Mon, 28 May 2018 11:46:42 +1000 > "Tobin C. Harding" wrote: > > > Currently printing [hashed] pointers requires enough entropy to be > > available. Early in the boot sequence this may not be the case > > resulting in a dummy

Re: [PATCH] ftrace: use non-archaic spelling of failes

2018-05-31 Thread Steven Rostedt
On Thu, 31 May 2018 09:17:01 -0300 Thadeu Lima de Souza Cascardo wrote: > Signed-off-by: Thadeu Lima de Souza Cascardo Acked-by: Steven Rostedt (VMware) -- Steve > --- > kernel/trace/ftrace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/trace/ftrace.c

[PATCH] ALSA: hda - Handle kzalloc() failure in snd_hda_attach_pcm_stream()

2018-05-31 Thread Bo Chen
When 'kzalloc()' fails in 'snd_hda_attach_pcm_stream()', a new pcm instance is created without setting its operators via 'snd_pcm_set_ops()'. Following operations on the new pcm instance can trigger kernel null pointer dereferences and cause kernel oops. This bug was found with my work on

Re: [PATCH v2 0/2] ti-cpufreq: minor fixes/cleanups

2018-05-31 Thread Suman Anna
Hi Rafael, On 05/18/2018 03:19 PM, Rafael J. Wysocki wrote: > On Friday, May 18, 2018 5:07:12 PM CEST Suman Anna wrote: >> On 04/02/2018 11:49 AM, Suman Anna wrote: >>> Hi Viresh, >>> >>> Please find the updated series replacing the previous patch [1] fixing >>> couple of issues in the TI CPUFreq

[PATCH v3 0/2] ti-cpufreq: minor fixes/cleanups

2018-05-31 Thread Suman Anna
Hi Rafael, This is a repost of the v2 patches Ccing the proper linux-pm list. There are no code changes, I have picked up Viresh's acks and also added the stable kernel versions the first patch needs to be applied to. regards Suman v2: https://marc.info/?l=linux-omap=152268780921259=2 v1:

[PATCH v3 2/2] cpufreq: ti-cpufreq: Use devres managed API in probe()

2018-05-31 Thread Suman Anna
The ti_cpufreq_probe() function uses regular kzalloc to allocate the ti_cpufreq_data structure and kfree for freeing this memory on failures. Simplify this code by using the devres managed API. Cc: Zumeng Chen Signed-off-by: Suman Anna Acked-by: Viresh Kumar --- drivers/cpufreq/ti-cpufreq.c |

[PATCH v3 1/2] cpufreq: ti-cpufreq: Fix an incorrect error return value

2018-05-31 Thread Suman Anna
Commit 05829d9431df ("cpufreq: ti-cpufreq: kfree opp_data when failure") has fixed a memory leak in the failure path, however the patch returned a positive value on get_cpu_device() failure instead of the previous negative value. Fix this incorrect error return value properly. Fixes: 05829d9431df

drivers/net/ethernet/sfc/efx.c:3032:1-20: alloc with no test, possible model on line 3041

2018-05-31 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: dd52cb879063ca5470d5a093c32180ba74fa528e commit: f8d6203780b73c07dc49ee421fedae8edb76b6e4 sfc: ARFS filter IDs date: 5 weeks ago coccinelle warnings: (new ones prefixed by >>) >>

  1   2   3   4   5   6   7   >