Re: [PATCH v5 06/13] lockdep: Implement crossrelease feature

2017-03-05 Thread Byungchul Park
On Fri, Mar 03, 2017 at 08:50:03AM +0900, Byungchul Park wrote: > On Thu, Mar 02, 2017 at 06:39:49AM -0800, Matthew Wilcox wrote: > > On Thu, Mar 02, 2017 at 01:45:35PM +0900, byungchul.park wrote: > > > From: Matthew Wilcox [mailto:wi...@infradead.org] > > > > On Tue, Feb 28, 2017 at 07:15:47PM +0

Re: [PATCH] ib_srp: Let compiler ignore the useless debug code

2017-03-05 Thread Leon Romanovsky
On Fri, Feb 24, 2017 at 04:16:31PM +, Bart Van Assche wrote: > On Fri, 2017-02-24 at 16:44 +0800, Minfei Huang wrote: > > "if (0)" is used to make this block of debug code not be executed. There > > is a more elegant way to let compiler ignore this code, using > > "#if 0 .. #endif" instead. > >

Fwd: Query - Related to kernel changes for GFP_NOIO flag

2017-03-05 Thread Suraj Choudhari
Hi, GFP_NOIO flag used for kmalloc is currently defined as - '__GFP_RECLAIM' #define GFP_NOIO(__GFP_RECLAIM) #define __GFP_RECLAIM ((__force gfp_t)(___GFP_DIRECT_RECLAIM|___GFP_KSWAPD_RECLAIM However, prior to 4.4 kernel, this flag was defined as __GFP_WAIT. #define GFP_NOIO(_

Re: [Xen-devel] [PATCH v2 14/21] x86/xen: split suspend.c for PV and PVHVM guests

2017-03-05 Thread kbuild test robot
-untangle-PV-and-PVHVM-guest-support-code/20170305-162950 base: https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git linux-next config: x86_64-randconfig-i0-03021655 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build

[PATCH 1/6] powerpc/perf: Define big-endian version of perf_mem_data_src

2017-03-05 Thread Madhavan Srinivasan
perf_mem_data_src is an union that is initialized via the ->val field and accessed via the bitmap fields. For this to work on big endian platforms, we also need a big-endian represenation of perf_mem_data_src. Signed-off-by: Madhavan Srinivasan Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Car

[PATCH 0/6] powerpc/perf: Export memory hierarchy level

2017-03-05 Thread Madhavan Srinivasan
Power8/Power9 Perforence Monitoring Unit (PMU) supports different sampling modes (SM) such as Random Instruction Sampling (RIS), Random Load/Store Facility Sampling (RLS) and Random Branch Sampling (RBS). Sample mode RLS updates Sampled Instruction Event Register [SIER] bits with memory hierarchy i

[PATCH 3/6] powerpc/perf: Support to export MMCRA[TEC*] field to userspace

2017-03-05 Thread Madhavan Srinivasan
Threshold feature when used with MMCRA [Threshold Event Counter Event], MMCRA[Threshold Start event] and MMCRA[Threshold End event] will update MMCRA[Threashold Event Counter Exponent] and MMCRA[Threshold Event Counter Multiplier] with the corresponding threshold event count values. Patch to export

[PATCH 6/6] powerpc/perf: Add Power8 mem_access event to sysfs

2017-03-05 Thread Madhavan Srinivasan
Patch add "mem_access" event to sysfs. This as-is not a raw event supported by Power8 pmu. Instead, it is formed based on raw event encoding specificed in isa207-common.h. Primary PMU event used here is PM_MRK_INST_CMPL. This event tracks only the completed marked instructions. Random sampling mo

[PATCH 4/6] powerpc/perf: Support to export SIERs bit in Power8

2017-03-05 Thread Madhavan Srinivasan
Patch to export SIER bits to userspace via perf_mem_data_src and perf_sample_data struct. Signed-off-by: Madhavan Srinivasan Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Sukadev Bhattiprolu Cc: Daniel Axtens Cc: Andrew Donnellan --- arch/powerpc/perf/power8-pmu.c | 2 ++ 1 file changed

[PATCH 2/6] powerpc/perf: Export memory hierarchy info to user space

2017-03-05 Thread Madhavan Srinivasan
The LDST field and DATA_SRC in SIER identifies the memory hierarchy level (eg: L1, L2 etc), from which a data-cache miss for a marked instruction was satisfied. Use the 'perf_mem_data_src' object to export this hierarchy level to user space. Signed-off-by: Madhavan Srinivasan Cc: Benjamin Herrens

[PATCH 5/6] powerpc/perf: Support to export SIERs bit in Power9

2017-03-05 Thread Madhavan Srinivasan
Patch to export SIER bits to userspace via perf_mem_data_src and perf_sample_data struct. Signed-off-by: Madhavan Srinivasan Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Sukadev Bhattiprolu Cc: Daniel Axtens Cc: Andrew Donnellan --- arch/powerpc/perf/power9-pmu.c | 2 ++ 1 file changed

Re: [PATCH] MIPS: reset all task's asid to 0 after asid_cache(cpu) overflows

2017-03-05 Thread Sergei Shtylyov
Hello! On 3/5/2017 6:24 AM, Jiwei Sun wrote: If asid_cache(cpu) overflows, there may be two tasks with the same asid. It is a risk that the two different tasks may have the same address space. A process will update its asid to newer version only when switch_mm() is called and matches the follo

Arrays of variable length

2017-03-05 Thread Tomas Winkler
Sparse complains for arrays declared with variable length 'warning: Variable length array is used' Prior to c99 this was not allowed but lgcc (c99) doesn't have problem with that https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html. And also Linux kernel compilation with W=1 doesn't complain.

Re: Question Regarding ERMS memcpy

2017-03-05 Thread Borislav Petkov
On Sat, Mar 04, 2017 at 04:56:38PM -0800, h...@zytor.com wrote: > That's what the -march= and -mtune= option do! How does that even help with a distro kernel built with -mtune=generic ? gcc can't possibly know on what targets is that kernel going to be booted on. So it probably does some universa

Re: Question Regarding ERMS memcpy

2017-03-05 Thread Borislav Petkov
On Sat, Mar 04, 2017 at 09:58:14PM -0700, Logan Gunthorpe wrote: > So, I've found that my kernel config had the OPTIMIZE_FOR_SIZE selected > instead of OPTIMIZE_FOR_PERFORMANCE. I'm not sure why that is but > switching to the latter option fixes my problem. A memcpy call is used > instead of the po

[PATCH v6 0/3] Add pixel format for 10 bits YUV video

2017-03-05 Thread Randy Li
Thanks to Clint's work, this version just correct some wrong info in the comment. I also offer a driver sample here, but it have been verified with the 10 bits properly. I lacks of the userspace tool. And I am not sure whether it is a properly way to support the pixel format used in rockchip, alth

[PATCH v6 2/3] v4l: Add 10/16-bits per channel YUV pixel formats

2017-03-05 Thread Randy Li
The formats added by this patch are: V4L2_PIX_FMT_P010 V4L2_PIX_FMT_P010M V4L2_PIX_FMT_P016 V4L2_PIX_FMT_P016M Currently, none of driver uses those format. Also a variant of V4L2_PIX_FMT_P010M pixel format is added. The V4L2_PIX_FMT_P010CM is a compat variant of the

[PATCH v6 1/3] drm_fourcc: Add new P010, P016 video format

2017-03-05 Thread Randy Li
P010 is a planar 4:2:0 YUV with interleaved UV plane, 10 bits per channel video format. P016 is a planar 4:2:0 YUV with interleaved UV plane, 16 bits per channel video format. V3: Added P012 and fixed cpp for P010 V4: format definition refined per review V5: Format comment block for each new pixe

Re: Arrays of variable length

2017-03-05 Thread Al Viro
On Sun, Mar 05, 2017 at 11:44:33AM +0200, Tomas Winkler wrote: > Sparse complains for arrays declared with variable length > > 'warning: Variable length array is used' > > Prior to c99 this was not allowed but lgcc (c99) doesn't have problem > with that https://gcc.gnu.org/onlinedocs/gcc/Variabl

[PATCH v6 3/3] drm/rockchip: Support 10 bits yuv format in vop

2017-03-05 Thread Randy Li
The rockchip use a special pixel format for those yuv pixel format with 10 bits color depth. Signed-off-by: Randy Li --- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 1 + drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 34 ++--- drivers/gpu/drm/rockchip/rockchip_drm_vop.h

Re: [PATCH v2 1/2] iio: Allow triggers to be used as parent of others triggers

2017-03-05 Thread Jonathan Cameron
On 25/02/17 21:12, Jason Kridner wrote: > > >> On Feb 19, 2017, at 10:08 AM, Jonathan Cameron wrote: >> >>> On 16/02/17 14:23, Benjamin Gaignard wrote: >>> Add "parent_trigger" sysfs attribute to iio trigger to be able >>> to set a parent to the current trigger. >>> Parent trigger edges or level

Re: [PATCH v3 2/2] iio: stm32 trigger: Implement parent trigger feature

2017-03-05 Thread Jonathan Cameron
On 26/02/17 15:03, Benjamin Gaignard wrote: > 2017-02-26 15:59 GMT+01:00 Benjamin Gaignard : >> 2017-02-25 18:53 GMT+01:00 Jonathan Cameron : >>> On 24/02/17 14:48, Benjamin Gaignard wrote: Add validate_trigger function in iio_trigger_ops and dev_attr_parent_trigger into trigger attribute

[PATCH] rcu: fix warning in rcu_seq_end()

2017-03-05 Thread Dmitry Vyukov
rcu_seq_end() increments seq signifying completion of a grace period, after that checks that the seq is even and wakes _synchronize_rcu_expedited(). _synchronize_rcu_expedited() uses wait_event() to wait for even seq. The problem is that wait_event() can return as soon as seq becomes even without w

Re: rcu: WARNING in rcu_seq_end

2017-03-05 Thread Dmitry Vyukov
On Sat, Mar 4, 2017 at 9:40 PM, Paul E. McKenney wrote: > On Sat, Mar 04, 2017 at 05:01:19PM +0100, Dmitry Vyukov wrote: >> Hello, >> >> Paul, you wanted bugs in rcu. > > Well, whether I want them or not, I must deal with them. ;-) > >> I've got this WARNING while running syzkaller fuzzer on >> 8

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-03-05 Thread Dmitry Vyukov
On Sat, Mar 4, 2017 at 9:15 PM, Eric Dumazet wrote: >> > On 3/3/17 6:39 AM, Dmitry Vyukov wrote: >> >> I am getting heap out-of-bounds reports in >> >> fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone while running >> >> syzkaller fuzzer on 86292b33d4b79ee03e2f43ea0381ef85f077c760. They all

Re: [PATCH 1/2] dt-bindings: iio: stm32-adc: add option to set resolution

2017-03-05 Thread Jonathan Cameron
On 28/02/17 10:14, Fabrice Gasnier wrote: > On 02/28/2017 09:34 AM, Lars-Peter Clausen wrote: >> On 02/28/2017 09:21 AM, Fabrice Gasnier wrote: >>> On 02/25/2017 04:11 PM, Jonathan Cameron wrote: On 24/02/17 16:04, Fabrice Gasnier wrote: > On 02/19/2017 01:09 PM, Jonathan Cameron wrote: >>

Re: fs: use-after-free in path_lookupat

2017-03-05 Thread Dmitry Vyukov
On Sat, Mar 4, 2017 at 8:39 PM, Al Viro wrote: > On Sat, Mar 04, 2017 at 03:59:36PM +0100, Dmitry Vyukov wrote: > >> I am getting the following use-after-free reports while running >> syzkaller fuzzer on 86292b33d4b79ee03e2f43ea0381ef85f077c760 (but also >> happened on 6dc39c50e4aeb769c8ae06edf2b1

Re: [PATCH v1 1/2] iio: Generalize counting direction modes

2017-03-05 Thread Jonathan Cameron
On 01/03/17 14:45, Benjamin Gaignard wrote: > Move counting direction documentation for 104-quad-8 to sysfs-bus-iio > to avoid duplicated for other incoming drivers > > Signed-off-by: Benjamin Gaignard Applied to the togreg branch of iio.git and pushed out as testing to be completely ignored by t

Re: Question Regarding ERMS memcpy

2017-03-05 Thread Borislav Petkov
On Sun, Mar 05, 2017 at 10:50:59AM +0100, Borislav Petkov wrote: > On Sat, Mar 04, 2017 at 04:56:38PM -0800, h...@zytor.com wrote: > > That's what the -march= and -mtune= option do! > > How does that even help with a distro kernel built with -mtune=generic ? > > gcc can't possibly know on what ta

Re: [PATCH] Staging: iio: addac - fixed octal file permissions

2017-03-05 Thread Jonathan Cameron
On 05/03/17 06:59, Derek Robson wrote: > Changed file permission to octal style. > Found using checkpatch > > Signed-off-by: Derek Robson Hi Derek, I've already applied a similar patch to the iio.git tree. It just hasn't made it to the main staging tree quite yet. Thanks, Joanthan > --- > dr

[PATCH 2/3] staging: sm750fb: function prototype argument should have an identifier name

2017-03-05 Thread Arushi Singhal
function prototype arguments like 'struct vb_device_info *','unsigned long' etc. should have an identifier name. Signed-off-by: Arushi Singhal --- drivers/staging/sm750fb/ddk750_display.h | 2 +- drivers/staging/sm750fb/ddk750_mode.h| 2 +- drivers/staging/sm750fb/ddk750_power.h | 2 +- dr

[PATCH 1/3] staging: sm750fb: fixes add blank line after function/struct/union/enum declarations

2017-03-05 Thread Arushi Singhal
This patch fixes the warnings reported by checkpatch.pl for please use a blank line after function/struct/union/enum declarations. Signed-off-by: Arushi Singhal --- drivers/staging/sm750fb/ddk750_display.h | 1 + drivers/staging/sm750fb/ddk750_mode.h| 2 ++ drivers/staging/sm750fb/ddk750_pow

[PATCH 3/3] staging: sm750fb: Alignment should match open parenthesis

2017-03-05 Thread Arushi Singhal
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal --- drivers/staging/sm750fb/ddk750_mode.c | 69 +-- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/driv

Re: fs: use-after-free in path_lookupat

2017-03-05 Thread Dmitry Vyukov
On Sun, Mar 5, 2017 at 12:20 PM, Dmitry Vyukov wrote: > On Sun, Mar 5, 2017 at 12:15 PM, Dmitry Vyukov wrote: >> On Sat, Mar 4, 2017 at 8:39 PM, Al Viro wrote: >>> On Sat, Mar 04, 2017 at 03:59:36PM +0100, Dmitry Vyukov wrote: >>> I am getting the following use-after-free reports while runn

[PATCH 0/3] multiple checkpatch issues

2017-03-05 Thread Arushi Singhal
Improve readability by fixing multiple checkpatch.pl issues in sm750fb driver. Arushi Singhal (3): staging: sm750fb: fixes add blank line after function/struct/union/enum declarations staging: sm750fb: function prototype argument should have an identifier name staging: sm750fb: Alignment s

Re: fs: use-after-free in path_lookupat

2017-03-05 Thread Dmitry Vyukov
On Sun, Mar 5, 2017 at 12:15 PM, Dmitry Vyukov wrote: > On Sat, Mar 4, 2017 at 8:39 PM, Al Viro wrote: >> On Sat, Mar 04, 2017 at 03:59:36PM +0100, Dmitry Vyukov wrote: >> >>> I am getting the following use-after-free reports while running >>> syzkaller fuzzer on 86292b33d4b79ee03e2f43ea0381ef85f

Re: [PATCH] iio: magnetometer: ak8974: remove incorrect __exit markups

2017-03-05 Thread Jonathan Cameron
On 01/03/17 23:37, Dmitry Torokhov wrote: > Even if bus is not hot-pluggable, devices can be unbound from the > driver via sysfs, so we should not be using __exit annotations on > remove() methods. The only exception is drivers registered with > platform_driver_probe() which specifically disables s

Re: [PATCH v3 1/6] dt-bindings: iio: introduce trigger providers, consumers

2017-03-05 Thread Jonathan Cameron
On 03/03/17 06:21, Rob Herring wrote: > On Tue, Feb 28, 2017 at 05:51:14PM +0100, Fabrice Gasnier wrote: >> Document iio provider and consumer bindings. >> >> Signed-off-by: Fabrice Gasnier >> --- >> .../devicetree/bindings/iio/iio-bindings.txt | 38 >> ++ >> 1 file cha

Re: [PATCH v3 1/6] dt-bindings: iio: introduce trigger providers, consumers

2017-03-05 Thread Jonathan Cameron
On 03/03/17 09:32, Fabrice Gasnier wrote: > On 03/03/2017 07:21 AM, Rob Herring wrote: >> On Tue, Feb 28, 2017 at 05:51:14PM +0100, Fabrice Gasnier wrote: >>> Document iio provider and consumer bindings. >>> >>> Signed-off-by: Fabrice Gasnier >>> --- >>> .../devicetree/bindings/iio/iio-bindings.t

Re: fs: use-after-free in path_lookupat

2017-03-05 Thread Dmitry Vyukov
On Sun, Mar 5, 2017 at 12:24 PM, Dmitry Vyukov wrote: On Sat, Mar 04, 2017 at 03:59:36PM +0100, Dmitry Vyukov wrote: > I am getting the following use-after-free reports while running > syzkaller fuzzer on 86292b33d4b79ee03e2f43ea0381ef85f077c760 (but also > happened on 6dc39c

Re: [PATCH v1 2/2] iio: stm32 trigger: Add counter device

2017-03-05 Thread Jonathan Cameron
On 01/03/17 14:45, Benjamin Gaignard wrote: > One of the features of STM32 trigger hardware block is a counter > that can counts up/down depending of the levels and edges of the > selected external pins. > > This patch allow to read/write the counter, get the direction and > set the preset value.

[PATCH] idr: fix use-after-free in ida_pre_get()

2017-03-05 Thread Dmitry Vyukov
ida_pre_get() contains a window between checking and installing a new ida_bitmap in which another task can install own bitmap. The handling of this race is currently handled incorrectly, we both free the installed bitmap and leak the new one. Handle the race correctly. Signed-off-by: Dmitry Vyuko

Re: [PATCH v3 1/6] dt-bindings: iio: introduce trigger providers, consumers

2017-03-05 Thread Jonathan Cameron
On 05/03/17 11:43, Jonathan Cameron wrote: > On 03/03/17 06:21, Rob Herring wrote: >> On Tue, Feb 28, 2017 at 05:51:14PM +0100, Fabrice Gasnier wrote: >>> Document iio provider and consumer bindings. >>> >>> Signed-off-by: Fabrice Gasnier >>> --- >>> .../devicetree/bindings/iio/iio-bindings.txt

Re: idr: use-after-free write in ida_get_new_above

2017-03-05 Thread Dmitry Vyukov
On Fri, Mar 3, 2017 at 6:06 PM, Matthew Wilcox wrote: > Thanks! I don't think it's syzcaller per se that's provoking this; it's a > matter of an interrupt coming in at the right time and preempting a task that > happens to be allocating from an IDA with another task that's also allocating > fr

Re: [PATCH v3 3/6] dt-bindings: iio: document interrupt trigger support

2017-03-05 Thread Jonathan Cameron
On 28/02/17 16:51, Fabrice Gasnier wrote: > Document interrupt trigger that takes a generic interrupt, and > can be used as trigger source for sampling devices such as sensors, > ADCs... > > Signed-off-by: Fabrice Gasnier I'm not convinced we want the earlier device tree binding doc at all. In th

Re: [PATCH v3 4/6] iio: iio-interrupt-trigger: device-tree support

2017-03-05 Thread Jonathan Cameron
On 28/02/17 16:51, Fabrice Gasnier wrote: > From: Grégor Boirie > > Add compatible string that should be used in DT. > Also cascade of_node to newly allocated trigger device. > > Signed-off-by: Gregor Boirie I'd normally not keep Gregor's sign off in a patch that has been changed like this. If

Re: [PATCH v3 2/6] iio: trigger: add OF support

2017-03-05 Thread Jonathan Cameron
On 28/02/17 16:51, Fabrice Gasnier wrote: > Provide OF support. Device drivers can get IIO triggers from dt. > Introduce IIO trigger specifiers, so there are: > - IIO trigger providers, e.g. dt nodes designated with > #io-trigger-cells= > - IIO trigger consumers, e.g. phandles listed in io-trigge

Re: [PATCH v3 6/6] iio: adc: stm32: add support for EXTI trigger

2017-03-05 Thread Jonathan Cameron
On 28/02/17 16:51, Fabrice Gasnier wrote: > EXTi (external interrupt) signal can be routed internally as trigger > source for ADC conversions: STM32F4 ADC can use EXTI11. > > Retrieve interrupt trigger from DT, so it can be muxed into ADC IP, > via extsel. > > Signed-off-by: Fabrice Gasnier Mino

Re: [PATCH] KVM: nVMX: Reset nested_run_pending if the CPU is going to be reset

2017-03-05 Thread Dmitry Vyukov
On Sat, Mar 4, 2017 at 5:03 AM, Wanpeng Li wrote: > Reported by syzkaller: > > WARNING: CPU: 1 PID: 27742 at arch/x86/kvm/vmx.c:11029 > nested_vmx_vmexit+0x5c35/0x74d0 arch/x86/kvm/vmx.c:11029 > CPU: 1 PID: 27742 Comm: a.out Not tainted 4.10.0+ #229 > Hardware name:

Re: [PATCH v3 6/6] iio: adc: stm32: add support for EXTI trigger

2017-03-05 Thread Jonathan Cameron
On 05/03/17 12:21, Jonathan Cameron wrote: > On 28/02/17 16:51, Fabrice Gasnier wrote: >> EXTi (external interrupt) signal can be routed internally as trigger >> source for ADC conversions: STM32F4 ADC can use EXTI11. >> >> Retrieve interrupt trigger from DT, so it can be muxed into ADC IP, >> via

kvm: use-after-free in vmx_check_nested_events/vmcs12_guest_cr0

2017-03-05 Thread Dmitry Vyukov
Hello, The following program triggers use-after-free in vmx_check_nested_events: https://gist.githubusercontent.com/dvyukov/30d798b75411474f29bc7dc203a7e5f0/raw/e1613e010ea88f20ee7a28fc44e8dd5861b0c048/gistfile1.txt BUG: KASAN: use-after-free in nested_cpu_has_preemption_timer arch/x86/kvm/vmx.c

Re: [PATCH V3 0/4] Define coherent device memory node

2017-03-05 Thread Anshuman Khandual
On 02/23/2017 12:22 PM, Anshuman Khandual wrote: > On 02/22/2017 03:20 PM, Michal Hocko wrote: >> On Tue 21-02-17 19:09:18, Anshuman Khandual wrote: >>> On 02/21/2017 04:41 PM, Michal Hocko wrote: On Fri 17-02-17 17:11:57, Anshuman Khandual wrote: [...] > * User space using mbind() to

Re: [PATCH 0/3] pc104: Mask PC/104 Kconfig options

2017-03-05 Thread Jonathan Cameron
On 01/03/17 20:46, William Breathitt Gray wrote: > On Wed, Jan 11, 2017 at 04:26:19PM +0100, Linus Walleij wrote: >> On Tue, Jan 10, 2017 at 7:50 PM, William Breathitt Gray >> wrote: >> >>> PC/104 form factor devices serve a specific niche of embedded system >>> users. Since PC/104 devices and har

Re: [PATCH] iio: magnetometer: ak8974: remove incorrect __exit markups

2017-03-05 Thread Linus Walleij
On Thu, Mar 2, 2017 at 12:37 AM, Dmitry Torokhov wrote: > Even if bus is not hot-pluggable, devices can be unbound from the > driver via sysfs, so we should not be using __exit annotations on > remove() methods. The only exception is drivers registered with > platform_driver_probe() which specifi

Re: Question Regarding ERMS memcpy

2017-03-05 Thread Borislav Petkov
On Sun, Mar 05, 2017 at 12:18:23PM +0100, Borislav Petkov wrote: > Also, I need to check what vmlinuz size bloat we're talking: with the > diff below, we do add padding which looks like this: Yeah, even a tailored config adds ~67K: textdata bss dec hex filename 7567290 4040894

[PATCH] mm: drop "wait" parameter from write_one_page

2017-03-05 Thread Jeff Layton
The callers all have it set to 1 anyway. Also, make it clear that this function will not set any sort of AS_* error, and that the caller must do so if necessary. No existing caller uses this on normal files, so none of them need it. Signed-off-by: Jeff Layton --- fs/exofs/dir.c| 2 +- f

[PATCH] staging: rtl8192u: Remove unnecessary function and its call

2017-03-05 Thread simran singhal
The function ieee80211_tkip_null on being called, simply returns back. The function hasn't been mentioned in the TODO and doesn't have FIXME code around. Hence, ieee80211_tkip_null and its calls have been removed. This was done using Coccinelle. @@ identifier f; @@ void f(...) { -return; } Si

Re: net/dccp: use-after-free in dccp_feat_activate_values

2017-03-05 Thread Dmitry Vyukov
On Fri, Mar 3, 2017 at 5:00 PM, Eric Dumazet wrote: > On Fri, 2017-03-03 at 07:22 -0800, Eric Dumazet wrote: >> On Fri, Mar 3, 2017 at 7:12 AM, Dmitry Vyukov wrote: >> > The first bot that picked this up started spewing: >> > >> > BUG: spinlock recursion on CPU#1, syz-executor2/9452 >> >> Yes. Th

[PATCH 1/1] mm: fix mapping_set_error call in me_pagecache_dirty

2017-03-05 Thread Jeff Layton
The error code should be negative. Since this ends up in the default case anyway, this is harmless, but it's less confusing to negate it. Signed-off-by: Jeff Layton --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory-failure.c b/mm/memory-failure

[PATCH 3/3] mm: set mapping error when launder_pages fails

2017-03-05 Thread Jeff Layton
If launder_page fails, then we hit a problem writing back some inode data. Ensure that we communicate that fact in a subsequent fsync since another task could still have it open for write. Signed-off-by: Jeff Layton --- mm/truncate.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) di

[PATCH 0/3] mm/fs: get PG_error out of the writeback reporting business

2017-03-05 Thread Jeff Layton
I recently did some work to wire up -ENOSPC handling in ceph, and found I could get back -EIO errors in some cases when I should have instead gotten -ENOSPC. The problem was that the ceph writeback code would set PG_error on a writeback error, and that error would clobber the mapping error. While

Re: [PATCH 0/3] multiple checkpatch issues

2017-03-05 Thread Joe Perches
On Sun, 2017-03-05 at 16:54 +0530, Arushi Singhal wrote: > Improve readability by fixing multiple checkpatch.pl > issues in sm750fb driver. Remember to prefix the subject of the 0/n patch with the subsystem. > Arushi Singhal (3): > staging: sm750fb: fixes add blank line after function/struct/u

[PATCH 1/3] nilfs2: set the mapping error when calling SetPageError on writeback

2017-03-05 Thread Jeff Layton
In a later patch, we're going to want to make the fsync codepath not do a TestClearPageError call as that can override the error set in the address space. To do that though, we need to ensure that filesystems that are relying on the PG_error bit for reporting writeback errors also set an error in t

Re: [PATCH] iio: magnetometer: ak8974: remove incorrect __exit markups

2017-03-05 Thread Jonathan Cameron
On 05/03/17 12:57, Linus Walleij wrote: > On Thu, Mar 2, 2017 at 12:37 AM, Dmitry Torokhov > wrote: > >> Even if bus is not hot-pluggable, devices can be unbound from the >> driver via sysfs, so we should not be using __exit annotations on >> remove() methods. The only exception is drivers regist

[PATCH 1/1] selinux: include sys/socket.h in host programs to have PF_MAX

2017-03-05 Thread Nicolas Iooss
Compiling with clang and -Wundef makes the compiler report a usage of undefined PF_MAX macro in security/selinux/include/classmap.h: In file included from scripts/selinux/mdp/mdp.c:48: security/selinux/include/classmap.h:37:31: warning: no previous extern declaration for non-static var

Re: [PATCH v2] net: smsc: smc91x: use new api ethtool_{get|set}_link_ksettings

2017-03-05 Thread Robert Jarzmik
Philippe Reynes writes: > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > As I don't have the hardware, I'd be very pleased if > someone may test this patch. > > Signed-off-by: Philippe Reynes > --- > Changelog: > v2: > - also upda

Re: [PATCHv2] omap3isp: add support for CSI1 bus

2017-03-05 Thread Pavel Machek
Hi! > > This will probably fail. > > > > rval = omap3isp_csi2_reset(phy->csi2); > > if (rval < 0) > > goto done; > > Could you try to two patches I've applied on the ccp2 branch (I'll remove > them if there are issues). > > That's compile test

[PATCH v4] blkcg: allocate struct blkcg_gq outside request queue spinlock

2017-03-05 Thread Tahsin Erdogan
blkg_conf_prep() currently calls blkg_lookup_create() while holding request queue spinlock. This means allocating memory for struct blkcg_gq has to be made non-blocking. This causes occasional -ENOMEM failures in call paths like below: pcpu_alloc+0x68f/0x710 __alloc_percpu_gfp+0xd/0x10 __per

Re: [PATCH v4] blkcg: allocate struct blkcg_gq outside request queue spinlock

2017-03-05 Thread Tahsin Erdogan
Hi Tejun, >> @@ -184,24 +185,48 @@ static struct blkcg_gq *blkg_create(struct blkcg >> *blkcg, >> + if (unlikely(!wb_congested)) { >> ret = -ENOMEM; >> goto err_put_css; >> + } else if (unlikely(!blkg)) { >> + ret = -ENOMEM; >> + goto er

[PATCH 1/1] apparmor: use SHASH_DESC_ON_STACK

2017-03-05 Thread Nicolas Iooss
When building the kernel with clang, the compiler fails to build security/apparmor/crypto.c with the following error: security/apparmor/crypto.c:36:8: error: fields must have a constant size: 'variable length array in structure' extension will never be supported cha

[PATCH v4 1/1] x86, relocs: add printf attribute to die()

2017-03-05 Thread Nicolas Iooss
Adding such an attribute helps to detect errors in the format string at build time. After doing this, the compiler complains about some issues: arch/x86/tools/relocs.c:460:5: error: format specifies type 'int' but the argument has type 'Elf64_Xword' (aka 'unsigned long') [-Werror,-Wfor

Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting business

2017-03-05 Thread Jeff Layton
On Sun, 2017-03-05 at 08:35 -0500, Jeff Layton wrote: > I recently did some work to wire up -ENOSPC handling in ceph, and found > I could get back -EIO errors in some cases when I should have instead > gotten -ENOSPC. The problem was that the ceph writeback code would set > PG_error on a writeback

crypto: deadlock between crypto_alg_sem/rtnl_mutex/genl_mutex

2017-03-05 Thread Dmitry Vyukov
Hello, I am getting the following deadlock reports while running syzkaller fuzzer on net-next/8d70eeb84ab277377c017af6a21d0a337025dede: == [ INFO: possible circular locking dependency detected ] 4.10.0+ #5 Not tainted ---

Re: [bdi_unregister] 165a5e22fa INFO: task swapper:1 blocked for more than 120 seconds.

2017-03-05 Thread Jens Axboe
On 03/04/2017 07:21 PM, Fengguang Wu wrote: > Hi Jan, > > FYI next-20170303 is good while mainline is bad with this error. > The attached reproduce-* may help reproduce the issue. What's the test case here? It's Sunday, we need to make a quick decision on whether to revert this patch or not. I'm

Re: [PATCH RFC 01/14] block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler

2017-03-05 Thread Jens Axboe
On 03/04/2017 09:01 AM, Paolo Valente wrote: > We tag as v0 the version of BFQ containing only BFQ's engine plus > hierarchical support. BFQ's engine is introduced by this commit, while > hierarchical support is added by next commit. We use the v0 tag to > distinguish this minimal version of BFQ fr

[PATCH] irqchip/gicv3-its: Add workaround for QDF2400 ITS erratum 0065

2017-03-05 Thread Shanker Donthineni
On Qualcomm Datacenter Technologies QDF2400 SoCs, the ITS hardware implementation uses 16Bytes for Interrupt Translation Entry (ITTE), but reports an incorrect value of 8Bytes in GITS_TYPER.ITTE_size. It might cause kernel memory corruption depending on the number of MSI(x) that are configured and

bpf: kernel NULL pointer dereference in map_get_next_key

2017-03-05 Thread Dmitry Vyukov
Hello, The following program causes kernel NULL pointer dereference in map_get_next_key: BUG: unable to handle kernel NULL pointer dereference at (null) IP: (null) PGD 64a8f067 PUD 65c78067 PMD 0 Oops: 0010 [#1] SMP KASAN Modules linked in: CPU: 3 PID: 2953 Comm: a.out Not tai

Re: [PATCH v2 1/2] iio: Allow triggers to be used as parent of others triggers

2017-03-05 Thread Jason Kridner
> On Mar 5, 2017, at 5:11 AM, Jonathan Cameron wrote: > >> On 25/02/17 21:12, Jason Kridner wrote: >> >> On Feb 19, 2017, at 10:08 AM, Jonathan Cameron wrote: On 16/02/17 14:23, Benjamin Gaignard wrote: Add "parent_trigger" sysfs attribute to iio trigger to be able

[PATCH 2/3] mm: don't TestClearPageError in __filemap_fdatawait_range

2017-03-05 Thread Jeff Layton
The -EIO returned here can end up overriding whatever error is marked in the address space. This means that an -ENOSPC error (AS_ENOSPC) can end up being turned into -EIO if a page gets PG_error set on it during error handling. Arguably, that's a bug in the writeback code, but... Read errors are a

[PATCH] irqchip/gicv3-its: Avoid memory over allocation for ITTEs

2017-03-05 Thread Shanker Donthineni
We are always allocating extra 255Bytes of memory to handle ITTE physical address alignment requirement. The kmalloc() satisfies the ITTE alignment since the ITS driver is requesting a minimum size of ITS_ITT_ALIGN bytes. Let's try to allocate the exact amount of memory that is required for ITTEs

Re: Arrays of variable length

2017-03-05 Thread Måns Rullgård
Tomas Winkler writes: > Sparse complains for arrays declared with variable length > > 'warning: Variable length array is used' > > Prior to c99 this was not allowed but lgcc (c99) doesn't have problem > with that https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html. > And also Linux kernel co

Re: [PATCH RFC 01/14] block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler

2017-03-05 Thread Paolo Valente
> Il giorno 05 mar 2017, alle ore 16:16, Jens Axboe ha > scritto: > > On 03/04/2017 09:01 AM, Paolo Valente wrote: >> We tag as v0 the version of BFQ containing only BFQ's engine plus >> hierarchical support. BFQ's engine is introduced by this commit, while >> hierarchical support is added by n

Re: fs: use-after-free in path_lookupat

2017-03-05 Thread Dmitry Vyukov
On Sun, Mar 5, 2017 at 4:57 PM, Al Viro wrote: > On Sun, Mar 05, 2017 at 12:37:13PM +0100, Dmitry Vyukov wrote: > >> I am pretty sure it is that one. >> I don't think I ever used name_to_handle_at syscall in my life and I >> definitely didn't make it lookup a memfd :) > > So what does it normally

Re: [PATCH 2/2] hwmon: Aspeed AST2400/AST2500 ADC

2017-03-05 Thread Guenter Roeck
On 03/02/2017 10:21 PM, Rob Herring wrote: On Tue, Feb 28, 2017 at 07:45:23PM -0800, Guenter Roeck wrote: On 02/28/2017 04:49 PM, Joel Stanley wrote: On Wed, Mar 1, 2017 at 6:44 AM, Rick Altherr wrote: Aspeed AST2400/AST2500 BMC SoCs include a 16 channel, 10-bit ADC. This driver implements re

Re: [v5 17/20] x86/umip: Force a page fault when unable to copy emulated result to user

2017-03-05 Thread Andy Lutomirski
On Fri, Mar 3, 2017 at 1:41 PM, Ricardo Neri wrote: > fixup_umip_exception will be called from do_general_protection. If the > former returns false, the latter will issue a SIGSEGV with SEND_SIG_PRIV. > However, when emulation is successful but the emulated result cannot be > copied to user space

Re: fs: use-after-free in path_lookupat

2017-03-05 Thread Al Viro
On Sun, Mar 05, 2017 at 05:14:23PM +0100, Dmitry Vyukov wrote: > On Sun, Mar 5, 2017 at 4:57 PM, Al Viro wrote: > > On Sun, Mar 05, 2017 at 12:37:13PM +0100, Dmitry Vyukov wrote: > > > >> I am pretty sure it is that one. > >> I don't think I ever used name_to_handle_at syscall in my life and I > >

[PATCH] perf bench numa: Add more comment for -c option

2017-03-05 Thread Jiri Olsa
Adding more commentary for -c/--show_convergence option, to explain how the convergence is defined. Before: -c, --show_convergence show convergence details Now: -c, --show_convergence show convergence details, convergence is reached \ wh

net/ipv6: null-ptr-deref in ip6mr_sk_done

2017-03-05 Thread Andrey Konovalov
Hi, I've got the following bug report while fuzzing the kernel with syzkaller. Unfortunately it's not reproducible. On commit e5d56efc97f8240d0b5d66c03949382b6d7e5570 (Feb 26). kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] SMP KASAN Dumpin

Re: [PATCH 01/10] perf, tools, stat: Factor out callback for collecting event values

2017-03-05 Thread Jiri Olsa
On Fri, Mar 03, 2017 at 03:16:11PM -0800, Andi Kleen wrote: > On Fri, Mar 03, 2017 at 11:33:03AM +0100, Jiri Olsa wrote: > > On Tue, Feb 28, 2017 at 10:49:15PM -0800, Andi Kleen wrote: > > > > SNIP > > > > > +static void collect_data(struct perf_evsel *counter, > > > + void (*

[PATCH 3/5] staging: lustre: osc: Use list_for_each_entry_safe

2017-03-05 Thread simran singhal
Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This w

[PATCH 2/5] staging: lustre: ptlrpc: Use list_for_each_entry_safe

2017-03-05 Thread simran singhal
Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This w

[PATCH 5/5] staging: lustre: osc_page.c: Use list_for_each_entry_safe

2017-03-05 Thread simran singhal
Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This w

[PATCH 1/5] staging: lustre: Use list_for_each_entry_safe

2017-03-05 Thread simran singhal
Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This w

[PATCH 4/5] staging: lustre: llite: Use list_for_each_entry_safe

2017-03-05 Thread simran singhal
Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This w

[PATCH] crypto: s5p-sss - Fix completing crypto request in IRQ handler

2017-03-05 Thread Krzysztof Kozlowski
In a regular interrupt handler driver was finishing the crypt/decrypt request by calling complete on crypto request. This is disallowed since converting to skcipher in commit b286d8b1a690 ("crypto: skcipher - Add skcipher walk interface") and causes a warning: WARNING: CPU: 0 PID: 0 at cry

[PATCH 0/5] Use list_for_each_entry_safe

2017-03-05 Thread simran singhal
This patch-series replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. simran singhal (5): staging: lustre: Use list_for_each_entry_safe staging: lustre: ptlrpc: Use list_for_each_entry_safe staging: lustre: osc: Use list_for_each_entry_safe staging:

Re: [Outreachy kernel] [PATCH 5/5] staging: lustre: osc_page.c: Use list_for_each_entry_safe

2017-03-05 Thread Julia Lawall
On Sun, 5 Mar 2017, simran singhal wrote: > Doubly linked lists which are iterated using list_empty > and list_entry macros have been replaced with list_for_each_entry_safe > macro. > This makes the iteration simpler and more readable. > > This patch replaces the while loop containing list_emp

Re: XTS Crypto Not Found In /proc/crypto Even After Compiled for 4.10.1.

2017-03-05 Thread Krzysztof Kozlowski
On Fri, Mar 03, 2017 at 12:02:10PM +0800, Herbert Xu wrote: > On Thu, Mar 02, 2017 at 05:35:30PM -0600, Nathan Royce wrote: > > ARM ODroid XU4 > > > > $ cat /proc/config.gz | gunzip | grep XTS > > CONFIG_CRYPTO_XTS=y > > > > $ grep xts /proc/crypto > > //4.9.13 > > name : xts(aes) > > dri

Re: [Outreachy kernel] [PATCH 5/5] staging: lustre: osc_page.c: Use list_for_each_entry_safe

2017-03-05 Thread Julia Lawall
By the way, the above subject line is not correct. Normally one does not put .c/.h in the subject line. Indeed, there is not really any deterministic algorithm for choosing the subject line. You need to run git log --oneline filename to see what others have done. julia On Sun, 5 Mar 2017, simr

[PATCH 1/2] leds: cpcap: new driver

2017-03-05 Thread Sebastian Reichel
Motorola CPCAP is a PMIC found in multiple smartphones. This driver adds support for the chip's LED controllers. It has explicit support for all controllers used by the Droid 4. Since no datasheets are available the other available controllers are not supported until somebody verified, that the reg

  1   2   3   >