Re: [PATCHv4 05/10] mfd: ti-lmu: use of_device_get_match_data() helper

2018-04-16 Thread Lee Jones
On Fri, 30 Mar 2018, Sebastian Reichel wrote: > Replace of_match_device() with of_device_get_match_data(), which > slightly decreases lines of code and allows to move the DT table > next to the I2C table. > > Signed-off-by: Sebastian Reichel > --- > drivers/mfd/ti-lmu.c | 30 ++-

Re: [PATCHv4 07/10] mfd: ti-lmu: register one backlight device per channel

2018-04-16 Thread Lee Jones
On Fri, 30 Mar 2018, Sebastian Reichel wrote: > All LMU devices support multiple channels, that can be controlled > independently. This registers one backlight sub-device per channel. > > Signed-off-by: Sebastian Reichel > --- > drivers/mfd/ti-lmu.c | 62 > +++

Re: [PATCH v2] perf list: Add s390 support for detailed/verbose pmu event description

2018-04-16 Thread Mark Rutland
On Mon, Apr 16, 2018 at 03:23:14PM +0200, Thomas Richter wrote: > From: Thomas Richter > > Perf list with flags -d and -v print a description (-d) or > a very verbose explanation (-v) of CPU specific counter events. > These descriptions are provided with the json files in > directory pmu-events/a

Re: [RESEND PATCH v6 1/5] pwm-backlight: enable/disable the PWM before/after LCD enable toggle.

2018-04-16 Thread Lee Jones
On Wed, 28 Mar 2018, Enric Balletbo i Serra wrote: > Before this patch the enable signal was set before the PWM signal and > vice-versa on power off. This sequence is wrong, at least, it is on > the different panels datasheets that I checked, so I inverted the sequence > to follow the specs. > >

[PATCH v2] fs: kernfs: Adding new return type vm_fault_t

2018-04-16 Thread Souptick Joarder
Use new return type vm_fault_t for page_mkwrite and fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Reference commit id-> 1c8f422059ae5da07db7406ab916203f941

Re: [PATCH v13 6/6] PCI/DPC: Do not do recovery for hotplug enabled system

2018-04-16 Thread Sinan Kaya
On 4/15/2018 11:17 PM, Bjorn Helgaas wrote: > It doesn't seem right to me that we handle both ERR_NONFATAL and > ERR_FATAL events differently if we happen to have DPC support in a > switch. > > Maybe we should consider triggering DPC only on ERR_FATAL? That would > keep DPC out of the ERR_NONFATA

Re: [PATCH 08/25] staging: lustre: libcfs: add cpu distance handling

2018-04-16 Thread Dan Carpenter
On Mon, Apr 16, 2018 at 12:09:50AM -0400, James Simmons wrote: > +int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len) > +{ > + char *tmp = buf; > + int rc = -EFBIG; > + int i; > + int j; > + > + for (i = 0; i < cptab->ctb_nparts; i++) { > + if

Re: [PATCH 1/2] tty: n_gsm: Fix long delays with control frame timeouts in ADM mode

2018-04-16 Thread Tony Lindgren
* Pavel Machek [180416 08:46]: > Ahha, so first I missed two of the patches, and second, I was not > patient enough. I was stopping my test after first or second > error. Now I get... so I guess it works for me. OK good to hear. > For the series: > > Tested-by: Pavel Machek Thanks for testing

Re: [PATCH v2 03/14] staging: iio: ad7746: Fix bound checkings

2018-04-16 Thread Hernán Gonzalez
On Sun, Apr 15, 2018 at 12:05 PM, Jonathan Cameron wrote: > On Fri, 13 Apr 2018 13:36:40 -0300 > Hernán Gonzalez wrote: > >> Also remove unnecessary parenthesis > I am probably missing something. I'm not sure what you mean > by fix bound checking? There are superfluous brackets, but > I don't

Re: [PATCH v3 2/6] mfd: stm32-timers: add support for dmas

2018-04-16 Thread Lee Jones
On Mon, 16 Apr 2018, Fabrice Gasnier wrote: > On 04/16/2018 02:22 PM, Lee Jones wrote: > > On Fri, 30 Mar 2018, Fabrice Gasnier wrote: > > > >> STM32 Timers can support up to 7 DMA requests: > >> - 4 channels, update, compare and trigger. > >> Optionally request part, or all DMAs from stm32-timer

[PATCH 2/7] MIPS: boot: do not include $(cpp_flags) for preprocessing ITS

2018-04-16 Thread Masahiro Yamada
$(CPP) is used here to perform macro replacement in ITS. Do not pass $(cpp_flags) because it pulls in more options for dependency file generation etc. but none of which is necessary here. ITS files do not include any header file, so $(call if_change,...) is enough. Signed-off-by: Masahiro Yamada

[PATCH 6/7] MIPS: boot: merge build rules of vmlinux.*.itb by using pattern rule

2018-04-16 Thread Masahiro Yamada
Merge the build rule of vmlinux.{gz,bz2,lzma,lzo}.itb, and also move 'targets' close to the related code. Signed-off-by: Masahiro Yamada --- arch/mips/boot/Makefile | 23 +++ 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/arch/mips/boot/Makefile b/arch/mips/b

[PATCH 3/7] MIPS: boot: fix build rule of vmlinux.its.S

2018-04-16 Thread Masahiro Yamada
As Documentation/kbuild/makefile.txt says, it is a typical mistake to forget the FORCE prerequisite for the rule invoked by if_changed. Add the FORCE to the prerequisite, but it must be filtered-out from the files passed to the 'cat' command. Because this rule generates .vmlinux.its.S.cmd, vmlinu

[RESEND PATCH v1 0/2] Print the request tag in Block/SCSI trace events

2018-04-16 Thread Bean Huo (beanhuo)
These patches are to add the printout of the request tag in Block/SCSI trace events when tracing one request or command, this is very useful for tracing the task running status in the storage device which supports multiple command queue. As for the first patch " Add tag in SCSI trace events", copi

[PATCH 0/7] MIPS: boot: fix various problems in arch/mips/boot/Makefile

2018-04-16 Thread Masahiro Yamada
When I was trying to fix commit 0f9da844d877 in a more correct way, I found various problems in arch/mips/boot/Makefile. ITS is always rebuilt when you rebuild the kernel without touching anything. Many build rules are wrong. If you look at the last patch in this series, you may realize support

[PATCH 5/7] MIPS: boot: add missing targets for vmlinux.*.its

2018-04-16 Thread Masahiro Yamada
The build rule of vmlinux.*.its is invoked by $(call if_changed,...) but it always rebuilds the target needlessly due to missing targets. Signed-off-by: Masahiro Yamada --- arch/mips/boot/Makefile | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/mips/boot/Makefile b/arch/mips/boot

[PATCH 1/7] Revert "MIPS: boot: Define __ASSEMBLY__ for its.S build"

2018-04-16 Thread Masahiro Yamada
This reverts commit 0f9da844d87796ac31b04e81ee95e155e9043132. It is true that commit 0f9da844d877 ("MIPS: boot: Define __ASSEMBLY__ for its.S build") fixed the build error, but it should not have defined __ASSEMBLY__ just for textual substitution in arbitrary data. The file is image tree source in

[PATCH 4/7] MIPS: boot: correct prerequisite image of vmlinux.*.its

2018-04-16 Thread Masahiro Yamada
vmlinux.*.its does not directly depend on $(VMLINUX) but vmlinux.bin.* Signed-off-by: Masahiro Yamada --- arch/mips/boot/Makefile | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index 6c7054e..30512ab 100644 --- a/

Re: [PATCH v2 07/14] staging: iio: ad7746: Remove unused defines

2018-04-16 Thread Hernán Gonzalez
You're right, got confused from the macro defined in the .c file. I'll leave this alone on the next series Thanks! On Sun, Apr 15, 2018 at 12:12 PM, Jonathan Cameron wrote: > On Fri, 13 Apr 2018 13:36:44 -0300 > Hernán Gonzalez wrote: > >> Signed-off-by: Hernán Gonzalez >> --- >> drivers/stagi

[RESEND PATCH v1 2/2] trace: events: block: Add tag in block trace events

2018-04-16 Thread Bean Huo (beanhuo)
Print the request tag along with other information in block trace events when tracing request , and unplug type (Sync / Async). Signed-off-by: Bean Huo --- include/trace/events/block.h | 36 +--- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/incl

[RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bean Huo (beanhuo)
Print the request tag along with other information while tracing a command. Signed-off-by: Bean Huo --- include/trace/events/scsi.h | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/include/trace/events/scsi.h b/include/trace/events/scsi.h index f624969..a

Re: [PATCH v4 13/15] KVM: s390: configure the guest's AP devices

2018-04-16 Thread Halil Pasic
On 04/16/2018 03:05 PM, Pierre Morel wrote: >> +static void vfio_ap_mdev_release(struct mdev_device *mdev) >> +{ >> +struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); >> + >> +kvm_ap_deconfigure_matrix(matrix_mdev->kvm); >> +kvm_ap_interpret_instructions(matrix_mdev->kvm, f

Re: [PATCH] IB: make INFINIBAND_ADDR_TRANS configurable

2018-04-16 Thread Jason Gunthorpe
On Mon, Apr 16, 2018 at 01:56:20AM -0700, Christoph Hellwig wrote: > On Mon, Apr 16, 2018 at 04:02:12AM +, Greg Thelen wrote: > > I think I've identified the set of options which use > > INFINIBAND_ADDR_TRANS without a kconfig depends: > > * CIFS_SMB_DIRECT > > * INFINIBAND_SRPT > > * NVME_RDMA

Re: [PATCH 1/3] ARM: imx_v6_v7_defconfig: add RN5T618 PMIC family support

2018-04-16 Thread Shawn Guo
On Sun, Mar 18, 2018 at 09:15:08PM +0100, Stefan Agner wrote: > This allows to successfully boot Colibri iMX7 which is using > the Ricoh RN5T567 PMIC. > > Signed-off-by: Stefan Agner Applied all, thanks.

Re: [linux-sunxi] Re: [PATCH 3/5] net: stmmac: dwmac-sun8i: Allow getting syscon regmap from device

2018-04-16 Thread Chen-Yu Tsai
On Mon, Apr 16, 2018 at 10:31 PM, Maxime Ripard wrote: > On Thu, Apr 12, 2018 at 11:23:30PM +0800, Chen-Yu Tsai wrote: >> On Thu, Apr 12, 2018 at 11:11 PM, Icenowy Zheng wrote: >> > 于 2018年4月12日 GMT+08:00 下午10:56:28, Maxime Ripard >> > 写到: >> >>On Wed, Apr 11, 2018 at 10:16:39PM +0800, Icenowy

[PATCH 7/7] MIPS: boot: rebuild ITB when contained DTB is updated

2018-04-16 Thread Masahiro Yamada
Since now, the unnecessary rebuild of ITB has been fixed. Another problem to be taken care of is, missed rebuild of ITB. For example, board-boston.its.S includes boston.dtb by the /incbin/ directive. If boston.dtb is updated, vmlinux.*.dtb must be rebuilt. Currently, the dependency between ITB a

[PATCH v2] uio: Change return type to vm_fault_t

2018-04-16 Thread Souptick Joarder
Use new return type vm_fault_t for fault handler in struct vm_operations_struct. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Reference commit id-> 1c8f422059ae5da07db7

Re: [PATCH v2 11/14] staging: iio: ad7746: Add devicetree bindings documentation

2018-04-16 Thread Hernán Gonzalez
On Sun, Apr 15, 2018 at 12:37 PM, Jonathan Cameron wrote: > On Fri, 13 Apr 2018 13:36:48 -0300 > Hernán Gonzalez wrote: > >> Cc: Rob Herring >> Cc: Mark Rutland >> Cc: devicet...@vger.kernel.org >> Signed-off-by: Hernán Gonzalez > A few comments inline. > > Thanks, > > Jonathan > >> --- >> ..

Re: [PATCH v10 05/10] livepatch: Support separate list for replaced patches.

2018-04-16 Thread Petr Mladek
On Wed 2018-04-11 10:48:52, Josh Poimboeuf wrote: > On Wed, Apr 11, 2018 at 04:17:11PM +0200, Petr Mladek wrote: > > > I still agree with my original conclusion that enforcing stack order no > > > longer makes sense though. > > > > The question is what we will get if we remove the stack. Will it >

Re: [PATCH v4 1/2] Documentation: Documentation for qcom, llcc

2018-04-16 Thread Rob Herring
On Tue, Apr 10, 2018 at 01:08:12PM -0700, Rishabh Bhatnagar wrote: > Documentation for last level cache controller device tree bindings, > client bindings usage examples. "Documentation: Documentation ..."? That wastes a lot of the subject line... The preferred prefix is "dt-bindings: ..." > >

Re: [PATCH v2 5/5] ALSA: xen-front: Implement ALSA virtual sound driver

2018-04-16 Thread kbuild test robot
Hi Oleksandr, Thank you for the patch! Yet something to improve: [auto build test ERROR on sound/for-next] [also build test ERROR on v4.17-rc1 next-20180416] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci

[PATCH] gpu: drm: vgem: Change return type to vm_fault_t

2018-04-16 Thread Souptick Joarder
Use new return type vm_fault_t for fault handler. Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox --- drivers/gpu/drm/vgem/vgem_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c index 2524

Re: [PATCH v3] selftests/livepatch: introduce tests

2018-04-16 Thread Petr Mladek
On Mon 2018-04-16 13:33:55, Miroslav Benes wrote: > On Fri, 13 Apr 2018, Joe Lawrence wrote: > > Thanks for reviewing. I'll hold off on posting v4 until Petr (and > > others) get a chance to comment. Perhaps there are other tests that > > would be helpful? > I think it would be useful to have te

[PATCH] ARM: dts: renesas: replace toshiba,mmc-wrprotect-disable with disable-wp

2018-04-16 Thread Masahiro Yamada
Follow up commit 788778b0d21a ("mmc: tmio: deprecate "toshiba, mmc-wrprotect-disable" DT property"). Signed-off-by: Masahiro Yamada --- arch/arm/boot/dts/r8a73a4-ape6evm.dts | 4 ++-- arch/arm/boot/dts/sh73a0.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/

Re: [PATCH v3] net: davicom: dm9000: Avoid spinlock recursion during dm9000_timeout routine

2018-04-16 Thread David Miller
From: Liu Xiang Date: Sat, 14 Apr 2018 16:50:34 +0800 > +static bool dm9000_current_in_timeout(struct board_info *db) > +{ > + bool ret = false; > + > + preempt_disable(); > + ret = (db->timeout_cpu == smp_processor_id()); > + preempt_enable(); This doesn't work. As soon as you

Re: [PATCH v2 1/2] dt-bindings: nvmem: Add binding for RAVE SP EEPROM driver

2018-04-16 Thread Rob Herring
On Tue, Apr 10, 2018 at 06:59:47PM -0700, Andrey Smirnov wrote: > Add Device Tree bindings for RAVE SP EEPROM driver - an MFD cell of > parent RAVE SP driver (documented in > Documentation/devicetree/bindings/mfd/zii,rave-sp.txt). > > Cc: Srinivas Kandagatla > Cc: linux-kernel@vger.kernel.org > C

Re: [PATCH v5 1/3] dt-bindings: pinctrl: bcm2835-gpio: Add generic pinctrl support

2018-04-16 Thread Rob Herring
On Wed, Apr 11, 2018 at 12:58:44AM -0400, Matheus Castello wrote: > Added generic pin configuration and multiplexing support, > and should be preferred than brcm legacy one. > > Signed-off-by: Matheus Castello > --- > .../devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt | 18 > +++

Re: [PATCH] dt-bindings: pinctrl: sunxi: Fix reference to driver

2018-04-16 Thread Rob Herring
On Wed, Apr 11, 2018 at 01:17:03AM -0400, Matheus Castello wrote: > Bindings describe hardware, not drivers. > Use reference to hardware Allwinner A1X Pin Controller instead driver. > > Signed-off-by: Matheus Castello > --- > .../devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt |

[PATCH] dcdbas: Add support for WSMT ACPI table

2018-04-16 Thread Stuart Hayes
If the WSMT ACPI table is present and indicates that a fixed communication buffer should be used, use the firmware-specified buffer instead of allocating a buffer in memory for communications between the dcdbas driver and firmware. Signed-off-by: Stuart Hayes Reviewed-by: Mario Limonciello ---

Re: [PATCH] mm: allow to decrease swap.max below actual swap usage

2018-04-16 Thread Rik van Riel
On Sun, 2018-04-15 at 18:39 -0700, Tejun Heo wrote: > Hello, Roman. > > The reclaim behavior is a bit worrisome. > > * It disables an entire swap area while reclaim is in progress. Most > systems only have one swap area, so this would disable allocating > new swap area for everyone. That co

[PATCH] android: binder: Change return type to vm_fault_t

2018-04-16 Thread Souptick Joarder
Use new return type vm_fault_t for fault handler in struct vm_operations_struct. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Reference commit id-> 1c8f422059ae5da07db7

Re: [PATCH 0/3] Receive Side Coalescing for macb driver

2018-04-16 Thread David Miller
From: Rafal Ozieblo Date: Sat, 14 Apr 2018 21:53:07 +0100 > This patch series adds support for receive side coalescing > for Cadence GEM driver. Receive segmentation coalescing > is a mechanism to reduce CPU overhead. This is done by > coalescing received TCP message segments together into > a si

Re: [PATCH v3 2/2] slab: __GFP_ZERO is incompatible with a constructor

2018-04-16 Thread Christopher Lameter
On Thu, 12 Apr 2018, Matthew Wilcox wrote: > __GFP_ZERO requests that the object be initialised to all-zeroes, > while the purpose of a constructor is to initialise an object to a > particular pattern. We cannot do both. Add a warning to catch any > users who mistakenly pass a __GFP_ZERO flag wh

Re: Wrong module .text address in 4.16.0

2018-04-16 Thread Linus Torvalds
On Mon, Apr 16, 2018 at 6:43 AM, Jessica Yu wrote: > > So for users of /sys/module/*/sections, we will need to work around > this and possibly use %px for the real address. But perhaps we should > base the usage of %px on kptr_restrict? Maybe. I was hoping we would be able to get rid of it eventu

Re: [PATCH v3 2/6] mfd: stm32-timers: add support for dmas

2018-04-16 Thread Fabrice Gasnier
On 04/16/2018 04:47 PM, Lee Jones wrote: > On Mon, 16 Apr 2018, Fabrice Gasnier wrote: > >> On 04/16/2018 02:22 PM, Lee Jones wrote: >>> On Fri, 30 Mar 2018, Fabrice Gasnier wrote: >>> STM32 Timers can support up to 7 DMA requests: - 4 channels, update, compare and trigger. Optional

Re: [PATCH v2 6/6] fsl_pmc: update device bindings

2018-04-16 Thread Rob Herring
On Wed, Apr 11, 2018 at 02:35:51PM +0800, Ran Wang wrote: > From: Li Yang Needs a commit msg and the subject should give some indication of what the update is. And also start with "dt-bindings: ..." > > Signed-off-by: Li Yang > Signed-off-by: Zhao Chenhui > Signed-off-by: Ran Wang > --- > C

Re: [PATCH] x86/ldt: Fix support_pte_mask filtering in map_ldt_struct()

2018-04-16 Thread Andy Lutomirski
On Mon, Apr 16, 2018 at 2:43 AM, Joerg Roedel wrote: > From: Joerg Roedel > > The |= operator will let us end up with an invalid PTE. Use > the correct &= instead. D'oh! Looks good.

Re: [PATCH AUTOSEL for 4.14 015/161] printk: Add console owner and waiter logic to load balance console writes

2018-04-16 Thread Linus Torvalds
On Mon, Apr 16, 2018 at 6:30 AM, Steven Rostedt wrote: > > I wonder if the "AUTOSEL" patches should at least have an "ack-by" from > someone before they are pulled in. Otherwise there may be some subtle > issues that can find their way into stable releases. I don't know about anybody else, but I

[PATCH RFC] dma-direct: Try reallocation with GFP_DMA32 if possible

2018-04-16 Thread Takashi Iwai
As the recent swiotlb bug revealed, we seem to have given up the direct DMA allocation too early and felt back to swiotlb allocation. The reason is that swiotlb allocator expected that dma_direct_alloc() would try harder to get pages even below 64bit DMA mask with GFP_DMA32, but the function doesn'

Re: [PATCH] dt-bindings: gpio: Add support for r8a77965

2018-04-16 Thread Rob Herring
On Mon, Apr 16, 2018 at 03:55:04PM +0200, Jacopo Mondi wrote: > Add compatible string for R-Car M3-N (r8a77965) in gpio-rcar. > > Signed-off-by: Jacopo Mondi > Reviewed-by: Geert Uytterhoeven > --- You missed Simon's and my R-by's on v2. > > Renesas R-Car M3-N support has been merged for v4.1

Re: [PATCH] dt-bindings: net: ravb: Add support for r8a77965 SoC

2018-04-16 Thread Rob Herring
On Mon, Apr 16, 2018 at 03:55:17PM +0200, Jacopo Mondi wrote: > Add documentation for r8a77965 compatible string to renesas ravb device > tree bindings documentation. > > Signed-off-by: Jacopo Mondi > Reviewed-by: Geert Uytterhoeven > Reviewed-by: Simon Horman > Acked-by: Sergei Shtylyov > ---

Re: [PATCH] dt-bindings: serial: sh-sci: Add support for r8a77965 (H)SCIF

2018-04-16 Thread Rob Herring
On Mon, Apr 16, 2018 at 03:55:28PM +0200, Jacopo Mondi wrote: > Add documentation for r8a77965 compatible string to Renesas sci-serial > device tree bindings documentation. > > Signed-off-by: Jacopo Mondi > --- > > Renesas R-Car M3-N support has been merged for v4.17. > Document the missing devi

Re: [PATCH] dt-bindings: dmaengine: rcar-dmac: document R8A77965 support

2018-04-16 Thread Rob Herring
On Mon, Apr 16, 2018 at 03:56:08PM +0200, Jacopo Mondi wrote: > Add documentation for r8a77965 compatible string to rcar-dmac device > tree bindings documentation. > > Signed-off-by: Jacopo Mondi > Reviewed-by: Geert Uytterhoeven > Reviewed-by: Simon Horman > --- > > Renesas R-Car M3-N support

[PATCH 03/35] x86/entry/32: Load task stack from x86_tss.sp1 in SYSENTER handler

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel We want x86_tss.sp0 point to the entry stack later to use it as a trampoline stack for other kernel entry points besides SYSENTER. So store the task stack pointer in x86_tss.sp1, which is otherwise unused by the hardware, as Linux doesn't make use of Ring 1. Signed-off-by: Jo

[PATCH 08/35] x86/entry/32: Leave the kernel via trampoline stack

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Switch back to the trampoline stack before returning to userspace. Signed-off-by: Joerg Roedel --- arch/x86/entry/entry_32.S | 79 +-- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/arch/x86/entry/entry_32.S b/arch/

[PATCH 32/35] x86/ldt: Enable LDT user-mapping for PAE

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel This adds the needed special case for PAE to get the LDT mapped into the user page-table when PTI is enabled. The big difference to the other paging modes is that we don't have a full top-level PGD entry available for the LDT, but only PMD entry. Signed-off-by: Joerg Roedel -

[PATCH 33/35] x86/pti: Allow CONFIG_PAGE_TABLE_ISOLATION for x86_32

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Allow PTI to be compiled on x86_32. Signed-off-by: Joerg Roedel --- security/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/Kconfig b/security/Kconfig index c430206..afa91c6 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -57,7 +

[PATCH 35/35] x86/entry/32: Add debug code to check entry/exit cr3

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Add a config option that enabled code to check that we enter and leave the kernel with the correct cr3. This is needed because we have no NX protection of user-addresses in the kernel-cr3 on x86-32 and wouldn't notice that type of bug otherwise. Signed-off-by: Joerg Roedel --

[PATCH 11/35] x86/entry/32: Simplify debug entry point

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel The common exception entry code now handles the entry-from-sysenter stack situation and makes sure to leave with the same stack as it entered the kernel. So there is no need anymore for the special handling in the debug entry code. Signed-off-by: Joerg Roedel --- arch/x86/e

[PATCH 34/35] x86/mm/pti: Add Warning when booting on a PCID capable CPU

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Warn the user in case the performance can be significantly improved by switching to a 64-bit kernel. Suggested-by: Andy Lutomirski Signed-off-by: Joerg Roedel --- arch/x86/mm/pti.c | 16 1 file changed, 16 insertions(+) diff --git a/arch/x86/mm/pti.c b/arc

[PATCH 31/35] x86/ldt: Split out sanity check in map_ldt_struct()

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel This splits out the mapping sanity check and the actual mapping of the LDT to user-space from the map_ldt_struct() function in a way so that it is re-usable for PAE paging. Signed-off-by: Joerg Roedel --- arch/x86/kernel/ldt.c | 82 ---

Re: [PATCH v2] uio: Change return type to vm_fault_t

2018-04-16 Thread Greg KH
On Mon, Apr 16, 2018 at 08:24:40PM +0530, Souptick Joarder wrote: > Use new return type vm_fault_t for fault handler > in struct vm_operations_struct. For now, this is > just documenting that the function returns a > VM_FAULT value rather than an errno. Once all > instances are converted, vm_faul

[PATCH 29/35] x86/ldt: Reserve address-space range on 32 bit for the LDT

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Reserve 2MB/4MB of address-space for mapping the LDT to user-space on 32 bit PTI kernels. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/pgtable_32_types.h | 7 +-- arch/x86/mm/dump_pagetables.c | 9 + 2 files changed, 14 insertions(+), 2 deletion

[PATCH 27/35] x86/mm/dump_pagetables: Define INIT_PGD

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Define INIT_PGD to point to the correct initial page-table for 32 and 64 bit and use it where needed. This fixes the build on 32 bit with CONFIG_PAGE_TABLE_ISOLATION enabled. Signed-off-by: Joerg Roedel --- arch/x86/mm/dump_pagetables.c | 12 ++-- 1 file changed, 6 i

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Steven Rostedt
On Mon, 16 Apr 2018 14:31:49 + "Bean Huo (beanhuo)" wrote: > Print the request tag along with other information > while tracing a command. > > Signed-off-by: Bean Huo > --- I don't see any issue with the tracing part. Acked-by: Steven Rostedt (VMware) Others need to check the content.

[PATCH 09/35] x86/entry/32: Introduce SAVE_ALL_NMI and RESTORE_ALL_NMI

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel These macros will be used in the NMI handler code and replace plain SAVE_ALL and RESTORE_REGS there. We will add the NMI-specific CR3-switch to these macros later. Signed-off-by: Joerg Roedel --- arch/x86/entry/entry_32.S | 15 +++ 1 file changed, 11 insertions(+

[PATCH 30/35] x86/ldt: Define LDT_END_ADDR

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel It marks the end of the address-space range reserved for the LDT. The LDT-code will use it when unmapping the LDT for user-space. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/pgtable_32_types.h | 2 ++ arch/x86/include/asm/pgtable_64_types.h | 1 + arch/x86/kernel/ld

Re: [PATCH v4] dmaengine: pl330: flush before wait, and add dev burst support.

2018-04-16 Thread Vinod Koul
On Sun, Apr 15, 2018 at 02:12:30PM -0400, Frank Mori Hess wrote: > On Tue, Apr 10, 2018 at 11:37 AM, Vinod Koul wrote: > >> > >> Hi, what is the state of this patch? I just noticed in patchwork it > >> is now listed as "Not applicable"? The original broken-by-wordwrap > >> patch is listed as "Ac

[PATCH 28/35] x86/pgtable/pae: Use separate kernel PMDs for user page-table

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel We need separate kernel PMDs in the user page-table when PTI is enabled to map the per-process LDT for user-space. Signed-off-by: Joerg Roedel --- arch/x86/mm/pgtable.c | 100 -- 1 file changed, 81 insertions(+), 19 deletions(-

[PATCH 24/35] x86/mm/pti: Add an overflow check to pti_clone_pmds()

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel The addr counter will overflow if we clone the last PMD of the address space, resulting in an endless loop. Check for that and bail out of the loop when it happens. Signed-off-by: Joerg Roedel --- arch/x86/mm/pti.c | 4 1 file changed, 4 insertions(+) diff --git a/arc

Re: [RESEND PATCH v1 2/2] trace: events: block: Add tag in block trace events

2018-04-16 Thread Steven Rostedt
On Mon, 16 Apr 2018 14:33:29 + "Bean Huo (beanhuo)" wrote: > Print the request tag along with other information in block trace events > when tracing request , and unplug type (Sync / Async). > > Signed-off-by: Bean Huo I don't see any issue with the tracing part. Acked-by: Steven Rostedt

[PATCH 23/35] x86/mm/legacy: Populate the user page-table with user pgd's

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Also populate the user-spage pgd's in the user page-table. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/pgtable-2level.h | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h index

[PATCH 26/35] x86/mm/pti: Clone CPU_ENTRY_AREA on PMD level on x86_32

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Cloning on the P4D level would clone the complete kernel address space into the user-space page-tables for PAE kernels. Cloning on PMD level is fine for PAE and legacy paging. Signed-off-by: Joerg Roedel --- arch/x86/mm/pti.c | 20 1 file changed, 20 ins

[PATCH 12/35] x86/32: Use tss.sp1 as cpu_current_top_of_stack

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Now that we store the task-stack in tss.sp1 we can also use it as cpu_current_top_of_stack. This unifies the handling with x86-64. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/processor.h | 4 arch/x86/include/asm/thread_info.h | 2 -- arch/x86/kernel/cpu/comm

Re: [PATCH AUTOSEL for 4.14 015/161] printk: Add console owner and waiter logic to load balance console writes

2018-04-16 Thread Pavel Machek
On Mon 2018-04-16 08:18:09, Linus Torvalds wrote: > On Mon, Apr 16, 2018 at 6:30 AM, Steven Rostedt wrote: > > > > I wonder if the "AUTOSEL" patches should at least have an "ack-by" from > > someone before they are pulled in. Otherwise there may be some subtle > > issues that can find their way in

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-16 Thread Vinod Koul
On Mon, Apr 16, 2018 at 02:32:05PM +0800, Baolin Wang wrote: > >> Beside the general configuration, our audio driver will configure the > >> fragment length, block length, maybe transaction length, and they must > >> specify the request type and interrupt type, these are what we want to > >> expor

[PATCH 21/35] x86/mm/pae: Populate valid user PGD entries

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Generic page-table code populates all non-leaf entries with _KERNPG_TABLE bits set. This is fine for all paging modes except PAE. In PAE mode only a subset of the bits is allowed to be set. Make sure we only set allowed bits by masking out the reserved bits. Signed-off-by: Jo

[PATCH 25/35] x86/mm/pti: Define X86_CR3_PTI_PCID_USER_BIT on x86_32

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Move it out of the X86_64 specific processor defines so that its visible for 32bit too. Reviewed-by: Andy Lutomirski Signed-off-by: Joerg Roedel --- arch/x86/include/asm/processor-flags.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/i

Re: [Regression] PCI / PM: Simplify device wakeup settings code

2018-04-16 Thread Joseph Salisbury
On 04/13/2018 05:34 PM, Rafael J. Wysocki wrote: > On Fri, Apr 13, 2018 at 7:56 PM, Joseph Salisbury > wrote: >> Hi Rafael, >> >> A kernel bug report was opened against Ubuntu [0]. After a kernel >> bisect, it was found that reverting the following two commits resolved >> this bug: >> >> 0ce3fcaf

[PATCH 17/35] x86/pgtable/32: Allocate 8k page-tables when PTI is enabled

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Allocate a kernel and a user page-table root when PTI is enabled. Also allocate a full page per root for PAE because otherwise the bit to flip in cr3 to switch between them would be non-constant, which creates a lot of hassle. Keep that for a later optimization. Signed-off-by:

[PATCH 22/35] x86/mm/pae: Populate the user page-table with user pgd's

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel When we populate a PGD entry, make sure we populate it in the user page-table too. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/pgtable-3level.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/p

Re: [PATCHv2] dmaengine: dmatest: Remove use of VLAs

2018-04-16 Thread Vinod Koul
On Tue, Apr 10, 2018 at 06:02:16PM -0700, Laura Abbott wrote: > There's an ongoing effort to remove VLAs from the kernel > (https://lkml.org/lkml/2018/3/7/621) to eventually turn on -Wvla. > The test already pre-allocates some buffers with kmalloc so turn > the two VLAs in to pre-allocated kmalloc

[PATCH 20/35] x86/pgtable: Move two more functions from pgtable_64.h to pgtable.h

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel These two functions are required for PTI on 32 bit: * pgdp_maps_userspace() * pgd_large() Also re-implement pgdp_maps_userspace() so that it will work on 64 and 32 bit kernels. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/pgtable-2level_types.h | 3

Re: [PATCH 00/35 v5] PTI support for x32

2018-04-16 Thread Linus Torvalds
On Mon, Apr 16, 2018 at 8:24 AM, Joerg Roedel wrote: > > I tested this version again with my load-test of running > perf-top/various x86-selftests/kernel-compile in a loop for > a couple of hours. This showed no issues. I also briefly > tested a 64bit kernel and this also worked as expected. Andy

[PATCH 14/35] x86/entry/32: Add PTI cr3 switches to NMI handler code

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel The NMI handler is special, as it needs to leave with the same cr3 as it was entered with. We need to do this because we could enter the NMI handler from kernel code with user-cr3 already loaded. Signed-off-by: Joerg Roedel --- arch/x86/entry/entry_32.S | 41

[PATCH 19/35] x86/pgtable: Move pti_set_user_pgtbl() to pgtable.h

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel There it is also usable from 32 bit code. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/pgtable.h| 23 +++ arch/x86/include/asm/pgtable_64.h | 21 - 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/arch/x86/i

[PATCH 16/35] x86/pgtable/pae: Unshare kernel PMDs when PTI is enabled

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel With PTI we need to map the per-process LDT into the kernel address-space for each process, so we need separate kernel PMDs per PGD. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/pgtable-3level_types.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff -

[PATCH 13/35] x86/entry/32: Add PTI cr3 switch to non-NMI entry/exit points

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Add unconditional cr3 switches between user and kernel cr3 to all non-NMI entry and exit points. Signed-off-by: Joerg Roedel --- arch/x86/entry/entry_32.S | 83 --- 1 file changed, 79 insertions(+), 4 deletions(-) diff --git a/arc

[PATCH 18/35] x86/pgtable: Move pgdp kernel/user conversion functions to pgtable.h

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Make them available on 32 bit and clone_pgd_range() happy. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/pgtable.h| 49 +++ arch/x86/include/asm/pgtable_64.h | 49 --- 2 files changed, 49 inse

[PATCH net-next] net: introduce a new tracepoint for tcp_rcv_space_adjust

2018-04-16 Thread Yafang Shao
tcp_rcv_space_adjust is called every time data is copied to user space, introducing a tcp tracepoint for which could show us when the packet is copied to user. This could help us figure out whether there's latency in user process. When a tcp packet arrives, tcp_rcv_established() will be called and

[PATCH 10/35] x86/entry/32: Handle Entry from Kernel-Mode on Entry-Stack

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel It can happen that we enter the kernel from kernel-mode and on the entry-stack. The most common way this happens is when we get an exception while loading the user-space segment registers on the kernel-to-userspace exit path. The segment loading needs to be done after the entr

Re: [lustre-devel] [PATCH 1/6] staging: lustre: move stack-check macros to libcfs_debug.h

2018-04-16 Thread Patrick Farrell
James, If I understand correctly, you're saying you want to be able to build without debug support...? I'm not convinced that building a client without debug support is interesting or useful. In fact, I think it would be harmful, and we shouldn't open up the possibility - this is switchable d

[PATCH 15/35] x86/pgtable: Rename pti_set_user_pgd to pti_set_user_pgtbl

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel With the way page-table folding is implemented on 32 bit, we are not only setting PGDs with this functions, but also PUDs and even PMDs. Give the function a more generic name to reflect that. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/pgtable_64.h | 12 ++--

[PATCH 07/35] x86/entry/32: Enter the kernel via trampoline stack

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Use the entry-stack as a trampoline to enter the kernel. The entry-stack is already in the cpu_entry_area and will be mapped to userspace when PTI is enabled. Signed-off-by: Joerg Roedel --- arch/x86/entry/entry_32.S| 136 +++ arch

[PATCH 06/35] x86/entry/32: Split off return-to-kernel path

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel Use a separate return path when we know we are returning to the kernel. This allows us to put the PTI cr3-switch and the switch to the entry-stack into the return-to-user path without further checking. Signed-off-by: Joerg Roedel --- arch/x86/entry/entry_32.S | 11 --

[PATCH 04/35] x86/entry/32: Put ESPFIX code into a macro

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel This makes it easier to split up the shared iret code path. Signed-off-by: Joerg Roedel --- arch/x86/entry/entry_32.S | 97 --- 1 file changed, 49 insertions(+), 48 deletions(-) diff --git a/arch/x86/entry/entry_32.S b/arch/x86/en

[PATCH 05/35] x86/entry/32: Unshare NMI return path

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel NMI will no longer use most of the shared return path, because NMI needs special handling when the CR3 switches for PTI are added. This patch prepares for that. Signed-off-by: Joerg Roedel --- arch/x86/entry/entry_32.S | 8 ++-- 1 file changed, 6 insertions(+), 2 deletio

[PATCH 02/35] x86/entry/32: Rename TSS_sysenter_sp0 to TSS_entry_stack

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel The stack address doesn't need to be stored in tss.sp0 if we switch manually like on sysenter. Rename the offset so that it still makes sense when we change its location. We will also use this stack for all kernel-entry points, not just sysenter. Reflect that in the name as we

[PATCH 01/35] x86/asm-offsets: Move TSS_sp0 and TSS_sp1 to asm-offsets.c

2018-04-16 Thread Joerg Roedel
From: Joerg Roedel These offsets will be used in 32 bit assembly code as well, so make them available for all of x86 code. Signed-off-by: Joerg Roedel --- arch/x86/kernel/asm-offsets.c| 4 arch/x86/kernel/asm-offsets_64.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff

[PATCH 00/35 v5] PTI support for x32

2018-04-16 Thread Joerg Roedel
Hi, here is the 5th iteration of my PTI enablement patches for x86-32. There are no real changes between v4 and v5 besides that I rebased the whole patch-set to v4.17-rc1 and resolved the numerous conflicts that this caused. Two separate fixes came up since the last post and I sent them out separ

<    1   2   3   4   5   6   7   8   9   10   >