Re: [PATCH V6 1/5] blk-mq-sched: fix scheduler bad performance

2017-10-10 Thread Omar Sandoval
On Mon, Oct 09, 2017 at 07:24:20PM +0800, Ming Lei wrote: > When hw queue is busy, we shouldn't take requests from > scheduler queue any more, otherwise it is difficult to do > IO merge. > > This patch fixes the awful IO performance on some > SCSI devices(lpfc, qla2xxx, ...) when mq-deadline/kyber

[PATCH][V2] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Colin King
From: Colin Ian King The use of the | operator always leads to true which looks rather suspect to me. Fix this by using & instead to just check the RTF_CACHE entry bit. Detected by CoverityScan, CID#1457734, #1457747 ("Wrong operator used") Fixes: 35732d01fe31 ("ipv6: introduce a hash table to

Re: [PATCH] PCI: iproc: Allow allocation of multiple MSIs

2017-10-10 Thread Ray Jui
Hi Bodo, On 10/7/2017 5:08 AM, Bodo-Merle Sandor wrote: From: Sandor Bodo-Merle Add support for allocating multiple MSIs at the same time, so that the MSI_FLAG_MULTI_PCI_MSI flag can be added to the msi_domain_info structure. Avoid storing the hwirq in the low 5 bits of the message data, as i

[PATCH 10/25] thermal/drivers/hisi: Rename and remove unused field

2017-10-10 Thread Daniel Lezcano
Rename the 'sensors' field to 'sensor' as we describe only one sensor. Remove the 'sensor_temp' as it is no longer used. Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan Tested-by: Leo Yan --- drivers/thermal/hisi_thermal.c | 18 -- 1 file changed, 8 insertions(+), 10 deletio

Re: [PATCH][net-next] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Martin KaFai Lau
On Tue, Oct 10, 2017 at 05:55:27PM +, Colin King wrote: > From: Colin Ian King > > The use of the | operator always leads to true on the expression > (rt->rt6i_flags | RTF_CACHE) which looks rather suspect to me. I > believe this is fixed by using & instead to just check the > RTF_CACHE entry

Re: Questions about commit "ipc/shm: Fix shmat mmap nil-page protection"

2017-10-10 Thread Joe Lawrence
On 09/25/2017 05:44 PM, Andrea Arcangeli wrote: > Hello, > > On Mon, Sep 25, 2017 at 03:38:07PM -0400, Joe Lawrence wrote: >> Hi Davidlohr, >> >> I was looking into backporting commit 95e91b831f87 ("ipc/shm: Fix shmat >> mmap nil-page protection") to a distro kernel and Andrea brought up some >> i

[PATCH 09/25] thermal/drivers/hisi: Remove costly sensor inspection

2017-10-10 Thread Daniel Lezcano
The sensor is all setup, bind, resetted, acked, etc... every single second. That was the way to workaround a problem with the interrupt bouncing again and again. With the following changes, we fix all in one: - Do the setup, one time, at probe time - Add the IRQF_ONESHOT, ack the interrupt in

[PATCH 11/25] thermal/drivers/hisi: Convert long to int

2017-10-10 Thread Daniel Lezcano
There is no point to specify the temperature as long variable, the int is enough. Replace all long variables to int, so making the code consistent. Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan --- drivers/thermal/hisi_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) d

[PATCH v3 2/4] pipe: avoid round_pipe_size() nr_pages overflow on 32-bit

2017-10-10 Thread Joe Lawrence
The round_pipe_size() function contains a right-bit-shift expression which may overflow, which would cause undefined results in a subsequent roundup_pow_of_two() call. static inline unsigned int round_pipe_size(unsigned int size) { unsigned long nr_pages; nr_pages = (size

[PATCH 08/25] thermal/drivers/hisi: Fix configuration register setting

2017-10-10 Thread Daniel Lezcano
The TEMP0_CFG configuration register contains different field to set up the temperature controller. However in the code, nothing prevents a setup to overwrite the previous one: eg. writing the hdak value overwrites the sensor selection, the sensor selection overwrites the hdak value. In order to p

[PATCH 05/25] thermal/drivers/hisi: Fix multiple alarm interrupts firing

2017-10-10 Thread Daniel Lezcano
The DT specifies a threshold of 65000, we setup the register with a value in the temperature resolution for the controller, 64656. When we reach 64656, the interrupt fires, the interrupt is disabled. Then the irq thread runs and calls thermal_zone_device_update() which will call in turn hisi_therm

[PATCH v3 0/4] A few round_pipe_size() and pipe-max-size fixups

2017-10-10 Thread Joe Lawrence
While backporting Michael's "pipe: fix limit handling" patchset to a distro-kernel, Mikulas noticed that current upstream pipe limit handling contains a few problems: 1 - procfs signed wrap: echo'ing a large number into /proc/sys/fs/pipe-max-size and then cat'ing it back out shows a

[PATCH 03/25] thermal/drivers/hisi: Fix kernel panic on alarm interrupt

2017-10-10 Thread Daniel Lezcano
The threaded interrupt for the alarm interrupt is requested before the temperature controller is setup. This one can fire an interrupt immediately leading to a kernel panic as the sensor data is not initialized. In order to prevent that, move the threaded irq after the Tsensor is setup. Signed-of

[PATCH 07/25] thermal/drivers/hisi: Encapsulate register writes into helpers

2017-10-10 Thread Daniel Lezcano
Hopefully, the function name can help to clarify the semantic of the operations when writing in the register. Signed-off-by: Daniel Lezcano --- drivers/thermal/hisi_thermal.c | 92 -- 1 file changed, 70 insertions(+), 22 deletions(-) diff --git a/drivers/

[PATCH 06/25] thermal/drivers/hisi: Remove pointless lock

2017-10-10 Thread Daniel Lezcano
The threaded interrupt inspect the sensors structure to look in the temp threshold field, but this field is read-only in all the code, except in the probe function before the threaded interrupt is set. In other words there is not race window in the threaded interrupt when reading the field value.

[PATCH 01/25] thermal/drivers/hisi: Fix missing interrupt enablement

2017-10-10 Thread Daniel Lezcano
The interrupt for the temperature threshold is not enabled at the end of the probe function, enable it after the setup is complete. On the other side, the irq_enabled is not correctly set as we are checking if the interrupt is masked where 'yes' means irq_enabled=false. irq_get_irqchip_st

Re: [PATCH 02/10] perf tool: fix: Don't discard prev in backward mode

2017-10-10 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 10, 2017 at 10:20:15AM -0700, kan.li...@intel.com escreveu: > From: Kan Liang > > Perf record can switch output. The new output should only store the data > after switching. However, in overwrite backward mode, the new output > still have the data from old output. > > At the end of m

Re: [lockdep] b09be676e0 BUG: unable to handle kernel NULL pointer dereference at 000001f2

2017-10-10 Thread Peter Zijlstra
On Tue, Oct 10, 2017 at 09:56:26AM -0700, Linus Torvalds wrote: > So I think the best model would be something like this: > > - T1: > mutex_lock(&lock) > ... > mutex_transfer(&lock) > > - T2: > mutex_receive(&lock); > ... > mutex_unlock(&lock); >

[PATCH 04/25] thermal/drivers/hisi: Simplify the temperature/step computation

2017-10-10 Thread Daniel Lezcano
The step and the base temperature are fixed values, we can simplify the computation by converting the base temperature to milli celsius and use a pre-computed step value. That saves us a lot of mult + div for nothing at runtime. Take also the opportunity to change the function names to be consiste

[PATCH 02/25] thermal/drivers/hisi: Remove the multiple sensors support

2017-10-10 Thread Daniel Lezcano
By essence, the tsensor does not really support multiple sensor at the same time. It allows to set a sensor and use it to get the temperature, another sensor could be switched but with a delay of 3-5ms. It is difficult to read simultaneously several sensors without a big delay. Today, just one sen

Re: [PATCH v3 02/12] pinctrl: axp209: add pinctrl features

2017-10-10 Thread Rob Herring
On Mon, Oct 02, 2017 at 02:08:44PM +0200, Quentin Schulz wrote: > The X-Powers AXP209 has 3 GPIOs. GPIO0/1 can each act either as a GPIO, > an ADC or a LDO regulator. GPIO2 can only act as a GPIO. > > This adds the pinctrl features to the driver so GPIO0/1 can be used as > ADC or LDO regulator. >

Re: [PATCH V6 3/5] sbitmap: introduce __sbitmap_for_each_set()

2017-10-10 Thread Omar Sandoval
On Mon, Oct 09, 2017 at 07:24:22PM +0800, Ming Lei wrote: > We need to iterate ctx starting from any ctx in round robin > way, so introduce this helper. > > Cc: Omar Sandoval Reviewed-by: Omar Sandoval > Signed-off-by: Ming Lei > --- > include/linux/sbitmap.h | 64 >

Re: [PATCH 03/10] perf tool: new iterfaces to read event from ring buffer

2017-10-10 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 10, 2017 at 10:20:16AM -0700, kan.li...@intel.com escreveu: > From: Kan Liang > > The perf_evlist__mmap_read only support forward mode. It needs a common > function to support both forward and backward mode. > The perf_evlist__mmap_read_backward is buggy. So, what is the bug? You st

RE: [PATCH 02/10] perf tool: fix: Don't discard prev in backward mode

2017-10-10 Thread Liang, Kan
> Em Tue, Oct 10, 2017 at 10:20:15AM -0700, kan.li...@intel.com escreveu: > > From: Kan Liang > > > > Perf record can switch output. The new output should only store the > > data after switching. However, in overwrite backward mode, the new > > output still have the data from old output. > > > > A

Re: [PATCH v2 0/5] Switch arm64 over to qrwlock

2017-10-10 Thread Adam Wallis
On 10/6/2017 9:34 AM, Will Deacon wrote: > Hi all, > > This is version two of the patches I posted yesterday: > > > http://lists.infradead.org/pipermail/linux-arm-kernel/2017-October/534666.html > > I'd normally leave it longer before posting again, but Peter had a good > suggestion to rework

Re: [PATCH V6 4/5] blk-mq-sched: improve dispatching from sw queue

2017-10-10 Thread Omar Sandoval
On Mon, Oct 09, 2017 at 07:24:23PM +0800, Ming Lei wrote: > SCSI devices use host-wide tagset, and the shared driver tag space is > often quite big. Meantime there is also queue depth for each lun( > .cmd_per_lun), which is often small, for example, on both lpfc and > qla2xxx, .cmd_per_lun is just

Re: [PATCH][net-next] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Wei Wang
On Tue, Oct 10, 2017 at 11:10 AM, Martin KaFai Lau wrote: > On Tue, Oct 10, 2017 at 05:55:27PM +, Colin King wrote: >> From: Colin Ian King >> >> The use of the | operator always leads to true on the expression >> (rt->rt6i_flags | RTF_CACHE) which looks rather suspect to me. I >> believe thi

Re: [PATCH 01/10] perf record: new interfaces to read ring buffer to file

2017-10-10 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 10, 2017 at 10:20:14AM -0700, kan.li...@intel.com escreveu: > From: Kan Liang > > Factor out the mmap_read related codes into separate functions and move > them to evlist.c > struct perf_mmap_read is introduced to store the specific range of ring > buffer information. > > The way to

[GIT PULL] nfsd changes for 4.14-rc

2017-10-10 Thread J. Bruce Fields
Please pull nfsd fixes from git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.14-1 One fix for a 4.14 regression, and one minor fix to the MAINTAINERs file. (I was weirdly flattered by the idea that lots of random people suddenly seemed to think Jeff and I were VFS experts. Turns out it was j

Re: [PATCH][net-next] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Colin Ian King
On 10/10/17 19:23, Wei Wang wrote: > On Tue, Oct 10, 2017 at 11:10 AM, Martin KaFai Lau wrote: >> On Tue, Oct 10, 2017 at 05:55:27PM +, Colin King wrote: >>> From: Colin Ian King >>> >>> The use of the | operator always leads to true on the expression >>> (rt->rt6i_flags | RTF_CACHE) which lo

[PATCH] USB: serial: garmin_gps: Convert timers to use timer_setup()

2017-10-10 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Johan Hovold Cc: Allen Pais Cc: Greg Kroah-Hartman Cc: linux-...@vger.kernel.org Signed-off-by: Kees

Re: [PATCH V6 5/5] blk-mq-sched: don't dequeue request until all in ->dispatch are flushed

2017-10-10 Thread Omar Sandoval
On Mon, Oct 09, 2017 at 07:24:24PM +0800, Ming Lei wrote: > During dispatching, we moved all requests from hctx->dispatch to > one temporary list, then dispatch them one by one from this list. > Unfortunately during this period, run queue from other contexts > may think the queue is idle, then star

Re: [PATCH] rpmsg: glink: keep balance of mutex locks in qcom_glink_request_intent()

2017-10-10 Thread Bjorn Andersson
On Fri 06 Oct 14:23 PDT 2017, Alexey Khoroshilov wrote: > If qcom_glink_tx() fails in qcom_glink_request_intent(), > it returns immediately leaving intent_req_lock mutex locked. > So the next tries to send intent request lead to deadlock. > > Found by Linux Driver Verification project (linuxtesti

Re: linux-next: Tree for Oct 9th (of: unittest: testcases)

2017-10-10 Thread Rob Herring
+Frank On Tue, Oct 10, 2017 at 12:33 PM, Randy Dunlap wrote: > On 10/09/17 14:21, Mark Brown wrote: >> For my birthday I've gone and got myself a linux-next tree: >> >> Changes since 20170929: >> >> The net-next and drm trees lost their build failures but the rcu tree >> gained one. > > > I don't

RE: [PATCH 03/10] perf tool: new iterfaces to read event from ring buffer

2017-10-10 Thread Liang, Kan
> Em Tue, Oct 10, 2017 at 10:20:16AM -0700, kan.li...@intel.com escreveu: > > From: Kan Liang > > > > The perf_evlist__mmap_read only support forward mode. It needs a > > common function to support both forward and backward mode. > > > The perf_evlist__mmap_read_backward is buggy. > > So, what

Re: [PATCH v3] i2c: piix4: Disable completely the IMC during SMBUS_BLOCK_DATA

2017-10-10 Thread Jean Delvare
On Tue, 10 Oct 2017 18:11:15 +0200, Ricardo Ribalda Delgado wrote: > SMBUS_BLOCK_DATA transactions might fail due to a race condition with > the IMC (Integrated Micro Controller), even when the IMC semaphore > is used. > > This bug has been reported and confirmed by AMD, who suggested as a > solut

Re: [PATCH 02/10] perf tool: fix: Don't discard prev in backward mode

2017-10-10 Thread Wangnan (F)
On 2017/10/11 1:20, kan.li...@intel.com wrote: From: Kan Liang Perf record can switch output. The new output should only store the data after switching. However, in overwrite backward mode, the new output still have the data from old output. At the end of mmap_read, the position of processed

Re: [PATCH 01/10] perf record: new interfaces to read ring buffer to file

2017-10-10 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 10, 2017 at 10:20:14AM -0700, kan.li...@intel.com escreveu: > From: Kan Liang > > Factor out the mmap_read related codes into separate functions and move > them to evlist.c > struct perf_mmap_read is introduced to store the specific range of ring > buffer information. > > The way to

Re: [PATCH v6 10/14] platform/x86: dell-smbios: add filtering capability for requests

2017-10-10 Thread Pali Rohár
On Monday 09 October 2017 17:51:48 Mario Limonciello wrote: > +static struct token_range token_blacklist[] = { > + {0x, 0x0175, 0x0176}, > + {0x, 0x0195, 0x0197}, > + {0x, 0x01DC, 0x01DD}, > + {0x, 0x027D, 0x0284}, > + {0x02E3, 0x, 0x}, > + {0x02FF, 0

Re: [PATCH v3 05/12] pinctrl: axp209: add support for AXP813 GPIOs

2017-10-10 Thread Rob Herring
On Mon, Oct 02, 2017 at 02:08:47PM +0200, Quentin Schulz wrote: > The AXP813 has only two GPIOs. GPIO0 can either be used as a GPIO, an > LDO regulator or an ADC. GPIO1 can be used either as a GPIO or an LDO > regulator. > > Moreover, the status bit of the GPIOs when in input mode is not offset >

Re: linux-next: Tree for Oct 9th (of: unittest: testcases)

2017-10-10 Thread Randy Dunlap
On 10/10/17 11:26, Rob Herring wrote: > +Frank > > On Tue, Oct 10, 2017 at 12:33 PM, Randy Dunlap wrote: >> On 10/09/17 14:21, Mark Brown wrote: >>> For my birthday I've gone and got myself a linux-next tree: >>> >>> Changes since 20170929: >>> >>> The net-next and drm trees lost their build fail

Re: [PATCH 03/10] perf tool: new iterfaces to read event from ring buffer

2017-10-10 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 10, 2017 at 06:28:18PM +, Liang, Kan escreveu: > > > > Em Tue, Oct 10, 2017 at 10:20:16AM -0700, kan.li...@intel.com escreveu: > > > From: Kan Liang > > > > > > The perf_evlist__mmap_read only support forward mode. It needs a > > > common function to support both forward and back

Re: [PATCH 03/10] perf tool: new iterfaces to read event from ring buffer

2017-10-10 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 10, 2017 at 03:34:55PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Oct 10, 2017 at 06:28:18PM +, Liang, Kan escreveu: > > > Em Tue, Oct 10, 2017 at 10:20:16AM -0700, kan.li...@intel.com escreveu: > > > > From: Kan Liang > > > > > > > > The perf_evlist__mmap_read only suppor

Re: [lockdep] b09be676e0 BUG: unable to handle kernel NULL pointer dereference at 000001f2

2017-10-10 Thread Linus Torvalds
On Tue, Oct 10, 2017 at 11:14 AM, Peter Zijlstra wrote: > > Ah, but that's not at all what cross-release is about. Nobody really > does wonky ownership transfer of mutexes like that (although there might > be someone doing something with semaphores, I didn't check). Its to > allow detecting this d

Re: [PATCH][V2] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Wei Wang
On Tue, Oct 10, 2017 at 11:10 AM, Colin King wrote: > From: Colin Ian King > > The use of the | operator always leads to true which looks rather > suspect to me. Fix this by using & instead to just check the > RTF_CACHE entry bit. > > Detected by CoverityScan, CID#1457734, #1457747 ("Wrong operat

Re: [PATCH 4.9 000/104] 4.9.54-stable review

2017-10-10 Thread Guenter Roeck
On Tue, Oct 10, 2017 at 05:33:04PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 10, 2017 at 10:23:43AM -0500, Tom Gall wrote: > > On Tue, Oct 10, 2017 at 2:11 AM, Greg Kroah-Hartman > > wrote: > > > On Mon, Oct 09, 2017 at 03:37:43PM -0500, Tom Gall wrote: > > >> On Sun, Oct 8, 2017 at 2:23 AM,

Re: [PATCH 09/12] of: overlay: avoid race condition between applying multiple overlays

2017-10-10 Thread Rob Herring
On Wed, Oct 04, 2017 at 08:29:59PM -0700, Frank Rowand wrote: > On 10/04/17 08:19, Rob Herring wrote: > > On Mon, Oct 2, 2017 at 10:53 PM, wrote: > >> From: Frank Rowand > >> > >> The process of applying an overlay consists of: > >> - unflatten an overlay FDT (flattened device tree) into an >

Re: [GIT PULL] nfsd changes for 4.14-rc

2017-10-10 Thread Linus Torvalds
On Tue, Oct 10, 2017 at 11:24 AM, J. Bruce Fields wrote: > Please pull nfsd fixes from > > git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.14-1 There's nothing there. That tag just points to my 4.14-rc1 commit. > One fix for a 4.14 regression, and one minor fix to the MAINTAINERs > file. (I

Re: [Part2 PATCH v5.1 12.1/31] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-10 Thread Tom Lendacky
On 10/10/2017 10:00 AM, Brijesh Singh wrote: On 10/09/2017 10:21 AM, Borislav Petkov wrote: ... 03:00.1 Encryption controller: Advanced Micro Devices, Inc. [AMD] Device 1468 13:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Device 1456 Btw, what do those PCI functions each

[GIT PULL] seccomp fix for v4.14-rc5

2017-10-10 Thread Kees Cook
Hi, Please pull this minor seccomp fix for v4.14-rc5. I debated sending this at all for v4.14, but since it fixes a minor issue in the prior fix, which also went to -stable, it seemed better to just get all of it cleaned up right now. Thanks! -Kees The following changes since commit 66a733ea6b6

Re: [PATCH 4.9 000/104] 4.9.54-stable review

2017-10-10 Thread Greg Kroah-Hartman
On Tue, Oct 10, 2017 at 11:39:09AM -0700, Guenter Roeck wrote: > On Tue, Oct 10, 2017 at 05:33:04PM +0200, Greg Kroah-Hartman wrote: > > On Tue, Oct 10, 2017 at 10:23:43AM -0500, Tom Gall wrote: > > > On Tue, Oct 10, 2017 at 2:11 AM, Greg Kroah-Hartman > > > wrote: > > > > On Mon, Oct 09, 2017 at

Re: [PATCH 02/10] perf tool: fix: Don't discard prev in backward mode

2017-10-10 Thread Wangnan (F)
On 2017/10/11 2:23, Wangnan (F) wrote: On 2017/10/11 1:20, kan.li...@intel.com wrote: From: Kan Liang Perf record can switch output. The new output should only store the data after switching. However, in overwrite backward mode, the new output still have the data from old output. At the e

Re: [PATCH v3 1/2] KVM: X86: Processor States following Reset or INIT

2017-10-10 Thread Radim Krčmář
2017-10-09 15:51-0700, Wanpeng Li: > From: Wanpeng Li > > - XCR0 is reset to 1 by RESET but not INIT > - XSS is zeroed by both RESET and INIT > - BNDCFGU, BND0-BND3, BNDCFGS are zeroed by both RESET and INIT > > This patch does this according to SDM. > > Cc: Paolo Bonzini > Cc: Radim Krčmář >

Re: [PATCH 1/2] IB/hfi1: Use preempt_{dis,en}able_nort()

2017-10-10 Thread Dennis Dalessandro
On 10/3/2017 11:49 AM, Arnaldo Carvalho de Melo wrote: From: Arnaldo Carvalho de Melo sc_buffer_alloc() disables preemption that will be reenabled by either pio_copy() or seg_pio_copy_end(). But before disabling preemption it grabs a spin lock that will be dropped after it disables preemption,

x86/mce: suspicious RCU usage in 4.13.4

2017-10-10 Thread Jeremy Cline
Hello, A Fedora user has reported an issue about suspicious RCU usage in dev-mcelog. It looks like perhaps the notifier call chain is not acquiring the mce_chrdev_read_mutex? The traceback is [36915.633804] = [36915.633805] WARNING: suspicious RCU usage [36915.633808]

Re: [PATCH 03/10] perf tool: new iterfaces to read event from ring buffer

2017-10-10 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 10, 2017 at 03:36:28PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Oct 10, 2017 at 03:34:55PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Tue, Oct 10, 2017 at 06:28:18PM +, Liang, Kan escreveu: > > > > Em Tue, Oct 10, 2017 at 10:20:16AM -0700, kan.li...@intel.com escrev

[PATCH] staging: rtlwifi: mark expected switch fall-through in rtl_make_smps_action

2017-10-10 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva --- drivers/staging/rtlwifi/base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtlwifi/base.c b/drivers/stagi

Re: [PATCH] KVM: SVM: limit kvm_handle_page_fault to #PF handling

2017-10-10 Thread Radim Krčmář
2017-10-10 10:49+0200, Paolo Bonzini: > It has always annoyed me a bit how SVM_EXIT_NPF is handled by > pf_interception. This is also the only reason behind the > under-documented need_unprotect argument to kvm_handle_page_fault. > Let NPF go straight to kvm_mmu_page_fault, just like VMX > does in

Re: [PATCH 1/2] IB/hfi1: Use preempt_{dis,en}able_nort()

2017-10-10 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 10, 2017 at 02:59:18PM -0400, Dennis Dalessandro escreveu: > On 10/3/2017 11:49 AM, Arnaldo Carvalho de Melo wrote: > > From: Arnaldo Carvalho de Melo > > > > sc_buffer_alloc() disables preemption that will be reenabled by either > > pio_copy() or seg_pio_copy_end(). But before disabl

Re: [PATCH v2] xdp: Sample xdp program implementing ip forward

2017-10-10 Thread Jesper Dangaard Brouer
On Tue, 10 Oct 2017 12:58:52 +0530 Christina Jacob wrote: > +SEC("xdp3") > +int xdp_prog3(struct xdp_md *ctx) > +{ > + void *data_end = (void *)(long)ctx->data_end; > + void *data = (void *)(long)ctx->data; > + struct ethhdr *eth = data; > + int rc = XDP_DROP, forward_to; > +

Re: [PATCH 2/2] IB/hfi1: Handle packets in the theaded handler only

2017-10-10 Thread Dennis Dalessandro
On 10/3/2017 11:49 AM, Arnaldo Carvalho de Melo wrote: Cc: Clark Williams Cc: Dean Luick Cc: Dennis Dalessandro Cc: Doug Ledford Cc: Julia Cartwright Cc: Kaike Wan Cc: Leon Romanovsky Cc: linux-r...@vger.kernel.org Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Sebastian Sanchez C

Re: [PATCH v6 09/14] platform/x86: dell-smbios: Introduce dispatcher for SMM calls

2017-10-10 Thread Pali Rohár
On Monday 09 October 2017 17:51:47 Mario Limonciello wrote: > static void dell_rfkill_query(struct rfkill *rfkill, void *data) > { > - struct calling_interface_buffer *buffer; > int radio = ((unsigned long)data & 0xF); > int hwswitch; > int status; > int ret; > > -

Re: [PATCH v6 13/14] platform/x86: wmi: create character devices when requested by drivers

2017-10-10 Thread Pali Rohár
On Monday 09 October 2017 17:51:51 Mario Limonciello wrote: > + /* make sure we're not calling a higher instance than exists*/ > + if (_IOC_NR(cmd) > wblock->gblock.instance_count - 1) > + return -EINVAL; Is this condition really working? instance_count is unsigned, cmd is also

Re: [PATCH v6 12/14] platform/x86: dell-smbios-smm: test for WSMT

2017-10-10 Thread Pali Rohár
On Monday 09 October 2017 17:51:50 Mario Limonciello wrote: > WSMT is as an attestation to the OS that the platform won't > modify memory outside of pre-defined areas. > > If a platform has WSMT enabled in BIOS setup, SMM calls through > dcdbas will fail. The only way to access platform data in t

RE: [PATCH v6 09/14] platform/x86: dell-smbios: Introduce dispatcher for SMM calls

2017-10-10 Thread Mario.Limonciello
> -Original Message- > From: Pali Rohár [mailto:pali.ro...@gmail.com] > Sent: Tuesday, October 10, 2017 11:01 AM > To: Limonciello, Mario > Cc: dvh...@infradead.org; Andy Shevchenko ; > LKML ; platform-driver-...@vger.kernel.org; > Andy Lutomirski ; quasi...@google.com; r...@rjwysocki.net;

Re: [PATCH][V2] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Martin KaFai Lau
On Tue, Oct 10, 2017 at 06:10:30PM +, Colin King wrote: > From: Colin Ian King > > The use of the | operator always leads to true which looks rather > suspect to me. Fix this by using & instead to just check the > RTF_CACHE entry bit. > > Detected by CoverityScan, CID#1457734, #1457747 ("Wro

Re: [PATCH 03/10] perf tool: new iterfaces to read event from ring buffer

2017-10-10 Thread Wangnan (F)
On 2017/10/11 3:00, Arnaldo Carvalho de Melo wrote: Em Tue, Oct 10, 2017 at 03:36:28PM -0300, Arnaldo Carvalho de Melo escreveu: Em Tue, Oct 10, 2017 at 03:34:55PM -0300, Arnaldo Carvalho de Melo escreveu: Em Tue, Oct 10, 2017 at 06:28:18PM +, Liang, Kan escreveu: Em Tue, Oct 10, 2017 at

Re: [PATCH 2/2] IB/hfi1: Handle packets in the theaded handler only

2017-10-10 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 10, 2017 at 03:06:00PM -0400, Dennis Dalessandro escreveu: > On 10/3/2017 11:49 AM, Arnaldo Carvalho de Melo wrote: > > Cc: Clark Williams > > Cc: Dean Luick > > Cc: Dennis Dalessandro > > Cc: Doug Ledford > > Cc: Julia Cartwright > > Cc: Kaike Wan > > Cc: Leon Romanovsky > > Cc:

Re: [PATCH] KVM: x86: extend usage of RET_MMIO_PF_* constants

2017-10-10 Thread Radim Krčmář
2017-10-10 11:10+0200, Paolo Bonzini: > The x86 MMU if full of code that returns 0 and 1 for retry/emulate. Use > the existing RET_MMIO_PF_RETRY/RET_MMIO_PF_EMULATE enum, renaming it to > drop the MMIO part. > > Signed-off-by: Paolo Bonzini > --- > diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/

Re: [PATCH v15 5/7] vfio: ABI for mdev display dma-buf operation

2017-10-10 Thread Alex Williamson
On Tue, 10 Oct 2017 17:50:05 +0800 Tina Zhang wrote: > Add VFIO_DEVICE_QUERY_GFX_PLANE ioctl command to let user mode query and > get the plan and its related information. This ioctl can be invoked with: s/plan/plane/ > 1) either flag DMABUF or REGION is set. Vendor driver returns success and >

Re: [PATCH] KVM: SVM: unconditionally wake up VCPU on IOMMU interrupt

2017-10-10 Thread Radim Krčmář
2017-10-10 12:57+0200, Paolo Bonzini: > Checking the mode is unnecessary, and is done without a memory barrier > separating the LAPIC write from the vcpu->mode read; in addition, > kvm_vcpu_wake_up is already doing a check for waiters on the wait queue > that has the same effect. > > In practice i

Re: [PATCH 03/10] perf tool: new iterfaces to read event from ring buffer

2017-10-10 Thread Arnaldo Carvalho de Melo
Em Wed, Oct 11, 2017 at 03:10:37AM +0800, Wangnan (F) escreveu: > > > On 2017/10/11 3:00, Arnaldo Carvalho de Melo wrote: > > Em Tue, Oct 10, 2017 at 03:36:28PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Tue, Oct 10, 2017 at 03:34:55PM -0300, Arnaldo Carvalho de Melo > > > escreveu: > >

Re: [PATCH v2 3/3] mtd: spi-nor: add flag for reading dummy cycles from nv cfg reg

2017-10-10 Thread Cyrille Pitchen
Hi Matthew NAK for this patch Le 20/09/2017 à 20:28, matthew.gerl...@linux.intel.com a écrit : > From: Matthew Gerlach > > This patch is a work around for some non-standard behavior > of EPCQ flash parts: > > https://www.altera.com/documentation/wtw1396921531042.html#wtw1396921651224 > >From

RE: [PATCH v6 13/14] platform/x86: wmi: create character devices when requested by drivers

2017-10-10 Thread Mario.Limonciello
> -Original Message- > From: Pali Rohár [mailto:pali.ro...@gmail.com] > Sent: Tuesday, October 10, 2017 2:12 PM > To: Limonciello, Mario > Cc: dvh...@infradead.org; Andy Shevchenko ; > LKML ; platform-driver-...@vger.kernel.org; > Andy Lutomirski ; quasi...@google.com; r...@rjwysocki.net;

Re: [PATCH v2 08/16] iommu: introduce device fault data

2017-10-10 Thread Jean-Philippe Brucker
On 06/10/17 00:03, Jacob Pan wrote: > Device faults detected by IOMMU can be reported outside IOMMU > subsystem. This patch intends to provide a generic device > fault data such that device drivers can communicate IOMMU faults > without model specific knowledge. > > The assumption is that model sp

Re: [PATCH][V2] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread David Miller
From: Wei Wang Date: Tue, 10 Oct 2017 11:38:20 -0700 > On Tue, Oct 10, 2017 at 11:10 AM, Colin King wrote: >> From: Colin Ian King >> >> The use of the | operator always leads to true which looks rather >> suspect to me. Fix this by using & instead to just check the >> RTF_CACHE entry bit. >> >

[PATCH 2/3] timer: Prepare to change all DEFINE_TIMER() callbacks

2017-10-10 Thread Kees Cook
Before we can globally change the function prototype of all timer callbacks, we have to change those set up by DEFINE_TIMER(). Prepare for this by casting the callbacks until the prototype changes globally. Cc: Thomas Gleixner Signed-off-by: Kees Cook --- include/linux/timer.h | 8 1 f

[PATCH 1/3] atm: idt77105: Drop needless setup_timer()

2017-10-10 Thread Kees Cook
Calling setup_timer() is redundant when DEFINE_TIMER() has been used. Cc: Chas Williams <3ch...@gmail.com> Cc: linux-atm-gene...@lists.sourceforge.net Cc: net...@vger.kernel.org Signed-off-by: Kees Cook --- This is intended to go via the timer tree. Acks appreciated! --- drivers/atm/idt77105.c |

[PATCH 0/3] timer: Switch DEFINE_TIMER callback prototypes

2017-10-10 Thread Kees Cook
This continues the timer callback prototype conversions. This handles all the DEFINE_TIMER callbacks, which already ignore their argument. This switches them all to take the timer_list pointer for the future when the callback will be universally switched over. -Kees

Re: [PATCH 1/3] perf/ftrace: Revert ("perf/ftrace: Fix double traces of perf on ftrace:function")

2017-10-10 Thread Steven Rostedt
On Tue, 10 Oct 2017 18:31:25 +0200 Peter Zijlstra wrote: > Revert commit: > > 75e8387685f6 ("perf/ftrace: Fix double traces of perf on ftrace:function") > > The reason I insta stumbled on that patch is that it only addresses the ftrace I'm trying to figure out what you meant by "insta". --

[PATCH 3/3] treewide: Switch DEFINE_TIMER callbacks to struct timer_list *

2017-10-10 Thread Kees Cook
This changes all DEFINE_TIMER() callbacks to use a struct timer_list pointer instead of unsigned long. Since the data argument has already been removed, none of these callbacks are using their argument currently, so this renames the argument to "unused". Done using the following semantic patch: @

Re: [GIT PULL] nfsd changes for 4.14-rc

2017-10-10 Thread J. Bruce Fields
On Tue, Oct 10, 2017 at 11:42:01AM -0700, Linus Torvalds wrote: > On Tue, Oct 10, 2017 at 11:24 AM, J. Bruce Fields > wrote: > > Please pull nfsd fixes from > > > > git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.14-1 > > There's nothing there. That tag just points to my 4.14-rc1 commit. >

Re: [PATCH 03/10] perf tool: new iterfaces to read event from ring buffer

2017-10-10 Thread Wangnan (F)
On 2017/10/11 3:17, Arnaldo Carvalho de Melo wrote: Em Wed, Oct 11, 2017 at 03:10:37AM +0800, Wangnan (F) escreveu: On 2017/10/11 3:00, Arnaldo Carvalho de Melo wrote: Em Tue, Oct 10, 2017 at 03:36:28PM -0300, Arnaldo Carvalho de Melo escreveu: Em Tue, Oct 10, 2017 at 03:34:55PM -0300, Arna

Re: [PATCH v2 15/16] gpio: tegra: Use banked GPIO infrastructure

2017-10-10 Thread Grygorii Strashko
On 10/10/2017 05:27 AM, Thierry Reding wrote: > On Mon, Oct 09, 2017 at 04:22:29PM -0500, Grygorii Strashko wrote: >> >> >> On 09/28/2017 04:56 AM, Thierry Reding wrote: >>> From: Thierry Reding >>> >>> Convert the Tegra GPIO driver to use the banked GPIO infrastructure, >>> which simplifies som

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-10 Thread David Miller
From: Tim Hansen Date: Mon, 9 Oct 2017 11:37:59 -0400 > Fix BUG() calls to use BUG_ON(conditional) macros. > > This was found using make coccicheck M=net/core on linux next > tag next-2017092 > > Signed-off-by: Tim Hansen Althrough there were objections raised, none of them technically stand

Re: [PATCH] rtl8xxxu: mark expected switch fall-throughs

2017-10-10 Thread Jes Sorensen
On 10/10/2017 03:30 PM, Gustavo A. R. Silva wrote: In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. While this isn't harmful, to me this looks like pointless patch churn for zero gain and it's just ugly. Jes Cc: Jes Sorensen Cc:

RE: [PATCH 02/10] perf tool: fix: Don't discard prev in backward mode

2017-10-10 Thread Liang, Kan
> > diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c > > index 33b8837..7d23cf5 100644 > > --- a/tools/perf/util/evlist.c > > +++ b/tools/perf/util/evlist.c > > @@ -742,13 +742,25 @@ static int > > rb_find_range(void *data, int mask, u64 head, u64 old, > > u64 *start, u6

Re: mmotm 2016-08-02-15-53 uploaded

2017-10-10 Thread Andrew Morton
On Tue, 10 Oct 2017 14:06:41 -0400 Vitaly Mayatskih wrote: > * ocfs2-dlm-continue-to-purge-recovery-lockres-when-recovery > -master-goes-down.patch > > This one completely broke two node cluster use case: when one node dies, > the other one either eventually crashes (~4.14-rc4) or locks up (pre

Re: [PATCH 09/12] of: overlay: avoid race condition between applying multiple overlays

2017-10-10 Thread Frank Rowand
On 10/10/17 11:40, Rob Herring wrote: > On Wed, Oct 04, 2017 at 08:29:59PM -0700, Frank Rowand wrote: >> On 10/04/17 08:19, Rob Herring wrote: >>> On Mon, Oct 2, 2017 at 10:53 PM, wrote: From: Frank Rowand The process of applying an overlay consists of: - unflatten an overl

[PATCH] staging: vt6655: mark expected switch fall-throughs in vnt_set_keymode

2017-10-10 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva --- drivers/staging/vt6655/key.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/v

Re: [PATCH v4 13/14] platform/x86: dell-smbios-wmi: introduce userspace interface

2017-10-10 Thread Alan Cox
> There are some "write once" items that for the general purpose user that > won't brick a box, but should probably be blacklisted though. > I'll think this through some more. I would strongly urge you to do whitelisting as it's good security. If you can divide the calls into something like this i

Re: [PATCH 2/3] perf/ftrace: Fix function trace events

2017-10-10 Thread Steven Rostedt
On Tue, 10 Oct 2017 18:31:26 +0200 Peter Zijlstra wrote: > Signed-off-by: Peter Zijlstra (Intel) > --- > kernel/trace/trace_event_perf.c | 68 > +--- > 1 file changed, 36 insertions(+), 32 deletions(-) > > --- a/kernel/trace/trace_event_perf.c > +++ b/k

Re: [PATCH] Fix mpage_writepage() for pages with buffers

2017-10-10 Thread Andrew Morton
On Fri, 6 Oct 2017 14:15:41 -0700 Matthew Wilcox wrote: > When using FAT on a block device which supports rw_page, we can hit > BUG_ON(!PageLocked(page)) in try_to_free_buffers(). This is because we > call clean_buffers() after unlocking the page we've written. Introduce a > new clean_page_buff

Re: x86/mce: suspicious RCU usage in 4.13.4

2017-10-10 Thread Borislav Petkov
On Tue, Oct 10, 2017 at 03:00:09PM -0400, Jeremy Cline wrote: > Hello, > > A Fedora user has reported an issue about suspicious RCU usage in > dev-mcelog. It looks like perhaps the notifier call chain is not > acquiring the mce_chrdev_read_mutex? The traceback is > > [36915.633804] ==

[PATCH] x86/mm: Disable various instrumentations of mem_encrypt.c

2017-10-10 Thread Tom Lendacky
Some routines in mem_encrypt.c are called very early in the boot process, e.g. sme_enable(). When CONFIG_KCOV is defined the resulting code added to sme_enable() (and others) for KCOV instrumentation results in a kernel crash. Disable the KCOV instrumentation for mem_encrypt.c by adding KCOV_INST

RE: [PATCH 02/10] perf tool: fix: Don't discard prev in backward mode

2017-10-10 Thread Liang, Kan
> On 2017/10/11 2:23, Wangnan (F) wrote: > > > > > > On 2017/10/11 1:20, kan.li...@intel.com wrote: > >> From: Kan Liang > >> > >> Perf record can switch output. The new output should only store the data > >> after switching. However, in overwrite backward mode, the new output > >> still have the

[PATCH 3.18 11/32] USB: devio: Dont corrupt user memory

2017-10-10 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Dan Carpenter commit fa1ed74eb1c233be6131ec92df21ab46499a15b6 upstream. The user buffer has "uurb->buffer_length" bytes. If the kernel has more information than that, we should truncate it in

[PATCH 3.18 01/32] usb: gadget: inode.c: fix unbalanced spin_lock in ep0_write

2017-10-10 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: David Eccher commit b7bd98b7db9fc8fe19da1a5ff0215311c6b95e46 upstream. Fix bad unlock balance: ep0_write enter with the locks locked from inode.c:1769, hence it must exit with spinlock held to

[PATCH 3.18 13/32] usb: Increase quirk delay for USB devices

2017-10-10 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Dmitry Fleytman commit b2a542bbb3081dbd64acc8929c140d196664c406 upstream. Commit e0429362ab15 ("usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e") introduced quirk to workaroun

[PATCH 3.18 03/32] USB: gadgetfs: fix copy_to_user while holding spinlock

2017-10-10 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Alan Stern commit 6e76c01e71551cb221c1f3deacb9dcd9a7346784 upstream. The gadgetfs driver as a long-outstanding FIXME, regarding a call of copy_to_user() made while holding a spinlock. This pa

<    3   4   5   6   7   8   9   10   11   12   >