[PATCH v6 7/7] KVM: x86: Allow Qemu/KVM to use PVH entry point

2018-04-04 Thread Maran Wilson
For certain applications it is desirable to rapidly boot a KVM virtual machine. In cases where legacy hardware and software support within the guest is not needed, Qemu should be able to boot directly into the uncompressed Linux kernel binary without the need to run firmware. There already exists

[PATCH v6 6/7] xen/pvh: Add memory map pointer to hvm_start_info struct

2018-04-04 Thread Maran Wilson
The start info structure that is defined as part of the x86/HVM direct boot ABI and used for starting Xen PVH guests would be more versatile if it also included a way to pass information about the memory map to the guest. This would allow KVM guests to share the same entry point. Signed-off-by: Ma

[PATCH v6 3/7] xen/pvh: Create a new file for Xen specific PVH code

2018-04-04 Thread Maran Wilson
We need to refactor PVH entry code so that support for other hypervisors like Qemu/KVM can be added more easily. The first step in that direction is to create a new file that will eventually hold the Xen specific routines. Signed-off-by: Maran Wilson --- arch/x86/platform/pvh/enlighten.c | 5 +

[PATCH v6 4/7] xen/pvh: Move Xen specific PVH VM initialization out of common file

2018-04-04 Thread Maran Wilson
We need to refactor PVH entry code so that support for other hypervisors like Qemu/KVM can be added more easily. This patch moves the small block of code used for initializing Xen PVH virtual machines into the Xen specific file. This initialization is not going to be needed for Qemu/KVM guests. Mo

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-04 Thread Kees Cook
On Wed, Apr 4, 2018 at 12:07 PM, Oleksandr Natalenko wrote: > [ 261.262135] Bad or missing usercopy whitelist? Kernel memory exposure > attempt detected from SLUB object 'scsi_sense_cache' (offset 94, size 22)! > I can easily reproduce it with a qemu VM and 2 virtual SCSI disks by calling > smart

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread Arnd Bergmann
On Wed, Apr 4, 2018 at 9:17 PM, Matthias Kaehlcke wrote: > El Wed, Apr 04, 2018 at 11:30:07AM +0200 Peter Zijlstra ha dit: > >> On Tue, Apr 03, 2018 at 11:06:58AM -0700, Matthias Kaehlcke wrote: >> >> > Yes, Chrome OS R67 (currently dev, soon beta) will ship a kernel built >> > with Clang for mult

[PATCH v6 5/7] xen/pvh: Move Xen code for getting mem map via hcall out of common file

2018-04-04 Thread Maran Wilson
We need to refactor PVH entry code so that support for other hypervisors like Qemu/KVM can be added more easily. The original design for PVH entry in Xen guests relies on being able to obtain the memory map from the hypervisor using a hypercall. When we extend the PVH entry ABI to support other hy

[PATCH v6 2/7] xen/pvh: Move PVH entry code out of Xen specific tree

2018-04-04 Thread Maran Wilson
Once hypervisors other than Xen start using the PVH entry point for starting VMs, we would like the option of being able to compile PVH entry capable kernels without enabling CONFIG_XEN and all the code that comes along with that. To allow that, we are moving the PVH code out of Xen and into files

[PATCH v6 1/7] xen/pvh: Split CONFIG_XEN_PVH into CONFIG_PVH and CONFIG_XEN_PVH

2018-04-04 Thread Maran Wilson
In order to pave the way for hypervisors other than Xen to use the PVH entry point for VMs, we need to factor the PVH entry code into Xen specific and hypervisor agnostic components. The first step in doing that, is to create a new config option for PVH entry that can be enabled independently from

Re: [PATCH net] netns: filter uevents correctly

2018-04-04 Thread Christian Brauner
On Wed, Apr 04, 2018 at 09:48:57PM +0200, Christian Brauner wrote: > commit 07e98962fa77 ("kobject: Send hotplug events in all network namespaces") > > enabled sending hotplug events into all network namespaces back in 2010. > Over time the set of uevents that get sent into all network namespaces

Re: [PATCH v3] dell_rbu: make firmware payload memory uncachable

2018-04-04 Thread Takashi Iwai
On Wed, 28 Mar 2018 17:07:47 +0200, Stuart Hayes wrote: > > @@ -180,6 +181,12 @@ static int create_packet(void *data, size_t length) > invalid_addr_packet_array[idx++] = packet_data_temp_buf; > packet_data_temp_buf = NULL; > } > +

[PATCH 1/1] drm/i915: Keep AUX block running when disabling DPMS for MST

2018-04-04 Thread Lyude Paul
While enabling/disabling DPMS before link training with MST hubs is perfectly valid; unfortunately disabling DPMS results in some devices disabling their AUX CH block as well. For SST this isn't as much of a problem, but for MST we need to be able to continue handling aux transactions even when non

[PATCH 0/1] Keep AUX on while disabling DPMS for MST

2018-04-04 Thread Lyude Paul
Resend that was required anyway since I missed some t-b's and some acks. Trying to figure out what patchwork is doing that's making this patch not get noticed. Maybe it's the lack of cover letters on the previous versions of this Lyude Paul (1): drm/i915: Keep AUX block running when disablin

[PATCH v6 0/7] KVM: x86: Allow Qemu/KVM to use PVH entry point

2018-04-04 Thread Maran Wilson
For certain applications it is desirable to rapidly boot a KVM virtual machine. In cases where legacy hardware and software support within the guest is not needed, Qemu should be able to boot directly into the uncompressed Linux kernel binary without the need to run firmware. There already exists

Re: [PATCH 2/2] efi: Add embedded peripheral firmware support

2018-04-04 Thread Hans de Goede
HI, On 04-04-18 19:18, Peter Jones wrote: On Tue, Apr 03, 2018 at 06:58:48PM +, Luis R. Rodriguez wrote: On Tue, Apr 03, 2018 at 08:07:11PM +0200, Lukas Wunner wrote: On Tue, Apr 03, 2018 at 10:33:25AM +0200, Hans de Goede wrote: I asked Peter Jones for suggestions how to extract this dur

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-04 Thread Kees Cook
On Wed, Apr 4, 2018 at 12:07 PM, Oleksandr Natalenko wrote: > With v4.16 I get the following dump while using smartctl: > [...] > [ 261.262135] Bad or missing usercopy whitelist? Kernel memory exposure > attempt detected from SLUB object 'scsi_sense_cache' (offset 94, size 22)! > [...] > [ 261.3

Re: [PATCH v2 01/19] powerpc/powermac: Mark variable x as unused

2018-04-04 Thread Mathieu Malaterre
On Thu, Mar 29, 2018 at 6:07 PM, LEROY Christophe wrote: > Mathieu Malaterre a écrit : > > >> Since the value of x is never intended to be read, declare it with gcc >> attribute as unused. Fix warning treated as error with W=1: >> >> arch/powerpc/platforms/powermac/bootx_init.c:471:21: error: v

FORTIFY_SOURCE breaks ARM compilation in -next -- was Re: ARM compile failure in Re: linux-next: Tree for Apr 4

2018-04-04 Thread Pavel Machek
; > > > always_inline 'memcmp': function not inlinable > > > > ... > > > > pavel@duo:/data/l/linux-next-n900$ git branch -l > > > > * (detached from next-20180403) > > > > > > > > I'm using > > >

Re: [PATCH 15/19] powerpc: Add missing prototype

2018-04-04 Thread Mathieu Malaterre
On Thu, Mar 29, 2018 at 6:02 PM, LEROY Christophe wrote: > Mathieu Malaterre a écrit : > > >> On Fri, Mar 23, 2018 at 1:20 PM, christophe leroy >> wrote: >>> >>> >>> >>> Le 22/03/2018 à 21:20, Mathieu Malaterre a écrit : Add one missing prototype for function rh_dump_blk. Fix warn

Re: [GIT PULL] Kernel lockdown for secure boot

2018-04-04 Thread Matthew Garrett
On Wed, Apr 4, 2018 at 1:01 PM Thomas Gleixner wrote: > Now where the disagreement lies is the way how the uid/ring0 aspect is tied > to secure boot, which makes it impossible to be useful independent of > Secure Boot. It doesn't - you can pass a command line parameter that enables it, or your bo

[PATCH v2][RESEND] drm/i915: Keep AUX block running when disabling DPMS for MST

2018-04-04 Thread Lyude Paul
While enabling/disabling DPMS before link training with MST hubs is perfectly valid; unfortunately disabling DPMS results in some devices disabling their AUX CH block as well. For SST this isn't as much of a problem, but for MST we need to be able to continue handling aux transactions even when non

[PATCH v3 09/19] powerpc/chrp/pci: Make some functions static

2018-04-04 Thread Mathieu Malaterre
These functions can all be static, make it so. Fix warnings treated as errors with W=1: arch/powerpc/platforms/chrp/pci.c:34:5: error: no previous prototype for ‘gg2_read_config’ [-Werror=missing-prototypes] arch/powerpc/platforms/chrp/pci.c:61:5: error: no previous prototype for ‘gg2_write_

[PATCH v3 11/19] powerpc/powermac: Move pmac_pfunc_base_install prototype to header file

2018-04-04 Thread Mathieu Malaterre
The pmac_pfunc_base_install prototype was declared in powermac/smp.c since function was used there, move it to pmac_pfunc.h header to be visible in pfunc_base.c. Fix a warning treated as error with W=1: arch/powerpc/platforms/powermac/pfunc_base.c:330:12: error: no previous prototype for ‘pmac_

[PATCH v3 13/19] powerpc/52xx: Add missing functions prototypes

2018-04-04 Thread Mathieu Malaterre
The function prototypes were declared within a `#ifdef CONFIG_PPC_LITE5200` block which would prevent them from being visible when compiling `mpc52xx_pm.c`. Move the prototypes outside of the `#ifdef` block to fix the following warnings treated as errors with W=1: arch/powerpc/platforms/52xx/mpc

[PATCH v3 12/19] powerpc/powermac: Add missing prototype for note_bootable_part()

2018-04-04 Thread Mathieu Malaterre
Add a missing prototype for function `note_bootable_part` to silence a warning treated as error with W=1: arch/powerpc/platforms/powermac/setup.c:361:12: error: no previous prototype for ‘note_bootable_part’ [-Werror=missing-prototypes] Suggested-by: Christophe Leroy Signed-off-by: Mathieu Ma

[PATCH v3 15/19] powerpc: Add missing prototype

2018-04-04 Thread Mathieu Malaterre
Add one missing prototype for function rh_dump_blk. Fix warning treated as error in W=1: arch/powerpc/lib/rheap.c:740:6: error: no previous prototype for ‘rh_dump_blk’ [-Werror=missing-prototypes] Suggested-by: Christophe Leroy Signed-off-by: Mathieu Malaterre --- v3: remove extern keyword v

Re: [PATCH v2] drm/i915: Keep AUX block running when disabling DPMS for MST

2018-04-04 Thread Lyude Paul
On Wed, 2018-04-04 at 22:35 +0300, Ville Syrjälä wrote: > On Wed, Apr 04, 2018 at 03:00:12PM -0400, Lyude Paul wrote: > > On Wed, 2018-04-04 at 21:53 +0300, Ville Syrjälä wrote: > > > On Wed, Apr 04, 2018 at 02:37:41PM -0400, Lyude Paul wrote: > > > > On Wed, 2018-04-04 at 18:34 +0300, Ville Syrjäl

[PATCH v3 19/19] powerpc/tau: Synchronize function prototypes and body

2018-04-04 Thread Mathieu Malaterre
Some function prototypes and body for Thermal Assist Units were not in sync. Update the function definition to match the existing function declaration found in `setup-common.c`, changing an `int` return type to a `u32` return type. Move the prototypes to a header file. Fix the following warnings, t

[PATCH v3 05/19] powerpc/chrp/setup: Remove idu_size variable and make some functions static

2018-04-04 Thread Mathieu Malaterre
Remove variable declaration idu_size and associated code since not used. These functions can all be static, make it so. Fix warnings treated as errors with W=1: arch/powerpc/platforms/chrp/setup.c:97:6: error: no previous prototype for ‘chrp_show_cpuinfo’ [-Werror=missing-prototypes] arch/po

Re: [PATCH] usb: select USB_COMMON for usb role switch config

2018-04-04 Thread Hans de Goede
Hi, On 04-04-18 14:21, Arnd Bergmann wrote: The new axp288 extcon driver has no dependency on USB itself but calls the usb role switch helper functions. This causes a link error when USB_COMMON is disabled, as that subdirectory never gets entered: drivers/extcon/extcon-axp288.o: In function `ax

[PATCH v3 03/19] powerpc: Move `path` variable inside DEBUG_PROM

2018-04-04 Thread Mathieu Malaterre
Add gcc attribute unused for two variables. Fix warnings treated as errors with W=1: arch/powerpc/kernel/prom_init.c:1388:8: error: variable ‘path’ set but not used [-Werror=unused-but-set-variable] Suggested-by: Christophe Leroy Signed-off-by: Mathieu Malaterre --- v3: really move path with

[PATCH v3 01/19] powerpc/powermac: Mark variable x as unused

2018-04-04 Thread Mathieu Malaterre
Since the value of x is never intended to be read, declare it with gcc attribute as unused. Fix warning treated as error with W=1: arch/powerpc/platforms/powermac/bootx_init.c:471:21: error: variable ‘x’ set but not used [-Werror=unused-but-set-variable] Suggested-by: Christophe Leroy Signed-

Re: [PATCH v4 04/24] fpga: add device feature list support

2018-04-04 Thread Alan Tull
On Mon, Apr 2, 2018 at 8:36 PM, Wu Hao wrote: > On Mon, Apr 02, 2018 at 02:06:56PM -0500, Alan Tull wrote: >> On Sun, Apr 1, 2018 at 11:22 PM, Wu Hao wrote: >> > On Thu, Mar 29, 2018 at 04:57:22PM -0500, Alan Tull wrote: >> >> On Mon, Mar 26, 2018 at 9:35 PM, Wu Hao wrote: >> >> >> >> Hi Hao, >>

Re: [PATCH] prctl: Deprecate non PR_SET_MM_MAP operations

2018-04-04 Thread Cyrill Gorcunov
On Wed, Apr 04, 2018 at 12:24:33PM -0700, Randy Dunlap wrote: > > > + pr_warn_once("Non PR_SET_MM_MAP operations are deprecated\n"); > > + return -EINVAL; > > } > > I'm not against removing such functionality, but I think that it's more than > "deprecated." It's gone. At first this was pla

Re: [GIT PULL] Kernel lockdown for secure boot

2018-04-04 Thread Thomas Gleixner
On Wed, 4 Apr 2018, Peter Jones wrote: > That is to say, as a result of the way malware has been written, our way > of thinking about it is often that it's a way to build a boot loader for > a malicious kernel, so that's how we wind up talking about it. Are we > concerned with malware stealing you

Re: ARM compile failure in Re: linux-next: Tree for Apr 4

2018-04-04 Thread Tony Lindgren
ta/l/linux-next-n900$ git branch -l > > > * (detached from next-20180403) > > > > > > I'm using > > > > > > eval ` eldk-switch.sh -r 5.4 armv7a` > > > > > > for cross-compilation. > > > > Hmm I'm not seeing buil

Re: [PATCH 00/15] ARM: pxa: switch to DMA slave maps

2018-04-04 Thread Boris Brezillon
On Wed, 04 Apr 2018 21:49:26 +0200 Robert Jarzmik wrote: > Ulf Hansson writes: > > > On 2 April 2018 at 16:26, Robert Jarzmik wrote: > >> Hi, > >> > >> This serie is aimed at removing the dmaengine slave compat use, and > >> transfer > >> knowledge of the DMA requestors into architecture co

Re: [patch 6/8] mtd: diskonchip: Allocate rs control per instance

2018-04-04 Thread Boris Brezillon
On Wed, 28 Mar 2018 22:51:44 +0200 Thomas Gleixner wrote: > The reed solomon library is moving the on stack decoder buffers into the rs > control structure. That would break the DoC driver because multiple > instances share the same control structure and can operate in parallel. At > least in the

Re: [PATCH v2 2/2] io: prevent compiler reordering on the default readX() implementation

2018-04-04 Thread Arnd Bergmann
On Wed, Apr 4, 2018 at 7:48 PM, Sinan Kaya wrote: > On 4/4/2018 11:55 AM, Arnd Bergmann wrote: >> Yes, exactly, plus the same for write and in/out of course. > > I was looking at this... > > inb() and outb() seem to be calling writeb(). It gets the wmb/barrier > automatically > when we fix writeb

Re: [PATCH v3 0/4] Ktest: add email support

2018-04-04 Thread Steven Rostedt
On Tue, 3 Apr 2018 18:38:19 -0400 Steven Rostedt wrote: > On Tue, 3 Apr 2018 12:52:20 -0700 > Tim Tianyang Chen wrote: > > > Hi Steve, did you get a chance to take a look? cc'ing myself and a > > personal email. When I sent the patchset I forgot to include. > > Sorry, I'm trying to get my o

Re: [RFC PATCH 3/4] acpi: apei: Do not panic() in NMI because of GHES messages

2018-04-04 Thread Alex G.
On 04/04/2018 11:53 AM, James Morse wrote: > Hi Alex, (snip) >>> How do we know we will survive this trip? >> >> We don't. > > Isn't that even worse than panic()ing? (No output, followed by a watchdog > reboot > if we're lucky) On the contrary. No output, followed by a watchdog reboot is usual

[PATCH net-next] netns: filter uevents correctly

2018-04-04 Thread Christian Brauner
commit 07e98962fa77 ("kobject: Send hotplug events in all network namespaces") enabled sending hotplug events into all network namespaces back in 2010. Over time the set of uevents that get sent into all network namespaces has shrunk. We have now reached the point where hotplug events for all devi

Re: [PATCH 00/15] ARM: pxa: switch to DMA slave maps

2018-04-04 Thread Robert Jarzmik
Ulf Hansson writes: > On 2 April 2018 at 16:26, Robert Jarzmik wrote: >> Hi, >> >> This serie is aimed at removing the dmaengine slave compat use, and transfer >> knowledge of the DMA requestors into architecture code. >> As this looks like a patch bomb, each maintainer expressing for his tree

Re: [PATCH v2] drm/i915: Keep AUX block running when disabling DPMS for MST

2018-04-04 Thread Lyude Paul
On Wed, 2018-04-04 at 22:31 +0300, Ville Syrjälä wrote: > On Wed, Apr 04, 2018 at 02:59:09PM -0400, Lyude Paul wrote: > > On Wed, 2018-04-04 at 21:53 +0300, Ville Syrjälä wrote: > > > On Wed, Apr 04, 2018 at 02:37:41PM -0400, Lyude Paul wrote: > > > > On Wed, 2018-04-04 at 18:34 +0300, Ville Syrjäl

Re: [RESEND PATCH] ARM: pxa: stargate2: use device properties for at24 eeprom

2018-04-04 Thread Robert Jarzmik
Bartosz Golaszewski writes: > We want to work towards phasing out the at24_platform_data structure. > There are few users and its contents can be represented using generic > device properties. Using device properties only will allow us to > significantly simplify the at24 configuration code. > >

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread Linus Torvalds
On Wed, Apr 4, 2018 at 12:26 PM, James Y Knight wrote: > > (OTOH, I _do_ expect clang to eventually gain support for a flag to treat > NULL-pointer deref as a legal operation instead of UB. I'm not really sure > it makes sense for the linux kernel, but it's a useful feature for the > compiler to p

Re: [patch 5/8] rslib: Split rs control struct

2018-04-04 Thread Boris Brezillon
Hi Thomas, On Wed, 28 Mar 2018 22:51:43 +0200 Thomas Gleixner wrote: > The decoder library uses variable length arrays on stack. To get rid of > them it's it would be simple to allocate fixed length arrays on stack, but ^ s/it's// > those might become rather large. The other solution is

Re: [PATCH V3 4/4] genirq/affinity: irq vector spread among online CPUs as far as possible

2018-04-04 Thread Thomas Gleixner
On Wed, 4 Apr 2018, Ming Lei wrote: > On Wed, Apr 04, 2018 at 10:25:16AM +0200, Thomas Gleixner wrote: > > In the example above: > > > > > > > irq 39, cpu list 0,4 > > > > > irq 40, cpu list 1,6 > > > > > irq 41, cpu list 2,5 > > > > > irq 42, cpu list 3,7 > > > > and assu

Re: [PATCH v2] drm/i915: Keep AUX block running when disabling DPMS for MST

2018-04-04 Thread Ville Syrjälä
On Wed, Apr 04, 2018 at 03:00:12PM -0400, Lyude Paul wrote: > On Wed, 2018-04-04 at 21:53 +0300, Ville Syrjälä wrote: > > On Wed, Apr 04, 2018 at 02:37:41PM -0400, Lyude Paul wrote: > > > On Wed, 2018-04-04 at 18:34 +0300, Ville Syrjälä wrote: > > > > On Mon, Apr 02, 2018 at 05:26:16PM -0400, Lyude

Re: WARNING in up_write

2018-04-04 Thread Matthew Wilcox
On Wed, Apr 04, 2018 at 09:24:05PM +0200, Dmitry Vyukov wrote: > On Tue, Apr 3, 2018 at 4:01 AM, syzbot > wrote: > > DEBUG_LOCKS_WARN_ON(sem->owner != get_current()) > > WARNING: CPU: 1 PID: 4441 at kernel/locking/rwsem.c:133 up_write+0x1cc/0x210 > > kernel/locking/rwsem.c:133 > > Kernel panic - n

[PATCH] x86: Use boot_cpu_has() instead of this_cpu_has() in build_cr3_noflush()

2018-04-04 Thread Sai Praneeth Prakhya
From: Sai Praneeth When the platform supports PCID and if CONFIG_DEBUG_VM is enabled, build_cr3_noflush() (called via switch_mm()) does a sanity check to see if X86_FEATURE_PCID is set. Presently, build_cr3_noflush() uses "this_cpu_has(X86_FEATURE_PCID)" to perform the check but this_cpu_has() wo

[RFC PATCH 06/79] mm/page: add helpers to dereference struct page index field

2018-04-04 Thread jglisse
From: Jérôme Glisse Regroup all helpers that dereference struct page.index field into one place and require a the address_space (mapping) against which caller is looking the index (offset, pgoff, ...) Signed-off-by: Jérôme Glisse Cc: linux...@kvack.org CC: Andrew Morton Cc: Alexander Viro Cc:

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread Josh Poimboeuf
On Wed, Apr 04, 2018 at 04:53:52PM +, Nick Desaulniers wrote: > (re-sending as plain text) > > On Wed, Apr 4, 2018 at 2:38 AM Greg KH wrote: > > There are known-bugs with building a kernel with clang right now (I > > pointed one out a few days ago about NULL checks being deleted from the > >

Re: [PATCH v2] drm/i915: Keep AUX block running when disabling DPMS for MST

2018-04-04 Thread Ville Syrjälä
On Wed, Apr 04, 2018 at 02:59:09PM -0400, Lyude Paul wrote: > On Wed, 2018-04-04 at 21:53 +0300, Ville Syrjälä wrote: > > On Wed, Apr 04, 2018 at 02:37:41PM -0400, Lyude Paul wrote: > > > On Wed, 2018-04-04 at 18:34 +0300, Ville Syrjälä wrote: > > > > On Mon, Apr 02, 2018 at 05:26:16PM -0400, Lyude

[RFC PATCH 00/79] Generic page write protection and a solution to page waitqueue

2018-04-04 Thread jglisse
From: Jérôme Glisse https://cgit.freedesktop.org/~glisse/linux/log/?h=generic-write-protection-rfc This is an RFC for LSF/MM discussions. It impacts the file subsystem, the block subsystem and the mm subsystem. Hence it would benefit from a cross sub-system discussion. Patchset is not fully bak

Re: [PATCH v2] tracing, printk: Force no hashing when trace_printk() is used

2018-04-04 Thread Steven Rostedt
On Wed, 4 Apr 2018 12:04:42 -0700 Linus Torvalds wrote: > > So at the *very* least this would need to be percpu logic, but even > that is honestly broken since an NMI might come in and want to printk > too. > > Why don't you just use %px? That avoids all of these hacks. Just need to remember

[RFC PATCH 04/79] pipe: add inode field to struct pipe_inode_info

2018-04-04 Thread jglisse
From: Jérôme Glisse Pipes are associated with a file and thus an inode, store a pointer back to the inode in struct pipe_inode_info, this will be use when testing pages haven't been truncated. Signed-off-by: Jérôme Glisse Cc: Eric Biggers Cc: Kees Cook Cc: Joe Lawrence Cc: Willy Tarreau Cc:

[RFC PATCH 07/79] mm/page: add helpers to find mapping give a page and buffer head

2018-04-04 Thread jglisse
From: Jérôme Glisse For now this simply use exist page_mapping() inline. Latter it will use buffer head pointer as a key to lookup mapping for write protected page. Signed-off-by: Jérôme Glisse Cc: linux...@kvack.org CC: Andrew Morton Cc: Alexander Viro Cc: linux-fsde...@vger.kernel.org Cc: T

[RFC PATCH 09/79] fs: add struct address_space to read_cache_page() callback argument

2018-04-04 Thread jglisse
From: Jérôme Glisse Add struct address_space to callback arguments of read_cache_page() and read_cache_pages(). Note this patch only add arguments and modify callback function signature, it does not make use of the new argument and thus it should be regression free. One step toward dropping reli

[RFC PATCH 08/79] mm/page: add helpers to find page mapping and private given a bio

2018-04-04 Thread jglisse
From: Jérôme Glisse When page undergo io it is associated with a unique bio and thus we can use it to lookup other page fields which are relevant only for the bio under consideration. Note this only apply when page is special ie page->mapping is pointing to some special structure which is not a

Control dependency between prior load in while condition and later store?

2018-04-04 Thread Daniel Jordan
A question for memory-barriers.txt aficionados. Is there a control dependency between the prior load of 'a' and the later store of 'c'?: while (READ_ONCE(a)); WRITE_ONCE(c, 1); I have my doubts because memory-barriers.txt doesn't talk much about loops and because of what that document sa

[RFC PATCH 26/79] fs: add struct address_space to mpage_readpage() arguments

2018-04-04 Thread jglisse
From: Jérôme Glisse Add struct address_space to mpage_readpage(). Note this patch only add arguments and modify call site conservatily using page->mapping and thus the end result is as before this patch. One step toward dropping reliance on page->mapping. Signed-off-by: Jérôme Glisse Cc: Alexa

[RFC PATCH 22/79] fs: add struct inode to block_read_full_page() arguments

2018-04-04 Thread jglisse
From: Jérôme Glisse Add struct inode to block_read_full_page(). Note this patch only add arguments and modify call site conservatily using page->mapping and thus the end result is as before this patch. One step toward dropping reliance on page->mapping. Signed-off-by: Jérôme Glisse Cc: Alexand

[RFC PATCH 24/79] fs: add struct inode to nobh_writepage() arguments

2018-04-04 Thread jglisse
From: Jérôme Glisse Add struct inode to nobh_writepage(). Note this patch only add arguments and modify call site conservatily using page->mapping and thus the end result is as before this patch. One step toward dropping reliance on page->mapping. Signed-off-by: Jérôme Glisse Cc: Alexander Vir

[RFC PATCH 27/79] fs: add struct address_space to fscache_read*() callback arguments

2018-04-04 Thread jglisse
From: Jérôme Glisse Add struct address_space to fscache_read*() callback argument. Note this patch only add arguments and modify call site conservatily using page->mapping and thus the end result is as before this patch. One step toward dropping reliance on page->mapping. Signed-off-by: Jérôme

[RFC PATCH 20/79] fs: add struct address_space to write_cache_pages() callback argument

2018-04-04 Thread jglisse
From: Jérôme Glisse Add struct address_space to callback arguments of write_cache_pages() Note this patch only add arguments and modify all callback functions signature, it does not make use of the new argument and thus it should be regression free. One step toward dropping reliance on page->map

[RFC PATCH 30/79] fs/block: add struct address_space to __block_write_begin() arguments

2018-04-04 Thread jglisse
From: Jérôme Glisse Add struct address_space to __block_write_begin() arguments. One step toward dropping reliance on page->mapping. -- identifier M; expression E1, E2, E3, E4; @@ struct address_space *M; ... -__block_write_beg

[RFC PATCH 32/79] fs/block: do not rely on page->mapping get it from the context

2018-04-04 Thread jglisse
From: Jérôme Glisse This patch remove most dereference of page->mapping and get the mapping from the call context (either already available in the function or by adding it to function arguments). Signed-off-by: Jérôme Glisse Cc: Jens Axboe CC: Andrew Morton Cc: Alexander Viro Cc: linux-fsde.

[RFC PATCH 28/79] fs: introduce page_is_truncated() helper

2018-04-04 Thread jglisse
From: Jérôme Glisse Simple helper to unify all truncation test to one logic. This also unify logic that was bit different in various places. Convertion done using following coccinelle spatch on fs and mm dir: - @@ struct page *

[RFC PATCH 31/79] fs/block: add struct address_space to __block_write_begin_int() args

2018-04-04 Thread jglisse
From: Jérôme Glisse Add struct address_space to __block_write_begin_int() arguments. One step toward dropping reliance on page->mapping. -- @exists@ identifier M; expression E1, E2, E3, E4, E5; @@ struct address_space *M; ... -

[RFC PATCH 33/79] fs/journal: add struct super_block to jbd2_journal_forget() arguments.

2018-04-04 Thread jglisse
From: Jérôme Glisse For the holy crusade to stop relying on struct page mapping field, add struct super_block to jbd2_journal_forget() arguments. spatch --sp-file zemantic-010a.spatch --in-place --dir fs/ -- @exists@ expression

[RFC PATCH 34/79] fs/journal: add struct inode to jbd2_journal_revoke() arguments.

2018-04-04 Thread jglisse
From: Jérôme Glisse For the holy crusade to stop relying on struct page mapping field, add struct super_block to jbd2_journal_revoke() arguments. spatch --sp-file zemantic-011a.spatch --in-place --dir fs/ -- @exists@ expression

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread James Y Knight
On Wed, Apr 4, 2018 at 12:59 PM Greg KH wrote: > Here is another horrible work around that was needed to get clang to > stop generating invalid code, beaec533fc27 ("llist: clang: introduce > member_address_is_nonnull()") That one caused a lot of odd failures by > users, I wonder what else is lurk

[RFC PATCH 38/79] fs/buffer: add first buffer flag for first buffer_head in a page

2018-04-04 Thread jglisse
From: Jérôme Glisse A common pattern in code is that we have a buffer_head and we want to get the first buffer_head in buffer_head list for a page. Before this patch it was simply done with page_buffers(bh->b_page). This patch introduce an helper bh_first_for_page(struct buffer_head *) which can

[RFC PATCH 37/79] fs/buffer: add struct super_block to __bforget() arguments

2018-04-04 Thread jglisse
From: Jérôme Glisse For the holy crusade to stop relying on struct page mapping field, add struct super_block to __bforget() arguments. spatch --sp-file zemantic-013a.spatch --in-place --dir fs/ spatch --sp-file zemantic-013a.spatch --in-place --dir include/ --include-headers --

[RFC PATCH 36/79] fs/buffer: add struct super_block to bforget() arguments

2018-04-04 Thread jglisse
From: Jérôme Glisse For the holy crusade to stop relying on struct page mapping field, add struct super_block to bforget() arguments. spatch --sp-file zemantic-012a.spatch --in-place --dir fs/ -- @exists@ expression E1; identifi

[RFC PATCH 29/79] fs/block: add struct address_space to bdev_write_page() arguments

2018-04-04 Thread jglisse
From: Jérôme Glisse Add struct address_space to bdev_write_page() arguments. One step toward dropping reliance on page->mapping. Signed-off-by: Jérôme Glisse Cc: Jens Axboe CC: Andrew Morton Cc: Alexander Viro Cc: linux-fsde...@vger.kernel.org Cc: Tejun Heo Cc: Jan Kara Cc: Josef Bacik C

[RFC PATCH 39/79] fs/buffer: add struct address_space to clean_page_buffers() arguments

2018-04-04 Thread jglisse
From: Jérôme Glisse Add struct address_space to clean_page_buffers() arguments. One step toward dropping reliance on page->mapping. Signed-off-by: Jérôme Glisse Cc: Jens Axboe CC: Andrew Morton Cc: Alexander Viro Cc: linux-fsde...@vger.kernel.org Cc: Tejun Heo Cc: Jan Kara Cc: Josef Bacik

[RFC PATCH 50/79] fs: stop relying on mapping field of struct page, get it from context

2018-04-04 Thread jglisse
From: Jérôme Glisse Holy grail, remove all usage of mapping field of struct page inside common fs code. spatch --sp-file zemantic-015a.spatch --in-place fs/*.c -- @exists@ struct page * P; identifier I; @@ struct address_space *

Re: [RFC] drm/atomic+msm: add helper to implement legacy dirtyfb

2018-04-04 Thread Rob Clark
On Wed, Apr 4, 2018 at 1:41 PM, Noralf Trønnes wrote: > > > Den 04.04.2018 00.42, skrev Rob Clark: >> >> Add an atomic helper to implement dirtyfb support. This is needed to >> support DSI command-mode panels with x11 userspace (ie. when we can't >> rely on pageflips to trigger a flush to the pan

[RFC PATCH 35/79] fs/buffer: add struct address_space and struct page to end_io callback

2018-04-04 Thread jglisse
From: Jérôme Glisse For the holy crusade to stop relying on struct page mapping field, add struct address_space and struct page to the end_io callback of buffer head. Caller of this callback have more context information to find the match page and mapping. Signed-off-by: Jérôme Glisse CC: Andre

Re: [PATCH] prctl: Deprecate non PR_SET_MM_MAP operations

2018-04-04 Thread Randy Dunlap
Hi, On 04/04/2018 11:55 AM, Cyrill Gorcunov wrote: > --- > kernel/sys.c | 146 > --- > 1 file changed, 2 insertions(+), 144 deletions(-) > > Index: linux-ml.git/kernel/sys.c > =

Re: WARNING in up_write

2018-04-04 Thread Dmitry Vyukov
On Tue, Apr 3, 2018 at 4:01 AM, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > 86bbbebac1933e6e95e8234c4f7d220c5ddd38bc (Mon Apr 2 18:47:07 2018 +) > Merge branch 'ras-core-for-linus' of > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip > syzbot dashboard

[RFC PATCH 64/79] mm/buffer: use _page_has_buffers() instead of page_has_buffers()

2018-04-04 Thread jglisse
From: Jérôme Glisse The former need the address_space for which the buffer_head is being lookup. -- @exists@ identifier M; expression E; @@ struct address_space *M; ... -page_buffers(E) +_page_buffers(E, M) @exists@ identifier

[RFC PATCH 63/79] mm/page: convert page's index lookup to be against specific mapping

2018-04-04 Thread jglisse
From: Jérôme Glisse This patch switch mm to lookup the page index or offset value to be against specific mapping. The page index value only have a meaning against a mapping. Using coccinelle: - @@ struct page *P; expression E; @

[RFC PATCH 52/79] fs/buffer: use _page_has_buffers() instead of page_has_buffers()

2018-04-04 Thread jglisse
From: Jérôme Glisse The former need the address_space for which the buffer_head is being lookup. -- @exists@ identifier M; expression E; @@ struct address_space *M; ... -page_buffers(E) +_page_buffers(E, M) @exists@ identifier

[RFC PATCH 65/79] mm/swap: add struct swap_info_struct swap_readpage() arguments

2018-04-04 Thread jglisse
From: Jérôme Glisse Add struct swap_info_struct swap_readpage() arguments. One step toward dropping reliance on page->private during swap read back. Signed-off-by: Jérôme Glisse CC: Andrew Morton Cc: Alexander Viro Cc: linux-fsde...@vger.kernel.org Cc: Tejun Heo Cc: Jan Kara Cc: Josef Bacik

[RFC PATCH 69/79] fs/journal: add struct address_space to jbd2_journal_try_to_free_buffers() arguments

2018-04-04 Thread jglisse
From: Jérôme Glisse For the holy crusade to stop relying on struct page mapping field, add struct address_space to jbd2_journal_try_to_free_buffers() arguments. <- @@ type T1, T2, T3; @@ int -jbd2_journal_try_to_free_buffers(T1

Re: [PATCH 02/15] ARM: pxa: add dma slave map

2018-04-04 Thread Robert Jarzmik
Arnd Bergmann writes: > On Tue, Apr 3, 2018 at 10:19 PM, Robert Jarzmik > wrote: >> ... chop chop removing unneeded recipients >> >> Arnd Bergmann writes: >>> It still feels odd to me that there is an entry in the slave map for >>> a device that does not have a request line. However, it a

[RFC PATCH 71/79] mm: add struct address_space to set_page_dirty()

2018-04-04 Thread jglisse
From: Jérôme Glisse For the holy crusade to stop relying on struct page mapping field, add struct address_space to set_page_dirty() arguments. <- @@ identifier I1; type T1; @@ int -set_page_dirty(T1 I1) +set_page_dirty(struct ad

[RFC PATCH 70/79] mm: add struct address_space to mark_buffer_dirty()

2018-04-04 Thread jglisse
From: Jérôme Glisse For the holy crusade to stop relying on struct page mapping field, add struct address_space to mark_buffer_dirty() arguments. <- @@ identifier I1; type T1; @@ void -mark_buffer_dirty(T1 I1) +mark_buffer_dirty

[RFC PATCH 79/79] mm/ksm: set page->mapping to page_ronly struct instead of stable_node.

2018-04-04 Thread jglisse
From: Jérôme Glisse Set page->mapping to the page_ronly struct instead of stable_node struct. There is no functional change as page_ronly is just a field of stable_node. Signed-off-by: Jérôme Glisse Cc: Andrea Arcangeli --- mm/ksm.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(

[RFC PATCH 51/79] fs: stop relying on mapping field of struct page, get it from context

2018-04-04 Thread jglisse
From: Jérôme Glisse Holy grail, remove all usage of mapping field of struct page inside common fs code. This is the manual conversion patch (so much can be done with coccinelle). Signed-off-by: Jérôme Glisse Cc: Alexander Viro Cc: linux-fsde...@vger.kernel.org Cc: Jens Axboe Cc: Tejun Heo Cc

[RFC PATCH 72/79] mm: add struct address_space to set_page_dirty_lock()

2018-04-04 Thread jglisse
From: Jérôme Glisse For the holy crusade to stop relying on struct page mapping field, add struct address_space to set_page_dirty_lock() arguments. <- @@ identifier I1; type T1; @@ int -set_page_dirty_lock(T1 I1) +set_page_dirty

[RFC PATCH 75/79] mm/page_ronly: add page read only core structure and helpers.

2018-04-04 Thread jglisse
From: Jérôme Glisse Page read only is a generic framework for page write protection. It reuses the same mechanism as KSM by using the lower bit of the page->mapping fields, and KSM is converted to use this generic framework. Signed-off-by: Jérôme Glisse Cc: Andrea Arcangeli --- include/linux/

[RFC PATCH 73/79] mm: pass down struct address_space to set_page_dirty()

2018-04-04 Thread jglisse
From: Jérôme Glisse Pass down struct address_space to set_page_dirty() everywhere it is already available. <- @exists@ expression E; identifier F, M; @@ F(..., struct address_space * M, ...) { ... -set_page_dirty(NULL, E) +set_p

[RFC PATCH 76/79] mm/ksm: have ksm select PAGE_RONLY config.

2018-04-04 Thread jglisse
From: Jérôme Glisse Signed-off-by: Jérôme Glisse Cc: Andrea Arcangeli --- mm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/Kconfig b/mm/Kconfig index aeffb6e8dd21..6994a1fdf847 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -308,6 +308,7 @@ config MMU_NOTIFIER config KSM

[RFC PATCH 74/79] mm/page_ronly: add config option for generic read only page framework.

2018-04-04 Thread jglisse
From: Jérôme Glisse It's really just a config option patch. Signed-off-by: Jérôme Glisse Cc: Andrea Arcangeli --- mm/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/Kconfig b/mm/Kconfig index c782e8fb7235..aeffb6e8dd21 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -149,6 +149,

Re: [PATCH v2 1/6] spi: core: handle timeout error from transfer_one()

2018-04-04 Thread Sergey Suloev
On 04/04/2018 10:08 AM, Maxime Ripard wrote: On Tue, Apr 03, 2018 at 07:24:11PM +0300, Sergey Suloev wrote: On 04/03/2018 07:18 PM, Mark Brown wrote: On Tue, Apr 03, 2018 at 07:00:55PM +0300, Sergey Suloev wrote: On 04/03/2018 06:52 PM, Mark Brown wrote: On Tue, Apr 03, 2018 at 06:29:00PM +03

[RFC PATCH 68/79] mm/vma_address: convert page's index lookup to be against specific mapping

2018-04-04 Thread jglisse
From: Jérôme Glisse Pass down the mapping ... Signed-off-by: Jérôme Glisse Cc: Andrew Morton Cc: Mel Gorman Cc: linux...@kvack.org Cc: Alexander Viro Cc: linux-fsde...@vger.kernel.org --- mm/internal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/internal.h b/mm

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