[PATCH 02/32] vfs: syscall: Add move_mount(2) to move mounts around

2018-07-10 Thread David Howells
Add a move_mount() system call that will move a mount from one place to another and, in the next commit, allow to attach an unattached mount tree. The new system call looks like the following: int move_mount(int from_dfd, const char *from_path, int to_dfd, const cha

Re: [PATCH v6 6/8] interconnect: qcom: Add msm8916 interconnect provider driver

2018-07-10 Thread Evan Green
On Mon, Jul 9, 2018 at 8:51 AM Georgi Djakov wrote: > > Add driver for the Qualcomm interconnect buses found in msm8916 based > platforms. > > Signed-off-by: Georgi Djakov > --- > drivers/interconnect/Kconfig| 5 + > drivers/interconnect/Makefile | 1 + > drivers/interconnect/q

[PATCH 03/32] teach move_mount(2) to work with OPEN_TREE_CLONE [ver #9]

2018-07-10 Thread David Howells
From: Al Viro Allow a detached tree created by open_tree(..., OPEN_TREE_CLONE) to be attached by move_mount(2). If by the time of final fput() of OPEN_TREE_CLONE-opened file its tree is not detached anymore, it won't be dissolved. move_mount(2) is adjusted to handle detached source. That gives

[PATCH 01/32] vfs: syscall: Add open_tree(2) to reference or clone a mount [ver #9]

2018-07-10 Thread David Howells
From: Al Viro open_tree(dfd, pathname, flags) Returns an O_PATH-opened file descriptor or an error. dfd and pathname specify the location to open, in usual fashion (see e.g. fstatat(2)). flags should be an OR of some of the following: * AT_PATH_EMPTY, AT_NO_AUTOMOUNT, AT_SYMLINK_NOFOLLO

[PATCH 00/32] VFS: Introduce filesystem context [ver #9]

2018-07-10 Thread David Howells
lidate the security functions. Possibly add a validation hook to be called at the same time as the mount context validate op. The patches can be found here also: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/tag/?h=mount-api-20180710-2 on branch:

[PATCH 04/32] vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled [ver #9]

2018-07-10 Thread David Howells
Only the mount namespace code that implements mount(2) should be using the MS_* flags. Suppress them inside the kernel unless uapi/linux/mount.h is included. Signed-off-by: David Howells --- arch/arc/kernel/setup.c |1 + arch/arm/kernel/atags_parse.c |1 + arch/sh/kernel/setup.c

[PATCH 05/32] vfs: Introduce the basic header for the new mount API's filesystem context [ver #9]

2018-07-10 Thread David Howells
Introduce a filesystem context concept to be used during superblock creation for mount and superblock reconfiguration for remount. This is allocated at the beginning of the mount procedure and into it is placed: (1) Filesystem type. (2) Namespaces. (3) Source/Device names (there may be multi

[PATCH 07/32] selinux: Implement the new mount API LSM hooks [ver #9]

2018-07-10 Thread David Howells
Implement the new mount API LSM hooks for SELinux. At some point the old hooks will need to be removed. Question: Should the ->fs_context_parse_source() hook be implemented to check the labels on any source devices specified? Signed-off-by: David Howells cc: Paul Moore cc: Stephen Smalley cc:

[PATCH 08/32] smack: Implement filesystem context security hooks [ver #9]

2018-07-10 Thread David Howells
Implement filesystem context security hooks for the smack LSM. Question: Should the ->fs_context_parse_source() hook be implemented to check the labels on any source devices specified? Signed-off-by: David Howells cc: Casey Schaufler cc: linux-security-mod...@vger.kernel.org --- security/smac

[PATCH 10/32] tomoyo: Implement security hooks for the new mount API [ver #9]

2018-07-10 Thread David Howells
Implement the security hook to check the creation of a new mountpoint for Tomoyo. As far as I can tell, Tomoyo doesn't make use of the mount data or parse any mount options, so I haven't implemented any of the fs_context hooks for it. Signed-off-by: David Howells cc: Tetsuo Handa cc: tomoyo-dev

[PATCH 06/32] vfs: Add LSM hooks for the new mount API [ver #9]

2018-07-10 Thread David Howells
Add LSM hooks for use by the new mount API and filesystem context code. This includes: (1) Hooks to handle allocation, duplication and freeing of the security record attached to a filesystem context. (2) A hook to snoop source specifications. There may be multiple of these if the fil

[PATCH 12/32] vfs: Separate changing mount flags full remount [ver #9]

2018-07-10 Thread David Howells
Separate just the changing of mount flags (MS_REMOUNT|MS_BIND) from full remount because the mount data will get parsed with the new fs_context stuff prior to doing a remount - and this causes the syscall to fail under some circumstances. To quote Eric's explanation: [...] mount(..., MS_REMOUNT

[PATCH 14/32] vfs: Remove unused code after filesystem context changes [ver #9]

2018-07-10 Thread David Howells
Remove code that is now unused after the filesystem context changes. Signed-off-by: David Howells --- fs/internal.h |2 - fs/super.c | 62 include/linux/lsm_hooks.h |3 -- include/linux/security.h |7

Re: [PATCH v6 7/8] dt-bindings: Introduce interconnect consumers bindings

2018-07-10 Thread Evan Green
On Mon, Jul 9, 2018 at 8:51 AM Georgi Djakov wrote: > > Add documentation for the interconnect consumer bindings, that will allow > to link a device node (consumer) to its interconnect controller hardware. > > Tha aim is to enable drivers to request a framework API to configure an > interconnect p

[PATCH 13/32] vfs: Implement a filesystem superblock creation/configuration context [ver #9]

2018-07-10 Thread David Howells
Implement a filesystem context concept to be used during superblock creation for mount and superblock reconfiguration for remount. The mounting procedure then becomes: (1) Allocate new fs_context context. (2) Configure the context. (3) Create superblock. (4) Mount the superblock any number

[PATCH 16/32] proc: Add fs_context support to procfs [ver #9]

2018-07-10 Thread David Howells
Add fs_context support to procfs. Signed-off-by: David Howells --- fs/proc/inode.c|2 - fs/proc/internal.h |2 - fs/proc/root.c | 179 ++-- 3 files changed, 120 insertions(+), 63 deletions(-) diff --git a/fs/proc/inode.c b/fs/pro

[PATCH 18/32] cpuset: Use fs_context [ver #9]

2018-07-10 Thread David Howells
Make the cpuset filesystem use the filesystem context. This is potentially tricky as the cpuset fs is almost an alias for the cgroup filesystem, but with some special parameters. This can, however, be handled by setting up an appropriate cgroup filesystem and returning the root directory of that

[PATCH 22/32] vfs: Provide documentation for new mount API [ver #9]

2018-07-10 Thread David Howells
Provide documentation for the new mount API. Signed-off-by: David Howells --- Documentation/filesystems/mount_api.txt | 439 +++ 1 file changed, 439 insertions(+) create mode 100644 Documentation/filesystems/mount_api.txt diff --git a/Documentation/filesystems/mou

[PATCH 17/32] ipc: Convert mqueue fs to fs_context [ver #9]

2018-07-10 Thread David Howells
Convert the mqueue filesystem to use the filesystem context stuff. Notes: (1) The relevant ipc namespace is selected in when the context is initialised (and it defaults to the current task's ipc namespace). The caller can override this before calling vfs_get_tree(). (2) Rather than s

[PATCH 21/32] vfs: Remove kern_mount_data() [ver #9]

2018-07-10 Thread David Howells
The kern_mount_data() isn't used any more so remove it. Signed-off-by: David Howells --- fs/namespace.c |7 --- include/linux/fs.h |1 - 2 files changed, 8 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index 3bae16db1b1d..d5a4d9351a17 100644 --- a/fs/namespace.c +++

[PATCH 15/32] procfs: Move proc_fill_super() to fs/proc/root.c [ver #9]

2018-07-10 Thread David Howells
Move proc_fill_super() to fs/proc/root.c as that's where the other superblock stuff is. Signed-off-by: David Howells --- fs/proc/inode.c| 49 + fs/proc/internal.h |4 +--- fs/proc/root.c | 48 +++

[PATCH 25/32] vfs: syscall: Add fsmount() to create a mount for a superblock [ver #9]

2018-07-10 Thread David Howells
Provide a system call by which a filesystem opened with fsopen() and configured by a series of writes can be mounted: int ret = fsmount(int fsfd, unsigned int flags, unsigned int ms_flags); where fsfd is the file descriptor returned by fsopen(). flags can be 0 o

[PATCH 20/32] hugetlbfs: Convert to fs_context [ver #9]

2018-07-10 Thread David Howells
Convert the hugetlbfs to use the fs_context during mount. Signed-off-by: David Howells --- fs/hugetlbfs/inode.c | 342 +- 1 file changed, 197 insertions(+), 145 deletions(-) diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 76fb8eb2

[PATCH 19/32] kernfs, sysfs, cgroup, intel_rdt: Support fs_context [ver #9]

2018-07-10 Thread David Howells
Make kernfs support superblock creation/mount/remount with fs_context. This requires that sysfs, cgroup and intel_rdt, which are built on kernfs, be made to support fs_context also. Notes: (1) A kernfs_fs_context struct is created to wrap fs_context and the kernfs mount parameters are move

[PATCH 26/32] vfs: syscall: Add fspick() to select a superblock for reconfiguration [ver #9]

2018-07-10 Thread David Howells
Provide an fspick() system call that can be used to pick an existing mountpoint into an fs_context which can thereafter be used to reconfigure a superblock (equivalent of the superblock side of -o remount). This looks like: int fd = fspick(AT_FDCWD, "/mnt", FSPICK_

[PATCH 27/32] vfs: Implement logging through fs_context [ver #9]

2018-07-10 Thread David Howells
Implement the ability for filesystems to log error, warning and informational messages through the fs_context. These can be extracted by userspace by reading from an fd created by fsopen(). Error messages are prefixed with "e ", warnings with "w " and informational messages with "i ". Inside the

[PATCH 29/32] afs: Add fs_context support [ver #9]

2018-07-10 Thread David Howells
Add fs_context support to the AFS filesystem, converting the parameter parsing to store options there. This will form the basis for namespace propagation over mountpoints within the AFS model, thereby allowing AFS to be used in containers more easily. Signed-off-by: David Howells --- fs/afs/in

[PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9]

2018-07-10 Thread David Howells
Provide an fsopen() system call that starts the process of preparing to create a superblock that will then be mountable, using an fd as a context handle. fsopen() is given the name of the filesystem that will be used: int mfd = fsopen(const char *fsname, unsigned int flags); where flags

[PATCH 23/32] Make anon_inodes unconditional [ver #9]

2018-07-10 Thread David Howells
Make the anon_inodes facility unconditional so that it can be used by core VFS code. Signed-off-by: David Howells --- fs/Makefile |2 +- init/Kconfig | 10 -- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/fs/Makefile b/fs/Makefile index 5563cf34f7c2..7e9ca59ac3a7

[PATCH 28/32] vfs: Add some logging to the core users of the fs_context log [ver #9]

2018-07-10 Thread David Howells
Add some logging to the core users of the fs_context log so that information can be extracted from them as to the reason for failure. Signed-off-by: David Howells --- fs/super.c|4 +++- kernel/cgroup/cgroup-v1.c |2 +- 2 files changed, 4 insertions(+), 2 deletions(-) di

[PATCH 30/32] afs: Use fs_context to pass parameters over automount [ver #9]

2018-07-10 Thread David Howells
Alter the AFS automounting code to create and modify an fs_context struct when parameterising a new mount triggered by an AFS mountpoint rather than constructing device name and option strings. Also remove the cell=, vol= and rwpath options as they are then redundant. The reason they existed is be

[PATCH 31/32] vfs: syscall: Add fsinfo() to query filesystem information [ver #9]

2018-07-10 Thread David Howells
Add a system call to allow filesystem information to be queried. A request value can be given to indicate the desired attribute. Support is provided for enumerating multi-value attributes. === NEW SYSTEM CALL === The new system call looks like: int ret = fsinfo(

[PATCH 32/32] afs: Add fsinfo support [ver #9]

2018-07-10 Thread David Howells
Add fsinfo support to the AFS filesystem. Signed-off-by: David Howells --- fs/afs/super.c | 133 1 file changed, 133 insertions(+) diff --git a/fs/afs/super.c b/fs/afs/super.c index ab64edff11af..037f20f5ee90 100644 --- a/fs/afs/super.c

Re: [PATCH -mm -v4 14/21] mm, cgroup, THP, swap: Support to move swap account for PMD swap mapping

2018-07-10 Thread Daniel Jordan
On Tue, Jul 10, 2018 at 03:49:58PM +0800, Huang, Ying wrote: > Daniel Jordan writes: > > > On Fri, Jun 22, 2018 at 11:51:44AM +0800, Huang, Ying wrote: > >> Because there is no way to prevent a huge swap cluster from being > >> split except when it has SWAP_HAS_CACHE flag set. > > > > What about

Re: [PATCH 11/32] vfs: Require specification of size of mount data for internal mounts [ver #9]

2018-07-10 Thread Linus Torvalds
On Tue, Jul 10, 2018 at 3:42 PM David Howells wrote: > > Require specification of the size of the mount data passed to the VFS > mounting functions by internal mounts. This should not be patch 11/32 in some big and complex series with new user API's etc. This should be a prerequisite patch that

[MANPAGE PATCH] Add manpages for move_mount(2) and open_tree(2)

2018-07-10 Thread David Howells
Add manual pages to document the move_mount and open_tree() system calls. Signed-off-by: David Howells --- man2/move_mount.2 | 274 + man2/open_tree.2 | 260 ++ 2 files changed, 534 insertions

[MANPAGE PATCH] Add manpage for fsopen(2), fspick(2) and fsmount(2)

2018-07-10 Thread David Howells
Add a manual page to document the fsopen(), fspick() and fsmount() system calls. Signed-off-by: David Howells --- man2/fsmount.2 |1 man2/fsopen.2 | 357 man2/fspick.2 |1 3 files changed, 359 insertions(+) create mode 10064

Re: [PATCH 2/3] arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators

2018-07-10 Thread Doug Anderson
Hi On Tue, Jul 10, 2018 at 3:32 PM, David Collins wrote: > Hello Doug, > > On 07/10/2018 03:02 PM, Douglas Anderson wrote: > ... >> + vdd-s1-supply = <&vph_pwr>; >> + vdd-s2-supply = <&vph_pwr>; >> + vdd-s3-supply = <&vph_pwr>; >> + vdd-s4-supply =

[MANPAGE PATCH] Add manpage for fsinfo(2)

2018-07-10 Thread David Howells
Add a manual page to document the fsinfo() system call. Signed-off-by: David Howells --- man2/fsinfo.2 | 1017 +++ man2/ioctl_iflags.2 |6 man2/stat.2 |7 man2/statx.2| 13 + man2/utime.2|7 man2/utim

Re: [PATCH] Check jvmti_agent snprintf return value to avoid build failures with GCC-8.1.1

2018-07-10 Thread Jiri Olsa
On Tue, Jul 10, 2018 at 02:27:16PM -0400, William Cohen wrote: > Newer versions of GCC perform static analysis to determine whether > string truncation is possible with functions such as snprintf and > provide a warning if truncation could occur. The make for > jvmti_agent.c uses the compiler opti

Re: [PATCH 00/32] VFS: Introduce filesystem context [ver #9]

2018-07-10 Thread Linus Torvalds
On Tue, Jul 10, 2018 at 3:41 PM David Howells wrote: > > Here are a set of patches to create a filesystem context prior to setting > up a new mount, populating it with the parsed options/binary data, creating > the superblock and then effecting the mount. This is also used for remount > since muc

Re: [PATCH 2/3] arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators

2018-07-10 Thread David Collins
Hi, On 07/10/2018 03:55 PM, Doug Anderson wrote: > On Tue, Jul 10, 2018 at 3:32 PM, David Collins > wrote: >> On 07/10/2018 03:02 PM, Douglas Anderson wrote: >> ... >>> + vdd-s1-supply = <&vph_pwr>; >>> + vdd-s2-supply = <&vph_pwr>; >>> + vdd-s3-supply = <&vph

Re: [PATCH] sched/fair: Remove setting task's se->runnable_weight during PELT update

2018-07-10 Thread Joel Fernandes
On Mon, Jul 09, 2018 at 05:47:53PM +0100, Dietmar Eggemann wrote: > A CFS (SCHED_OTHER, SCHED_BATCH or SCHED_IDLE policy) task's > se->runnable_weight must always be in sync with its se->load.weight. > > se->runnable_weight is set to se->load.weight when the task is > forked (init_entity_runnable_

Re: [PATCH 08/32] smack: Implement filesystem context security hooks [ver #9]

2018-07-10 Thread Casey Schaufler
On 7/10/2018 3:42 PM, David Howells wrote: > Implement filesystem context security hooks for the smack LSM. > > Question: Should the ->fs_context_parse_source() hook be implemented to > check the labels on any source devices specified? Checking the label on a block device when doing a mount is jus

Re: [PATCH v2] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire

2018-07-10 Thread Andrea Parri
On Tue, Jul 10, 2018 at 11:34:45AM -0400, Alan Stern wrote: > On Tue, 10 Jul 2018, Andrea Parri wrote: > > > > > ACQUIRE operations include LOCK operations and both smp_load_acquire() > > > > and smp_cond_acquire() operations. [BTW, the latter was replaced by > > > > smp_cond_load_acquire()

Re: [PATCH 08/32] smack: Implement filesystem context security hooks [ver #9]

2018-07-10 Thread David Howells
Casey Schaufler wrote: > > Implement filesystem context security hooks for the smack LSM. > > > > Question: Should the ->fs_context_parse_source() hook be implemented to > > check the labels on any source devices specified? > > Checking the label on a block device when doing a mount > is just go

Re: [PATCH v4] PCI/AER: Fix aerdrv loading with "pcie_ports=native" parameter

2018-07-10 Thread Bjorn Helgaas
On Tue, Jul 03, 2018 at 06:27:43PM -0500, Alexandru Gagniuc wrote: > According to the documentation, "pcie_ports=native", linux should use > native AER and DPC services. While that is true for the _OSC method > parsing, this is not the only place that is checked. Should the HEST > table list PCIe p

Re: [PATCH 08/32] smack: Implement filesystem context security hooks [ver #9]

2018-07-10 Thread Casey Schaufler
On 7/10/2018 4:19 PM, David Howells wrote: > Casey Schaufler wrote: > >>> Implement filesystem context security hooks for the smack LSM. >>> >>> Question: Should the ->fs_context_parse_source() hook be implemented to >>> check the labels on any source devices specified? >> Checking the label on a

Re: [PATCH v2 2/2] drivers: core: Remove glue dirs from sysfs earlier

2018-07-10 Thread Benjamin Herrenschmidt
On Tue, 2018-07-10 at 16:55 +0200, Greg Kroah-Hartman wrote: > > > +/** > > + * kobject_has_children - Returns whether a kobject has children. > > + * @kobj: the object to test > > + * > > + * This will return whether a kobject has other kobjects as children. > > + * > > + * It does NOT account fo

Re: [PATCH v2] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire

2018-07-10 Thread Andrea Parri
On Tue, Jul 10, 2018 at 01:17:50PM -0400, Alan Stern wrote: > On Tue, 10 Jul 2018, Daniel Lustig wrote: > > > > --- usb-4.x.orig/tools/memory-model/linux-kernel.cat > > > +++ usb-4.x/tools/memory-model/linux-kernel.cat > > > @@ -38,7 +38,7 @@ let strong-fence = mb | gp > > > (* Release Acquire *)

Re: [PATCH 1/2] drivers: core: Don't try to use a dead glue_dir

2018-07-10 Thread Benjamin Herrenschmidt
On Tue, 2018-07-10 at 16:55 +0200, Greg Kroah-Hartman wrote: > On Tue, Jul 10, 2018 at 09:44:33AM +1000, Benjamin Herrenschmidt wrote: > > On Sat, 2018-07-07 at 18:48 +0200, Greg Kroah-Hartman wrote: > > > No, kobject_get() should never happen on a 0 refcount object. That > > > being said, the cod

[PATCH] [RESEND] perf/x86/intel/uncore: Fix the index of PCU.3 Broadwell CPUs

2018-07-10 Thread Masayoshi Mizuma
From: Masayoshi Mizuma commit 15a3e845b01c ("perf/x86/intel/uncore: Fix SBOX support for Broadwell CPUs") introduced PCU.3 for Broadwell CPU. Unfortunately, the driver_data of PCU.3 conflicts to QPI Port 2 filter. { /* QPI Port 2 filter */ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x6f46)

[RFC v4 PATCH 1/3] mm: introduce VM_DEAD flag and extend check_stable_address_space to check it

2018-07-10 Thread Yang Shi
VM_DEAD flag is used to mark a vma is being unmapped for the later munmap large address space optimization. Before the optimization PF race with munmap, may return the right content or SIGSEGV, but with the optimization, it may return a zero page. Use this flag to mark PF to this area is unstable,

[RFC v4 0/3] mm: zap pages with read mmap_sem in munmap for large mapping

2018-07-10 Thread Yang Shi
Background: Recently, when we ran some vm scalability tests on machines with large memory, we ran into a couple of mmap_sem scalability issues when unmapping large memory space, please refer to https://lkml.org/lkml/2017/12/14/733 and https://lkml.org/lkml/2018/2/20/576. History: Then akpm sugg

[RFC v4 PATCH 3/3] mm: mmap: zap pages with read mmap_sem for large mapping

2018-07-10 Thread Yang Shi
When running some mmap/munmap scalability tests with large memory (i.e. > 300GB), the below hung task issue may happen occasionally. INFO: task ps:14018 blocked for more than 120 seconds. Tainted: GE 4.9.79-009.ali3000.alios7.x86_64 #1 "echo 0 > /proc/sys/kernel/hung_task_timeo

[RFC v4 PATCH 2/3] mm: refactor do_munmap() to extract the common part

2018-07-10 Thread Yang Shi
Introduces three new helper functions: * munmap_addr_sanity() * munmap_lookup_vma() * munmap_mlock_vma() They will be used by do_munmap() and the new do_munmap with zapping large mapping early in the later patch. There is no functional change, just code refactor. Signed-off-by: Yang Shi -

Re: [PATCH 10/32] tomoyo: Implement security hooks for the new mount API [ver #9]

2018-07-10 Thread Tetsuo Handa
David Howells wrote: > Implement the security hook to check the creation of a new mountpoint for > Tomoyo. > > As far as I can tell, Tomoyo doesn't make use of the mount data or parse > any mount options, so I haven't implemented any of the fs_context hooks for > it. > > Signed-off-by: David Howe

Re: [PATCH v11 5/8] i2c: fsi: Add transfer implementation

2018-07-10 Thread Benjamin Herrenschmidt
On Tue, 2018-07-10 at 12:52 -0500, Eddie James wrote: > > On 07/09/2018 05:41 PM, Wolfram Sang wrote: > > > + cmd |= FIELD_PREP(I2C_CMD_ADDR, msg->addr >> 1); > > > > I just noticed this and wonder: Don't you need the LSB of the address? > > It is not the RW flag, this is encoded in msg->flags. >

Re: [PATCH] checkpatch: Require author Signed-off-by

2018-07-10 Thread Joe Perches
On Wed, 2018-07-11 at 00:08 +0200, Pavel Machek wrote: > On Tue 2018-07-10 22:50:14, Geert Uytterhoeven wrote: > > Hi Pavel, > > > > On Tue, Jul 10, 2018 at 10:47 PM Pavel Machek wrote: > > > > Print an error if none of the Signed-off-by lines cover the patch > > > > author. > > > > > > Is it go

mmotm 2018-07-10-16-50 uploaded

2018-07-10 Thread akpm
The mm-of-the-moment snapshot 2018-07-10-16-50 has been uploaded to http://www.ozlabs.org/~akpm/mmotm/ mmotm-readme.txt says README for mm-of-the-moment: http://www.ozlabs.org/~akpm/mmotm/ This is a snapshot of my -mm patch queue. Uploaded at random hopefully more than once a week. You wi

Re: [PATCH 1/2] drivers: core: Don't try to use a dead glue_dir

2018-07-10 Thread Linus Torvalds
On Tue, Jul 10, 2018 at 4:32 PM Benjamin Herrenschmidt wrote: > > > I like that fix, which should make this patch obsolete, right? > > Yes, for that specific issue, but Linus seemed to think patch 1 was the > "right thing to do" regardless... I would definitely prefer either a kobject_get_unless_

Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9]

2018-07-10 Thread Andy Lutomirski
[cc Jann - you love this stuff] > On Jul 10, 2018, at 3:44 PM, David Howells wrote: > > Provide an fsopen() system call that starts the process of preparing to > create a superblock that will then be mountable, using an fd as a context > handle. fsopen() is given the name of the filesystem that

Re: [PATCH 1/2] drivers: core: Don't try to use a dead glue_dir

2018-07-10 Thread Benjamin Herrenschmidt
On Tue, 2018-07-10 at 16:55 -0700, Linus Torvalds wrote: > On Tue, Jul 10, 2018 at 4:32 PM Benjamin Herrenschmidt > wrote: > > > > > I like that fix, which should make this patch obsolete, right? > > > > Yes, for that specific issue, but Linus seemed to think patch 1 was the > > "right thing to

Re: [PATCH] Check jvmti_agent snprintf return value to avoid build failures with GCC-8.1.1

2018-07-10 Thread William Cohen
On 07/10/2018 06:58 PM, Jiri Olsa wrote: > On Tue, Jul 10, 2018 at 02:27:16PM -0400, William Cohen wrote: >> Newer versions of GCC perform static analysis to determine whether >> string truncation is possible with functions such as snprintf and >> provide a warning if truncation could occur. The m

[PATCH] 9p/net/protocol.c: return -ENOMEM when kmalloc() failed

2018-07-10 Thread piaojun
We should return -ENOMEM to upper user when kmalloc failed to indicate accurate errno. Signed-off-by: Jun Piao --- net/9p/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/9p/protocol.c b/net/9p/protocol.c index 931ea00..4a1e1dd 100644 --- a/net/9p/protocol.c +++

Re: [PATCH v9 6/7] lib: Add module to simulate atomic sections for testing preemptoff tracers

2018-07-10 Thread Steven Rostedt
On Thu, 28 Jun 2018 11:21:48 -0700 Joel Fernandes wrote: > From: "Joel Fernandes (Google)" > > In this patch we introduce a test module for simulating a long atomic > section in the kernel which the preemptoff or irqsoff tracers can > detect. This module is to be used only for test purposes and

Re: [PATCH v9 7/7] kselftests: Add tests for the preemptoff and irqsoff tracers

2018-07-10 Thread Steven Rostedt
On Thu, 28 Jun 2018 11:21:49 -0700 Joel Fernandes wrote: > From: "Joel Fernandes (Google)" > > Here we add unit tests for the preemptoff and irqsoff tracer by using a > kernel module introduced previously to trigger atomic sections in the > kernel. > > Reviewed-by: Masami Hiramatsu > Acked-by

Re: [PATCH v3 1/3] vt: preserve unicode values corresponding to screen characters

2018-07-10 Thread Kees Cook
On Tue, Jun 26, 2018 at 8:56 PM, Nicolas Pitre wrote: > The vt code translates UTF-8 strings into glyph index values and stores > those glyph values directly in the screen buffer. Because there can only > be at most 512 glyphs, it is impossible to represent most unicode > characters, in which case

[PATCH v3 4.4.y 1/3] x86/fpu: Remove use_eager_fpu()

2018-07-10 Thread Daniel Sangorrin
From: Andy Lutomirski commit c592b57347069abfc0dcad3b3a302cf882602597 upstream This removes all the obvious code paths that depend on lazy FPU mode. It shouldn't change the generated code at all. Signed-off-by: Andy Lutomirski Signed-off-by: Rik van Riel Cc: Borislav Petkov Cc: Brian Gerst

[PATCH v3 4.4.y 2/3] x86/fpu: Remove struct fpu::counter

2018-07-10 Thread Daniel Sangorrin
From: Rik van Riel commit 3913cc3507575273beb165a5e027a081913ed507 upstream With the lazy FPU code gone, we no longer use the counter field in struct fpu for anything. Get rid it. Signed-off-by: Rik van Riel Reviewed-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen C

Why the mce reverts in 4.16-rt?

2018-07-10 Thread Steven Rostedt
Hi Sebastian, I'm looking at backporting patches from 4.16-rt and noticed that you have: Revert "x86: Convert mce timer to hrtimer" Revert "x86/mce: use swait queue for mce wakeups" With no explanation to why they were reverted. When did things change? Should this be 4.14-rt material? Thanks,

Re: [PATCH -mm -v4 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-07-10 Thread Huang, Ying
Dave Hansen writes: >> Yes. Boolean parameter isn't good at most times. Matthew Wilcox >> suggested to use >> >> swap_duplicate(&entry, HPAGE_PMD_NR); >> >> vs. >> >> swap_duplicate(&entry, 1); >> >> He thinks this makes the interface more flexible to support other swap >> e

[PATCH V2 2/2] ARM: dts: imx6sx: add ocram_s support

2018-07-10 Thread Anson Huang
i.MX6SX has a 16KB always-on ocram bank called ocram_s, enable it as another mmio sram. Signed-off-by: Anson Huang --- changes since V1: resort the ocram_s and ocram node by address from low to high. arch/arm/boot/dts/imx6sx.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/

[PATCH V2 1/2] clk: imx: add ocram_s clock for i.mx6sx

2018-07-10 Thread Anson Huang
i.MX6SX has a 16KB always-on ocram bank called ocram_s, and its clock gate in CCM CCGR1 CG14 needs to be enabled before access, add it to clock tree. Signed-off-by: Anson Huang --- changes since V1: remove redefinition of IMX6SX_CLK_OCRAM_S to avoid build warning drivers/clk/imx/clk-imx6

Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9]

2018-07-10 Thread Linus Torvalds
Yeah, Andy is right that we should *not* make "write()" have side effects. Use it to queue things by all means, but not "do" things. Not unless there's a very sane security model. On Tue, Jul 10, 2018 at 4:59 PM Andy Lutomirski wrote: > > I think the right solution is one of: > > (a) Pass a netl

RE: [PATCH 1/1] Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic

2018-07-10 Thread Michael Kelley (EOSG)
>From k...@linuxonhyperv.com Sent: Saturday, July 7, >2018 7:57 PM > > From: Sunil Muthuswamy > > In the VM mode on Hyper-V, currently, when the kernel panics, an error > code and few register values are populated in an MSR and the Hypervisor > notified. This information is collected on the h

Re: [PATCH -mm -v4 04/21] mm, THP, swap: Support PMD swap mapping in swapcache_free_cluster()

2018-07-10 Thread Huang, Ying
Dave Hansen writes: > On 07/09/2018 11:53 PM, Huang, Ying wrote: >> Dave Hansen writes: +#ifdef CONFIG_THP_SWAP +static inline int cluster_swapcount(struct swap_cluster_info *ci) +{ + if (!ci || !cluster_is_huge(ci)) + return 0; + + return cluster_co

[PATCH] arm64: neon: Fix function may_use_simd() return error status

2018-07-10 Thread Yandong.Zhao
From: Yandong Zhao It does not matter if the caller of may_use_simd() migrates to another cpu after the call, but it is still important that the kernel_neon_busy percpu instance that is read matches the cpu the task is running on at the time of the read. This means that raw_cpu_read() is not suf

Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9]

2018-07-10 Thread Jann Horn
On Tue, Jul 10, 2018 at 4:59 PM Andy Lutomirski wrote: > > [cc Jann - you love this stuff] > > > On Jul 10, 2018, at 3:44 PM, David Howells wrote: > > > > Provide an fsopen() system call that starts the process of preparing to > > create a superblock that will then be mountable, using an fd as a

Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9]

2018-07-10 Thread Al Viro
On Tue, Jul 10, 2018 at 06:05:49PM -0700, Linus Torvalds wrote: > Yeah, Andy is right that we should *not* make "write()" have side effects. > > Use it to queue things by all means, but not "do" things. Not unless > there's a very sane security model. > > On Tue, Jul 10, 2018 at 4:59 PM Andy Luto

Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9]

2018-07-10 Thread Al Viro
On Tue, Jul 10, 2018 at 06:14:10PM -0700, Jann Horn wrote: > I also love ioctls, so I think you could also use an ioctl to do the > commit? You can do anything (well, almost anything) that you can do in > syscall context in ioctl context, too; and when you already have a > file descriptor of a spe

[PATCH 1/3] iio: imu: mpu6050: add support for 6515 variant

2018-07-10 Thread Brian Masney
This patch adds support for the MPU 6515 variant. Confirmed that the driver functions correctly on a LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney Signed-off-by: Jonathan Marek --- This is a variation of Jonathan Marek's patch from postmarketOS https://gitlab.com/postmarketOS/linux-

[PATCH 3/3] ARM: dts: qcom: msm8974-hammerhead: add device tree bindings for mpu6515

2018-07-10 Thread Brian Masney
This patch adds device tree bindings for the mpu6515 to the LG Nexus 5 (hammerhead) phone. Confirmed that the gyroscope / accelerometer (mpu6515), magnetometer (ak8963), and temperature / pressure (bmp280) sensors are available on the phone. Interrupts are not working properly on the ak8963 magnet

[PATCH 2/3] iio: imu: mpu6050: add support for regulator framework

2018-07-10 Thread Brian Masney
This patch adds support for the regulator framework to the mpu6050 driver. Signed-off-by: Brian Masney Signed-off-by: Jonathan Marek --- This is a variation of Jonathan Marek's patch from postmarketOS https://gitlab.com/postmarketOS/linux-postmarketos/commit/b8ad1ec1859c8bbcbce94944b3f4dd68f8f9f

[PATCH 0/3] ARM: dts: qcom: msm8974-hammerhead: add support for mpu6515

2018-07-10 Thread Brian Masney
This patch set adds support for the gyroscope / accelerometer (mpu6515), magnetometer (ak8963), and temperature / pressure (bmp280) sensors to the LG Nexus 5 (hammerhead) phone. Bindings for the MPU 6515 variant are added, along with regulator support to that driver in order to correctly configure

Re: [PATCH] 9p/net/protocol.c: return -ENOMEM when kmalloc() failed

2018-07-10 Thread jiangyiwen
On 2018/7/11 8:43, piaojun wrote: > We should return -ENOMEM to upper user when kmalloc failed to indicate > accurate errno. > > Signed-off-by: Jun Piao Reviewed-by: Yiwen Jiang > --- > net/9p/protocol.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/9p/protocol

Re: [PATCH -mm -v4 05/21] mm, THP, swap: Support PMD swap mapping in free_swap_and_cache()/swap_free()

2018-07-10 Thread Huang, Ying
Dave Hansen writes: > On 07/10/2018 12:13 AM, Huang, Ying wrote: >> Dave Hansen writes: >>> The code non-resuse was, and continues to be, IMNHO, one of the largest >>> sources of bugs with the original THP implementation. It might be >>> infeasible to do here, but let's at least give it as much

Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9]

2018-07-10 Thread Andy Lutomirski
On Tue, Jul 10, 2018 at 6:15 PM, Al Viro wrote: > On Tue, Jul 10, 2018 at 06:05:49PM -0700, Linus Torvalds wrote: >> Yeah, Andy is right that we should *not* make "write()" have side effects. >> >> Use it to queue things by all means, but not "do" things. Not unless >> there's a very sane security

[PATCH] iio: pressure: bmp280: remove unused options from device tree documentation

2018-07-10 Thread Brian Masney
There are several options in the device tree documentation that are no longer relevant for the current in-kernel bmp280 driver so this patch removes them. Signed-off-by: Brian Masney --- Documentation/devicetree/bindings/iio/pressure/bmp085.txt | 7 --- 1 file changed, 7 deletions(-) diff -

Re: [PATCH 0/3] fix selftests compiling errors and warnings

2018-07-10 Thread Li Zhijian
On 07/10/2018 10:08 PM, Shuah Khan wrote: On 07/10/2018 02:38 AM, Li Zhijian wrote: ping On 07/02/2018 11:53 AM, Li Zhijian wrote: Li Zhijian (3):    selftests/android: fix compiling error    selftests/android: initialize heap_type to avoid compiling warning    selftests/gpio: unset OUT

Re: [PATCH] tracing/irqtrace: only call trace_hardirqs_on/off when state changes

2018-07-10 Thread Steven Rostedt
On Wed, 2 May 2018 10:12:14 +1000 Nicholas Piggin wrote: > > I have mixed feelings about this patch, I am Ok with this patch but I > > suggest its sent with the follow-up patch that shows its use of this. > > And also appreciate if such a follow-up patch is rebased onto the IRQ > > tracepoint wor

Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9]

2018-07-10 Thread Linus Torvalds
On Tue, Jul 10, 2018 at 6:15 PM Al Viro wrote: > > Umm... How about "use credentials of opener for everything"? yeah, we have that for writes in general. Nobody ever actually follows that rule. They may *think* they do, and then they call to some helper that does "capability(CAP_SYS_WHATEVAH)"

Re: [PATCH] printk: remove unused suppress_message_printing()

2018-07-10 Thread Sergey Senozhatsky
On (07/10/18 17:22), Arnd Bergmann wrote: > Moving the call to suppress_message_printing() into the '#ifdef CONFIG_PRINTK' > section means that the alternative definition is now unused when PRINTK is > disabled: > > kernel/printk/printk.c:2033:13: error: 'suppress_message_printing' defined > but

Re: [V9fs-developer] [PATCH] Integer underflow in pdu_read()

2018-07-10 Thread jiangyiwen
On 2018/7/10 3:26, Tomas Bortoli wrote: > The pdu_read() function suffers from an integer underflow. > When pdu->offset is greater than pdu->size, the length calculation will have > a wrong result, resulting in an out-of-bound read. > This patch modifies also pdu_write() in the same way to prevent

[PATCH v2] selftests/android: initialize heap_type to avoid compiling warning

2018-07-10 Thread Li Zhijian
root@vm-lkp-nex04-8G-7 ~/linux-v4.18-rc2/tools/testing/selftests/android# make make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. make[1]: Entering directory '/root/linux-v4.18-rc2/tools/testing/selftests/android/ion' gcc -I. -I../../../../../drivers/staging/androi

Re: linux-next: manual merge of the vfs tree with the overlayfs tree

2018-07-10 Thread Al Viro
On Tue, Jul 10, 2018 at 04:04:55PM +0100, Al Viro wrote: > First of all, I'm still not at all convinced that this "noaccount" thing is > sane, especially since path_open() is exported. But that aside, > __get_empty_filp() > needs to be shot, just for the name and calling conventions alone. > > I

Re: [PATCH V2 1/2] clk: imx: add ocram_s clock for i.mx6sx

2018-07-10 Thread Fabio Estevam
On Tue, Jul 10, 2018 at 9:58 PM, Anson Huang wrote: > i.MX6SX has a 16KB always-on ocram bank called > ocram_s, and its clock gate in CCM CCGR1 CG14 > needs to be enabled before access, add it to > clock tree. > > Signed-off-by: Anson Huang Reviewed-by: Fabio Estevam

Re: [PATCH V2 2/2] ARM: dts: imx6sx: add ocram_s support

2018-07-10 Thread Fabio Estevam
On Tue, Jul 10, 2018 at 9:58 PM, Anson Huang wrote: > i.MX6SX has a 16KB always-on ocram bank called > ocram_s, enable it as another mmio sram. > > Signed-off-by: Anson Huang Reviewed-by: Fabio Estevam

Re: [PATCH 01/14] thermal: ti-soc-thermal: fix TALERT IRQ handling for DRA752

2018-07-10 Thread J, KEERTHY
On 5/14/2018 5:12 PM, Bartlomiej Zolnierkiewicz wrote: .report_temperature is not set in dra752_data which results in temperature updates not being propagated by ti_bandgap_talert_irq_handler() (it doesn't make much sense to handle TALERT IRQ without reporting temperature updates to the therma

Re: [PATCH 02/14] thermal: ti-soc-thermal: fix comment in omap5xxx-bandgap.h

2018-07-10 Thread J, KEERTHY
On 5/14/2018 5:12 PM, Bartlomiej Zolnierkiewicz wrote: The comment for OMAP5430.CORE register offsets is incorrect. Fix it. Acked-by: Keerthy Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h | 2 +- 1 file changed, 1 insertion(+), 1 delet

<    3   4   5   6   7   8   9   10   >