[PATCH v4] mtdchar: fix usage of mtd_ooblayout_ecc()

2018-03-11 Thread OuYang ZhiZhong
Section was not properly computed. The value of OOB region definition is always ECC section 0 information in the OOB area, but we want to get all the ECC bytes information, so we should call mtd_ooblayout_ecc(mtd, section++, &oobregion) until it returns -ERANGE. Fixes: c2b78452a9db ("mtd: use mtd_

[PATCH] powerpc: Use common error handling code in setup_new_fdt()

2018-03-11 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 11 Mar 2018 09:03:42 +0100 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- arch/powerpc/kernel/machine_kexec_file

[Possible REGRESSION, 4.16-rc4] Error updating SMART data during runtime and could not connect to lvmetad at some boot attempts

2018-03-11 Thread Martin Steigerwald
Hello. Since 4.16-rc4 (upgraded from 4.15.2 which worked) I have an issue with SMART checks occassionally failing like this: smartd[28017]: Device: /dev/sdb [SAT], is in SLEEP mode, suspending checks udisksd[24408]: Error performing housekeeping for drive /org/freedesktop/UDisks2/drives/INTEL_S

Re: [GIT PULL rcu/next] RCU commits for 4.17

2018-03-11 Thread Ingo Molnar
* Paul E. McKenney wrote: > Hello, Ingo! > > This pull request contains the following changes: > > 1.Miscellaneous fixes, perhaps most notably removing obsolete > code whose only purpose in life was to gather information for > the now-removed RCU debugfs facility. Other notabl

[PATCH v2] x86: always use SYSCALL_DEFINE*

2018-03-11 Thread Tautschnig, Michael
All syscall arguments are passed in as types of the same byte size as unsigned long (width of full registers). Using a smaller type without a cast may result in losing bits of information. SYSCALL_DEFINE* introduce adequate type casts. All definitions of syscalls in x86 except for those patched her

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-11 Thread Ingo Molnar
* Maciej S. Szmigiero wrote: > Currently, it is very easy to make the AMD microcode update driver crash > or spin on a malformed microcode file since it does very little > consistency checking on data loaded from such file. > > This commit introduces various checks, mostly on length-type fields

Re: [PATCH] ARM: BCM5301X: Fix NAND ECC parameters for Linksys Panamera

2018-03-11 Thread Vivek Unune
Hi Rafał, On Sat, Mar 10, 2018 at 10:41:04PM +0100, Rafał Miłecki wrote: > On 10 March 2018 at 18:12, Vivek Unune wrote: > > Using BCH8 gives ecc errors and makes the router unsuable. > > Switching to BCH1 fixes these errors. > > Can you provide CFE's log messages starting with > "Decompressing.

[GIT PULL] GPIO fixes for v4.16

2018-03-11 Thread Linus Walleij
Hi Linus, here is a singular fix for v4.16 and the Renesas RCAR driver. Please pull it in! Yours, Linus Walleij The following changes since commit 661e50bc853209e41a5c14a290ca4decc43cbfd1: Linux 4.16-rc4 (2018-03-04 14:54:11 -0800) are available in the Git repository at: git://git.kernel

[PATCH] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-11 Thread Rafael J. Wysocki
From: Rafael J. Wysocki If poll_idle() is allowed to spin until need_resched() returns 'true', it may actually spin for a much longer time than expected by the idle governor, since set_tsk_need_resched() is not always called by the timer interrupt handler. If that happens, the CPU may spend much

Re: [RFC/RFT][PATCH v3 0/6] sched/cpuidle: Idle loop rework

2018-03-11 Thread Rafael J. Wysocki
On Sunday, March 11, 2018 8:43:02 AM CET Doug Smythies wrote: > On 2018.03.10 15:55 Rafael J. Wysocki wrote: > >On Saturday, March 10, 2018 5:07:36 PM CET Doug Smythies wrote: > >> On 2018.03.10 01:00 Rafael J. Wysocki wrote: > > > ... [snip] ... > > > The information that they often spend more t

Re: 4.16-rc3 fails to resume on MacBookPro10,1 -

2018-03-11 Thread Rafael J. Wysocki
On Sunday, March 11, 2018 5:52:47 AM CET Andrew Worsley wrote: > > --94eb2c04c64405d3da05671bccce > Content-Type: text/plain; charset="UTF-8" > > On 11 March 2018 at 00:16, Pavel Machek wrote: > > Hi! > > > >> > Ok, I've just tested linux-next, and it works ok for me on thinkpad > >> > x60. (But

Re: [RFC/RFT][PATCH v3 5/6] sched: idle: Select idle state before stopping the tick

2018-03-11 Thread Rafael J. Wysocki
On Sunday, March 11, 2018 2:44:37 AM CET Frederic Weisbecker wrote: > On Fri, Mar 09, 2018 at 10:46:55AM +0100, Rafael J. Wysocki wrote: > > --- linux-pm.orig/kernel/time/tick-sched.h > > +++ linux-pm/kernel/time/tick-sched.h > > @@ -30,6 +30,7 @@ enum tick_nohz_mode { > > * when

Re: [RFC/RFT][PATCH v3 0/6] sched/cpuidle: Idle loop rework

2018-03-11 Thread Rafael J. Wysocki
On Sunday, March 11, 2018 11:21:36 AM CET Rafael J. Wysocki wrote: > On Sunday, March 11, 2018 8:43:02 AM CET Doug Smythies wrote: > > On 2018.03.10 15:55 Rafael J. Wysocki wrote: > > >On Saturday, March 10, 2018 5:07:36 PM CET Doug Smythies wrote: > > >> On 2018.03.10 01:00 Rafael J. Wysocki wrot

Re: 4.16-rc3 fails to resume on MacBookPro10,1 -

2018-03-11 Thread Pavel Machek
Hi! > >> This is 4.15 kernel with KPTI disabled: > >> % grep PAGE_TABLE .config > >> # CONFIG_PAGE_TABLE_ISOLATION is not set > >> > >> As I expected it appears no more infomative to me. > >> > >> What I really need is some clue as to what is supposed to be happening > >> at this point. > > > > Yo

[RFC PATCH 07/35] syscalls: do not call sys_renameat2() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/namei.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 921ae32dbc80..524e829ffc7d 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -4478,8 +4478,8 @@ int vfs_rename(struct ino

[RFC PATCH 16/35] syscalls: do not call sys_dup{,3}() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/file.c| 16 +--- include/linux/syscalls.h | 1 + init/do_mounts_initrd.c | 4 ++-- init/main.c | 4 ++-- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/fs/file.c b/fs/file.c i

[RFC PATCH 08/35] syscalls: do not call sys_futimesat() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/utimes.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/fs/utimes.c b/fs/utimes.c index e4b3d7c2c9f5..5be035ed26c0 100644 --- a/fs/utimes.c +++ b/fs/utimes.c @@ -184,8 +184,8 @@ SYSCALL_DEFINE4(utimens

[RFC PATCH 26/35] syscalls: do not call sys_rmdir() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/internal.h| 1 + fs/namei.c | 2 +- include/linux/syscalls.h | 6 ++ init/initramfs.c | 4 ++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/fs/internal.h b/fs/internal

[RFC PATCH 19/35] syscalls: do not call sys_unshare() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro CC: Andrew Morton CC: Ingo Molnar Signed-off-by: Dominik Brodowski --- drivers/base/devtmpfs.c | 2 +- include/linux/syscalls.h | 1 + init/do_mounts_initrd.c | 2 +- kernel/fork.c| 7 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/base

[RFC PATCH 06/35] syscalls: do not call sys_pipe2() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/pipe.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index 7b1954caf388..39d6f431da83 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -841,7 +841,7 @@ int do_pipe_flags(int *fd, int flags)

[RFC PATCH 09/35] syscalls: do not call sys_epoll_*() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/eventpoll.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 0f3494ed3ed0..602ca4285b2e 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1936,7 +1936,7

[RFC PATCH 35/35] syscalls: do not call sys_close() within the kernel

2018-03-11 Thread Dominik Brodowski
The few places which checked the return value did not care about the return value re-writing in sys_close(), so simply use a wrapper to __close_fd(). CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/autofs4/dev-ioctl.c | 2 +- fs/binfmt_misc.c | 2 +- fs/file.c

[RFC PATCH 25/35] hostfs: rename do_rmdir() to hostfs_do_rmdir()

2018-03-11 Thread Dominik Brodowski
do_rmdir() is used in the VFS layer at fs/namei.c, so use a different name in hostfs. CC: Jeff Dike CC: Richard Weinberger CC: user-mode-linux-de...@lists.sourceforge.net Signed-off-by: Dominik Brodowski --- fs/hostfs/hostfs.h | 2 +- fs/hostfs/hostfs_kern.c | 2 +- fs/hostfs/hostfs_user.

[RFC PATCH 23/35] syscalls: do not call sys_sync_file_range() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- arch/metag/kernel/sys_metag.c | 4 ++-- arch/mips/kernel/linux32.c | 2 +- arch/parisc/kernel/sys_parisc.c | 2 +- arch/powerpc/kernel/sys_ppc32.c | 2 +- arch/s390/kernel/compat_linux.c | 2 +- arch/sparc/kernel/sys

[RFC PATCH 33/35] syscalls: do not call sys_ftruncate() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- arch/mips/kernel/linux32.c | 2 +- arch/parisc/kernel/sys_parisc.c | 4 ++-- arch/powerpc/kernel/sys_ppc32.c | 2 +- arch/s390/kernel/compat_linux.c | 2 +- arch/sparc/kernel/sys_sparc32.c | 2 +- arch/tile/kernel/compat.c

[RFC PATCH 24/35] syscalls: do not call sys_unlink() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- include/linux/syscalls.h | 10 ++ init/do_mounts.h | 2 +- init/do_mounts_initrd.c | 4 ++-- init/do_mounts_rd.c | 2 +- init/initramfs.c | 4 ++-- 5 files changed, 16 insertions(+), 6 deletions

[RFC PATCH 18/35] syscalls: do not call sys_write() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Alexander Viro CC: linux-s...@vger.kernel.org Signed-off-by: Dominik Brodowski --- arch/s390/kernel/compat_linux.c | 2 +- fs/read_write.c | 9 +++-- include/linux/syscalls.h| 1 + init/do_mounts_rd.c | 4 ++-- init/initramfs.c| 2 +- 5

[RFC PATCH 27/35] syscalls: do not call sys_mkdir{,at}() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/internal.h| 1 + fs/namei.c | 9 +++-- include/linux/syscalls.h | 6 ++ init/do_mounts_initrd.c | 2 +- init/initramfs.c | 2 +- init/noinitramfs.c | 4 ++-- 6 files changed, 1

[RFC PATCH 21/35] syscalls: do not call sys_mmap_pgoff() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Andrew Morton CC: linux...@kvack.org Signed-off-by: Dominik Brodowski --- arch/alpha/kernel/osf_sys.c | 2 +- arch/arm64/kernel/sys.c | 2 +- arch/cris/kernel/sys_cris.c | 2 +- arch/frv/kernel/sys_frv.c | 4 ++-- arch/ia64/kernel/sys

[RFC PATCH 05/35] syscalls: do not call sys_readlinkat() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/stat.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/stat.c b/fs/stat.c index 873785dae022..f8e6fb2c3657 100644 --- a/fs/stat.c +++ b/fs/stat.c @@ -379,8 +379,8 @@ SYSCALL_DEFINE2(newfstat, unsigned

[RFC PATCH 15/35] syscalls: do not call sys_umount() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/namespace.c | 9 +++-- include/linux/syscalls.h | 1 + init/do_mounts_initrd.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index 642b8b229944..e398f32d7541 100644

[RFC PATCH 20/35] syscalls: do not call sys_fadvise64{,_64}() within the kernel

2018-03-11 Thread Dominik Brodowski
Some compat stubs called sys_fadvise64(), which then just passed through the arguments to sys_fadvise64_64(). Get rid of this indirection. CC: Andrew Morton CC: linux...@kvack.org Signed-off-by: Dominik Brodowski --- arch/arm/kernel/sys_arm.c | 2 +- arch/metag/kernel/sys_metag.c | 2

[RFC PATCH 28/35] syscalls: do not call sys_symlink{,at}() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/internal.h| 2 ++ fs/namei.c | 12 +--- include/linux/syscalls.h | 8 init/initramfs.c | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/fs/internal.

[RFC PATCH 29/35] syscalls: do not call sys_mknod{,at}() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/internal.h| 2 ++ fs/namei.c | 12 +--- include/linux/syscalls.h | 8 init/do_mounts.h | 2 +- init/initramfs.c | 2 +- init/noinitramfs.c | 2 +- 6 files

[RFC PATCH 13/35] syscalls: do not call sys_ioperm() within the kernel

2018-03-11 Thread Dominik Brodowski
While at it, use SYSCALL_DEFINE3() instead of a hand-crafted syscall definition. CC: Thomas Gleixner CC: Ingo Molnar CC: Greg Kroah-Hartman CC: Jiri Slaby CC: x...@kernel.org Signed-off-by: Dominik Brodowski --- arch/x86/include/asm/syscalls.h | 1 + arch/x86/kernel/ioport.c| 7 +

[RFC PATCH 01/35] syscalls: define goal to not call sys_xyzzy() from within the kernel

2018-03-11 Thread Dominik Brodowski
The syscall entry points to the kernel defined by SYSCALL_DEFINEx() and COMPAT_SYSCALL_DEFINEx() should only be called from userspace through kernel entry points, but not from the kernel itself. This will allow cleanups and optimizations to the entry paths *and* to the parts of the kernel code whic

[RFC PATCH 02/35] syscalls: use kernel_wait4() instead of sys_wait4()

2018-03-11 Thread Dominik Brodowski
All call sites of sys_wait4() set *rusage to NULL. Therefore, there is no need for the copy_to_user() handling of *rusage, and we can use kernel_wait4() directly. CC: Luis R. Rodriguez CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- kernel/exit.c | 2 +- kernel/pid

[RFC PATCH 17/35] syscalls: do not call sys_chroot() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Alexander Viro Signed-off-by: Dominik Brodowski --- drivers/base/devtmpfs.c | 2 +- fs/open.c| 7 ++- include/linux/syscalls.h | 1 + init/do_mounts.c | 2 +- init/do_mounts_initrd.c | 4 ++-- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drive

[RFC PATCH 32/35] syscalls: do not call sys_{f,}access{,at}() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/internal.h| 1 + fs/open.c| 9 +++-- include/linux/syscalls.h | 6 ++ init/main.c | 3 ++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/fs/internal.h b/fs/in

[RFC PATCH 14/35] syscalls: do not call sys_mount() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Alexander Viro Signed-off-by: Dominik Brodowski --- drivers/base/devtmpfs.c | 5 +++-- fs/namespace.c | 10 -- include/linux/syscalls.h | 3 +++ init/do_mounts.c | 4 ++-- init/do_mounts_initrd.c | 6 +++--- 5 files changed, 19 insertions(+), 9 deletions(-) d

[RFC PATCH 34/35] syscalls: do not call sys_{,l,f}chown() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- arch/s390/kernel/compat_linux.c | 6 +++--- fs/internal.h | 2 ++ fs/open.c | 23 +-- include/linux/syscalls.h| 14 ++ init/initramfs.c

[RFC PATCH 10/35] syscalls: do not call sys_signalfd4() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/signalfd.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fs/signalfd.c b/fs/signalfd.c index 76bf9cc62074..501c41f3351f 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c @@ -256,8 +256,8 @@ static const

[RFC PATCH 04/35] syscalls: do not call sys_getpgid() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro Signed-off-by: Dominik Brodowski --- kernel/sys.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kernel/sys.c b/kernel/sys.c index f2289de20e19..ebb138b841c8 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1027,7 +1027,7 @@ SYSCALL_DEFINE2(setpgid, pid_

[RFC PATCH 00/35] remove in-kernel syscall invocations

2018-03-11 Thread Dominik Brodowski
Here is a first set of patches which reduce the number of syscall invocations from within the kernel. The rationale for this change is described in patch 1 as follows: The syscall entry points to the kernel defined by SYSCALL_DEFINEx() and COMPAT_SYSCALL_DEFINEx() should only be c

[RFC PATCH 12/35] syscalls: do not call sys_rt_sigpending() within the kernel

2018-03-11 Thread Dominik Brodowski
A similar code path is already open-coded three times (in sys_rt_sigpending and in the two compat stubs), so do it a fourth time here. CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- include/linux/syscalls.h | 2 +- kernel/signal.c | 13 +++-- 2 files chang

[RFC PATCH 31/35] syscalls: do not call sys_{f,}chmod{at,}() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/internal.h| 2 ++ fs/open.c| 17 ++--- include/linux/syscalls.h | 7 +++ init/initramfs.c | 6 +++--- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/fs/i

[RFC PATCH 30/35] syscalls: do not call sys_link{,at}() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/internal.h| 2 ++ fs/namei.c | 12 +--- include/linux/syscalls.h | 8 init/initramfs.c | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/fs/internal.

[RFC PATCH 11/35] syscalls: do not call sys_eventfd2() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/eventfd.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/eventfd.c b/fs/eventfd.c index 012f5bd46dfa..08d3bd602f73 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -380,7 +380,7 @@ struct eventfd_ctx *even

[RFC PATCH 22/35] syscalls: do not call sys_chdir() within the kernel

2018-03-11 Thread Dominik Brodowski
CC: Al Viro CC: Andrew Morton Signed-off-by: Dominik Brodowski --- drivers/base/devtmpfs.c | 2 +- fs/open.c| 7 ++- include/linux/syscalls.h | 1 + init/do_mounts.c | 2 +- init/do_mounts_initrd.c | 8 5 files changed, 13 insertions(+), 7 deletions(-) di

[RFC PATCH 03/35] syscalls: mm_release(): use do_futex() instead of sys_futex()

2018-03-11 Thread Dominik Brodowski
sys_futex() is a wrapper to do_futex() which does not modify any values here: - uaddr, val and val3 are kept the same - op is masked with FUTEX_CMD_MASK, but is always set to FUTEX_WAKE. Therefore, val2 is always 0. - as utime is set to NULL, *timeout is NULL CC: Thomas Gleixner CC: Ingo Mol

Re: [PATCH v3] kernel.h: Skip single-eval logic on literals in min()/max()

2018-03-11 Thread Ingo Molnar
* Linus Torvalds wrote: > So an error message like > >warning: ISO C90 requires array sizes to be constant-expressions > > would be technically correct and useful from a portability angle. It > tells you when you're doing something non-portable, and should be > automatically enabled with "

[GIT PULL] CRIS: Drop support for the CRIS-port

2018-03-11 Thread Jesper Nilsson
Hi Arnd, As promised, pull the below tag for the removal of the CRIS-port. There are still a few references to the CRIS port left, and they can be grouped into two categories: - Examples or references to the CRIS port as provenance. These I believe can be left as is. - The workarounds fo

Re: [RFC PATCH 25/35] hostfs: rename do_rmdir() to hostfs_do_rmdir()

2018-03-11 Thread Richard Weinberger
Am Sonntag, 11. März 2018, 11:55:47 CET schrieb Dominik Brodowski: > do_rmdir() is used in the VFS layer at fs/namei.c, so use a different > name in hostfs. > > CC: Jeff Dike > CC: Richard Weinberger > CC: user-mode-linux-de...@lists.sourceforge.net > Signed-off-by: Dominik Brodowski Acked-by:

Re: [PATCH v5 08/11] wait_bit: introduce {wait_on,wake_up}_atomic_one

2018-03-11 Thread Peter Zijlstra
On Fri, Mar 09, 2018 at 10:55:32PM -0800, Dan Williams wrote: > Add a generic facility for awaiting an atomic_t to reach a value of 1. > > Page reference counts typically need to reach 0 to be considered a > free / inactive page. However, ZONE_DEVICE pages allocated via > devm_memremap_pages() are

Re: [PATCH v1] devpts: resolve devpts bind-mounts

2018-03-11 Thread Christian Brauner
On Fri, Mar 09, 2018 at 10:37:34AM -0800, Linus Torvalds wrote: > Hmm. This hunk annoys me and makes me go "Whaa?": > > On Fri, Mar 9, 2018 at 2:57 AM, Christian Brauner > wrote: > > @@ -163,6 +159,26 @@ struct vfsmount *devpts_mntget(struct file *filp, > > struct pts_fs_info *fsi) > > > >

Re: [PATCH v2 2/2] iio: chemical: sgp30: Support Sensirion SGPxx sensors

2018-03-11 Thread Jonathan Cameron
On Sat, 10 Mar 2018 23:07:30 +0100 Andreas Brauchli wrote: > Support Sensirion SGP30 and SGPC3 multi-pixel I2C gas sensors > > Supported Features: > > * Indoor Air Quality (IAQ) concentrations for > - tVOC (in_concentration_voc_input) > - CO2eq (in_concentration_co2_input) - SGP30 only >

Re: [RFC v2 14/83] Add range node kmem cache.

2018-03-11 Thread Nikolay Borisov
On 10.03.2018 20:17, Andiry Xu wrote: > From: Andiry Xu > > Range node specifies a range of [start, end]. and is managed by a red-black > tree. > NOVA uses range node to manage NVM allocator and inodes being used. > > Signed-off-by: Andiry Xu > --- > fs/nova/nova.h | 8 > fs/nova

Re: [RFC v2 05/83] Add NOVA filesystem definitions and useful helper routines.

2018-03-11 Thread Nikolay Borisov
[Adding Herbert Xu to CC since he is the maintainer of the crypto subsys maintainer] On 10.03.2018 20:17, Andiry Xu wrote: > +static inline u32 nova_crc32c(u32 crc, const u8 *data, size_t len) > +{ > + u8 *ptr = (u8 *) data; > + u64 acc = crc; /* accumulator, crc32c value in lower 32b */

Re: [RFC v2 16/83] Initialize block map and free lists in nova_init().

2018-03-11 Thread Nikolay Borisov
On 10.03.2018 20:17, Andiry Xu wrote: > From: Andiry Xu > > NOVA divides the pmem range equally among per-CPU free lists, > and format the red-black trees by inserting the initial free range. > > Signed-off-by: Andiry Xu > --- > fs/nova/balloc.c | 161 > +

Re: [PATCH 1/2] iio: chemical: sgpxx: Support Sensirion SGPxx sensors

2018-03-11 Thread Jonathan Cameron
On Sat, 10 Mar 2018 23:02:17 +0100 Andreas Brauchli wrote: > Dear Peter, Jonathan, > > Thanks for the thourough and speedy review and apologies for the delayed > reply. > > Many of your comments are integrated in the v2 patch series - details below. > ... > > > > > > > + > > > > +2.2. Indo

Re: [RFC v2 09/83] Add Kconfig and Makefile

2018-03-11 Thread Nikolay Borisov
On 10.03.2018 20:17, Andiry Xu wrote: > From: Andiry Xu > > Signed-off-by: Andiry Xu > --- > fs/Kconfig | 2 ++ > fs/Makefile | 1 + > fs/nova/Kconfig | 15 +++ > fs/nova/Makefile | 7 +++ > 4 files changed, 25 insertions(+) > create mode 100644 fs/nova/Kconfig

Re: [RFC PATCH] KVM: arm/arm64: vgic: change condition for level interrupt resampling

2018-03-11 Thread Marc Zyngier
On Sun, 11 Mar 2018 01:55:08 + Christoffer Dall wrote: > On Sat, Mar 10, 2018 at 12:20 PM, Marc Zyngier wrote: > > On Fri, 09 Mar 2018 21:36:12 +, > > Christoffer Dall wrote: > >> > >> On Thu, Mar 08, 2018 at 05:28:44PM +, Marc Zyngier wrote: > >> > I'd be more confident if we di

[PATCH] mm/slab.c: remove duplicated check of colour_next

2018-03-11 Thread Roman Lakeev
Date: Sun, 11 Mar 2018 11:05:29 +0300 Signed-off-by: Roman Lakeev remove check that offset greater than cachep->colour bacause this is already checked in previous lines --- mm/slab.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mm/slab.c b/mm/slab.c index 324446621b3e

Re: [GIT PULL] CRIS: Drop support for the CRIS-port

2018-03-11 Thread Mikael Starvik
RIP CRIS. Lots of fun memories! > 11 mars 2018 kl. 12:05 skrev Jesper Nilsson : > > Hi Arnd, > > As promised, pull the below tag for the removal of the CRIS-port. > There are still a few references to the CRIS port left, and they > can be grouped into two categories: > > - Examples or referenc

[PATCH v8 0/6] add support for relative references in special sections

2018-03-11 Thread Ard Biesheuvel
This adds support for emitting special sections such as initcall arrays, PCI fixups and tracepoints as relative references rather than absolute references. This reduces the size by 50% on 64-bit architectures, but more importantly, it removes the need for carrying relocation metadata for these sect

[PATCH v8 3/6] module: use relative references for __ksymtab entries

2018-03-11 Thread Ard Biesheuvel
An ordinary arm64 defconfig build has ~64 KB worth of __ksymtab entries, each consisting of two 64-bit fields containing absolute references, to the symbol itself and to a char array containing its name, respectively. When we build the same configuration with KASLR enabled, we end up with an addit

[PATCH v8 4/6] init: allow initcall tables to be emitted using relative references

2018-03-11 Thread Ard Biesheuvel
Allow the initcall tables to be emitted using relative references that are only half the size on 64-bit architectures and don't require fixups at runtime on relocatable kernels. Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: James Morris Cc: "Serge E. Hallyn" Signed-off-by: Ard

[PATCH v8 5/6] PCI: Add support for relative addressing in quirk tables

2018-03-11 Thread Ard Biesheuvel
Allow the PCI quirk tables to be emitted in a way that avoids absolute references to the hook functions. This reduces the size of the entries, and, more importantly, makes them invariant under runtime relocation (e.g., for KASLR) Acked-by: Bjorn Helgaas Signed-off-by: Ard Biesheuvel --- drivers

[PATCH v8 6/6] kernel: tracepoints: add support for relative references

2018-03-11 Thread Ard Biesheuvel
To avoid the need for relocating absolute references to tracepoint structures at boot time when running relocatable kernels (which may take a disproportionate amount of space), add the option to emit these tables as relative references instead. Cc: Ingo Molnar Acked-by: Steven Rostedt (VMware) S

[PATCH v8 1/6] arch: enable relative relocations for arm64, power and x86

2018-03-11 Thread Ard Biesheuvel
Before updating certain subsystems to use place relative 32-bit relocations in special sections, to save space and reduce the number of absolute relocations that need to be processed at runtime by relocatable kernels, introduce the Kconfig symbol and define it for some architectures that should be

[PATCH v8 2/6] module: allow symbol exports to be disabled

2018-03-11 Thread Ard Biesheuvel
To allow existing C code to be incorporated into the decompressor or the UEFI stub, introduce a CPP macro that turns all EXPORT_SYMBOL_xxx declarations into nops, and #define it in places where such exports are undesirable. Note that this gets rid of a rather dodgy redefine of linux/export.h's head

[PATCH] mm/slab.c: remove duplicated check of colour_next

2018-03-11 Thread Roman Lakeev
Sorry for strange message in previous mail. remove check that offset greater than cachep->colour bacause this is already checked in previous lines Signed-off-by: Roman Lakeev --- mm/slab.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mm/slab.c b/mm/slab.c index 32444

Re: 4.16-rc3 fails to resume on MacBookPro10,1 -

2018-03-11 Thread Andrew Worsley
On 11 March 2018 at 21:34, Pavel Machek wrote: > Hi! > >> >> Ok - all the test modes work but a full s2ram hangs (never comes back) >> and obviously the resume full save to disk fails. >> >> I attach the following files: >> >> echo reboot > /sys/power/disk >> echo disk > /sys/power/state >> T

Re: [PATCH v8 0/6] add support for relative references in special sections

2018-03-11 Thread Ard Biesheuvel
On 11 March 2018 at 12:38, Ard Biesheuvel wrote: ... > Cc: Arnd Bergmann > Cc: Kees Cook > Cc: Will Deacon > Cc: Michael Ellerman > Cc: Thomas Garnier > Cc: Thomas Gleixner > Cc: "Serge E. Hallyn" > Cc: Bjorn Helgaas > Cc: Benjamin Herrenschmidt > Cc: Russell King > Cc: Paul Mackerras >

Timing performance regression 4.15 to 4.16-rc1

2018-03-11 Thread Zdenek Kabelac
Hi I've noticed quite some drop of performance (around 15% in some cases) where execution of lvm2 tests took longer time - and while tests itself should not really load CPU system - the overall running time just got bigger. Running bisect game pointed clearly to this commit: --- commit 44c

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-11 Thread Maciej S. Szmigiero
On 11.03.2018 10:59, Ingo Molnar wrote: > > * Maciej S. Szmigiero wrote: > >> Currently, it is very easy to make the AMD microcode update driver crash >> or spin on a malformed microcode file since it does very little >> consistency checking on data loaded from such file. >> >> This commit intro

Re: [PATCH] irqchip/irq-imx-gpcv2: Remove unused function

2018-03-11 Thread Marc Zyngier
On Sat, 10 Mar 2018 20:31:27 +, Fabio Estevam wrote: > > Hi Marc, > > On Mon, Feb 12, 2018 at 11:22 AM, Marc Zyngier wrote: > > > I'll queue this up for -rc2, with this addition: > > > > Fixes: e324c4dc4a59 ("irqchip/imx-gpcv2: IMX GPCv2 driver for wakeup > > sources") > > It seems this on

[GIT PULL] irqchip updates for 4.16-rc5

2018-03-11 Thread Marc Zyngier
Thomas, Here's a few patches I've collected for the irqchip tree. Nothing fancy, just cleanups and a small corner case fix for the GICv3 ITS. Please pull, M. The following changes since commit 0b24a0bbe2147815d982d9335c41bb10c04f40bc: irqdomain: Re-use DEFINE_SHOW_ATTRIBUTE() macro (

Re: [PATCH 10/12] staging: iio: tsl2x7x: make logging consistent and correct newlines

2018-03-11 Thread Jonathan Cameron
On Sat, 10 Mar 2018 14:52:40 + Jonathan Cameron wrote: > On Sat, 3 Mar 2018 20:49:40 -0500 > Brian Masney wrote: > > > This patch updates all of the logging commands so that they are > > consistent with the other messages, includes __func__ in the message, > > and all of the messages inclu

RE: [PATCH v2 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics

2018-03-11 Thread Mario.Limonciello
> -Original Message- > From: platform-driver-x86-ow...@vger.kernel.org [mailto:platform-driver-x86- > ow...@vger.kernel.org] On Behalf Of Pali Rohár > Sent: Saturday, March 10, 2018 6:38 PM > To: Limonciello, Mario > Cc: kai.heng.f...@canonical.com; mj...@srcf.ucam.org; dvh...@infradead.or

RE: [PATCH v2 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics

2018-03-11 Thread Mario.Limonciello
> -Original Message- > From: Lukas Wunner [mailto:lu...@wunner.de] > Sent: Saturday, March 10, 2018 2:51 PM > To: Kai Heng Feng > Cc: Pali Rohár ; mj...@srcf.ucam.org; > dvh...@infradead.org; a...@infradead.org; Limonciello, Mario > ; ti...@suse.com; platform-driver- > x...@vger.kernel.org

Re: [PATCH v8 3/6] module: use relative references for __ksymtab entries

2018-03-11 Thread Ard Biesheuvel
On 11 March 2018 at 12:38, Ard Biesheuvel wrote: > An ordinary arm64 defconfig build has ~64 KB worth of __ksymtab > entries, each consisting of two 64-bit fields containing absolute > references, to the symbol itself and to a char array containing > its name, respectively. > > When we build the s

[PATCH] selftests: prevent carpal tunnel

2018-03-11 Thread Alexey Dobriyan
Shuah, please do ln -s tools/testing/selftests test It will save a lot of typing for everyone over the years. Signed-off-by: Alexey Dobriyan --- test |1 + 1 file changed, 1 insertion(+) new file mode 12 --- /dev/null +++ b/test @@ -0,0 +1 @@ +tools/testing/selftests \ No new

Re: [GIT PULL] CRIS: Drop support for the CRIS-port

2018-03-11 Thread Stephen Rothwell
Hi Jesper, On Sun, 11 Mar 2018 12:05:51 +0100 Jesper Nilsson wrote: > > As promised, pull the below tag for the removal of the CRIS-port. I guess the easiest thing for me to do is just remove the cris tree from linux-next at this point? -- Cheers, Stephen Rothwell pgpDLvpDB0wvq.pgp Descript

Re: [PATCH v2 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics

2018-03-11 Thread Pali Rohár
On Sunday 11 March 2018 14:03:13 mario.limoncie...@dell.com wrote: > > -Original Message- > > From: platform-driver-x86-ow...@vger.kernel.org [mailto:platform-driver-x86- > > ow...@vger.kernel.org] On Behalf Of Pali Rohár > > Sent: Saturday, March 10, 2018 6:38 PM > > To: Limonciello, Mario

Re: [Possible REGRESSION, 4.16-rc4] Error updating SMART data during runtime and could not connect to lvmetad at some boot attempts

2018-03-11 Thread Hans de Goede
Hi Martin, On 11-03-18 09:20, Martin Steigerwald wrote: Hello. Since 4.16-rc4 (upgraded from 4.15.2 which worked) I have an issue with SMART checks occassionally failing like this: smartd[28017]: Device: /dev/sdb [SAT], is in SLEEP mode, suspending checks udisksd[24408]: Error performing house

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

2018-03-11 Thread Vinod Koul
On Tue, Mar 06, 2018 at 11:03:22AM -0500, Frank Mori Hess wrote: > Do DMAFLUSHP _before_ the first DMAWFP to ensure controller > and peripheral are in agreement about dma request state before first > transfer. Add support for burst transfers to/from peripherals. In the new > scheme, the controller

Re: [RFC PATCH -tip 8/9] error-injection: Fix to not enabling preemption in pre_handler

2018-03-11 Thread Masami Hiramatsu
On Sat, 10 Mar 2018 09:22:48 +0100 Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > > > Since kprobes pre_handler doesn't need to recover preemption > > even if it modifies regs->ip anymore, this fixes to remove > > the preempt_enable_no_resched() from pre_handler. > > > > Signed-off-by: Ma

Re: [RFC PATCH -tip 0/9] kprobes: Cleanup jprobe implementation

2018-03-11 Thread Masami Hiramatsu
On Sat, 10 Mar 2018 09:24:44 +0100 Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > > > Hello, > > > > Since we decided to remove jprobe from kernel last year, > > its APIs are disabled and we worked on moving in-kernel > > jprobe users to kprobes or trace-events. And now no jprobe > > user

[PATCH 0/9] UML vector network driver: Adjustments for three function implementations

2018-03-11 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 11 Mar 2018 16:06:16 +0100 Some update suggestions were taken into account from static source code analysis. Markus Elfring (9): Delete unnecessary code in user_init_raw_fds() Less checks in user_init_raw_fds() after error detection Adjust an error message i

[PATCH 1/9] um/drivers/vector_user: Delete unnecessary code in user_init_raw_fds()

2018-03-11 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 11 Mar 2018 11:36:18 +0100 * One condition check could never be reached with a non-null pointer at the end of this function. Thus remove the corresponding statement. * Delete an initialisation for the local variable "result" which became unnecessary with this

[PATCH 2/9] um/drivers/vector_user: Less checks in user_init_raw_fds() after error detection

2018-03-11 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 11 Mar 2018 11:40:14 +0100 Up to two checks could be repeated by the user_init_raw_fds() function during error handling even if the relevant properties can be determined for the involved variables before by source code analysis. * Adjust jump targets so that an ex

[PATCH 3/9] um/drivers/vector_user: Adjust an error message in user_init_socket_fds()

2018-03-11 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 11 Mar 2018 13:53:08 +0100 * Adjust an error message at the end of this function. * Delete the local variable "err" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring --- arch/um/drivers/vector_user.c | 5 +++-- 1 file changed, 3 in

[PATCH 4/9] um/drivers/vector_user: Delete an unnecessary check before kfree() in user_init_socket_fds()

2018-03-11 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 11 Mar 2018 14:00:09 +0100 The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. Signed-off-by: Markus Elfring --- arch/um/drivers/vector_user.c | 3 +-- 1 file changed, 1 insertion(+),

Re: [RFC PATCH 13/35] syscalls: do not call sys_ioperm() within the kernel

2018-03-11 Thread Andy Lutomirski
On Sun, Mar 11, 2018 at 10:55 AM, Dominik Brodowski wrote: > While at it, use SYSCALL_DEFINE3() instead of a hand-crafted syscall > definition. Great! > static void complete_change_console(struct vc_data *vc); > @@ -420,12 +420,12 @@ int vt_ioctl(struct tty_struct *tty, >

[PATCH 5/9] um/drivers/vector_user: Delete two unnecessary checks before freeaddrinfo() in user_init_socket_fds()

2018-03-11 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 11 Mar 2018 14:20:46 +0100 The implementation returns from this function if a null pointer was detected in the local variable "gairesult". Thus the check before two calls of the function "freeaddrinfo" is not needed. Signed-off-by: Markus Elfring --- arch/um/dri

[PATCH 6/9] um/drivers/vector_user: Less checks in user_init_socket_fds() after error detection

2018-03-11 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 11 Mar 2018 14:56:38 +0100 Two checks could be repeated by the user_init_socket_fds() function during error handling even if the relevant properties can be determined for the involved variables before by source code analysis. * Adjust jump targets. * Delete two s

[PATCH -mm] proc: test last field of /proc/loadavg

2018-03-11 Thread Alexey Dobriyan
Test fork counter formerly known as ->last_pid, the only part of /proc/loadavg which can be tested. Testing in init pid namespace is not reliable because of background activity. Signed-off-by: Alexey Dobriyan --- tools/testing/selftests/proc/.gitignore |1 tools/testing/selftests/

[PATCH 7/9] um/drivers/vector_user: Adjust an error message in user_init_tap_fds()

2018-03-11 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 11 Mar 2018 15:10:05 +0100 Adjust an error message at the end of this function so that its name will be automatically determined as a parameter. Signed-off-by: Markus Elfring --- arch/um/drivers/vector_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(

[PATCH 8/9] um/drivers/vector_user: Less checks in user_init_tap_fds() after error detection

2018-03-11 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 11 Mar 2018 15:43:31 +0100 Three checks could be repeated by the user_init_tap_fds() function during error handling even if the relevant properties can be determined for the involved variables before by source code analysis. * Adjust jump targets. * Delete three

  1   2   3   4   5   6   >