Re: [PATCH 07/15] ARM: add kexec_file_load system call number

2019-01-10 Thread Will Deacon
On Thu, Jan 10, 2019 at 05:24:27PM +0100, Arnd Bergmann wrote: > A couple of architectures including arm64 already implement the > kexec_file_load system call, on many others we have assigned a system > call number for it, but not implemented it yet. > > Adding the number in arch/arm/ lets us use

Re: [PATCH 06/15] ARM: add migrate_pages() system call

2019-01-10 Thread Will Deacon
On Thu, Jan 10, 2019 at 05:24:26PM +0100, Arnd Bergmann wrote: > The migrate_pages system call has an assigned number on all architectures > except ARM. When it got added initially in commit d80ade7b3231 ("ARM: > Fix warning: #warning syscall migrate_pages not implemented"), it was > intentionally

[PATCH 11/15] mips: fix n32 compat_ipc_parse_version

2019-01-10 Thread Arnd Bergmann
While reading through the sysvipc implementation, I noticed that the n32 semctl/shmctl/msgctl system calls behave differently based on whether o32 support is enabled or not: Without o32, the IPC_64 flag passed by user space is rejected but calls without that flag get IPC_64 behavior. As far as I

[PATCH 12/15] sparc64: fix sparc_ipc type conversion

2019-01-10 Thread Arnd Bergmann
__kernel_timespec and timespec are currently the same type, but once they are different, the type cast has to be changed here. Signed-off-by: Arnd Bergmann --- arch/sparc/kernel/sys_sparc_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/kernel/sys_sparc_64.c

[PATCH 05/15] alpha: update syscall macro definitions

2019-01-10 Thread Arnd Bergmann
Other architectures commonly use __NR_umount2 for sys_umount, only ia64 and alpha use __NR_umount here. In order to synchronize the generated tables, use umount2 like everyone else, and add back the old name from asm/unistd.h for compatibility. For shmat, alpha uses the osf_shmat name, we can do

[PATCH 02/15] ia64: add statx and io_pgetevents syscalls

2019-01-10 Thread Arnd Bergmann
All architectures should implement these two, so assign numbers and hook them up on ia64. Signed-off-by: Arnd Bergmann --- arch/ia64/kernel/syscalls/syscall.tbl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/ia64/kernel/syscalls/syscall.tbl b/arch/ia64/kernel/syscalls/syscall.tbl

[PATCH 03/15] ia64: assign syscall numbers for perf and seccomp

2019-01-10 Thread Arnd Bergmann
Most architectures have assigned numbers for both seccomp and perf_event_open, even when they do not implement either. ia64 is an exception here, so for consistency lets add numbers for both of them. Unless CONFIG_PERF_EVENTS and CONFIG_SECCOMP are implemented, the system calls just return

[PATCH 06/15] ARM: add migrate_pages() system call

2019-01-10 Thread Arnd Bergmann
The migrate_pages system call has an assigned number on all architectures except ARM. When it got added initially in commit d80ade7b3231 ("ARM: Fix warning: #warning syscall migrate_pages not implemented"), it was intentionally left out based on the observation that there are no 32-bit ARM NUMA

[PATCH 04/15] alpha: wire up io_pgetevents system call

2019-01-10 Thread Arnd Bergmann
The io_pgetevents system call was added in linux-4.18 but has no entry for alpha: warning: #warning syscall io_pgetevents not implemented [-Wcpp] Assign a the next system call number here. Cc: sta...@vger.kernel.org Signed-off-by: Arnd Bergmann --- arch/alpha/kernel/syscalls/syscall.tbl | 1 +

[PATCH 08/15] m68k: assign syscall number for seccomp

2019-01-10 Thread Arnd Bergmann
Most architectures have assigned a numbers for the seccomp syscall even when they do not implement it. m68k is an exception here, so for consistency lets add the number. Unless CONFIG_SECCOMP is implemented, the system call just returns -ENOSYS. Signed-off-by: Arnd Bergmann ---

[PATCH 15/15] arch: add pkey and rseq syscall numbers everywhere

2019-01-10 Thread Arnd Bergmann
Most architectures define system call numbers for the rseq and pkey system calls, even when they don't support the features, and perhaps never will. Only a few architectures are missing these, so just define them anyway for consistency. If we decide to add them later to one of these, the system

[PATCH 00/15] arch: synchronize syscall tables in preparation for y2038

2019-01-10 Thread Arnd Bergmann
The system call tables have diverged a bit over the years, and a number of the recent additions never made it into all architectures, for one reason or another. This is an attempt to clean it up as far as we can without breaking compatibility, doing a number of steps: - Add system calls that

[PATCH 13/15] ipc: rename old-style shmctl/semctl/msgctl syscalls

2019-01-10 Thread Arnd Bergmann
The behavior of these system calls is slightly different between architectures, as determined by the CONFIG_ARCH_WANT_IPC_PARSE_VERSION symbol. Most architectures that implement the split IPC syscalls don't set that symbol and only get the modern version, but alpha, arm, microblaze, mips-n32,

[PATCH 14/15] arch: add split IPC system calls where needed

2019-01-10 Thread Arnd Bergmann
The IPC system call handling is highly inconsistent across architectures, some use sys_ipc, some use separate calls, and some use both. We also have some architectures that require passing IPC_64 in the flags, and others that set it implicitly. For the additon of a y2083 safe semtimedop() system

[PATCH 10/15] sh: add statx system call

2019-01-10 Thread Arnd Bergmann
statx is available on almost all other architectures but got missed on sh, so add it now. Signed-off-by: Arnd Bergmann --- arch/sh/kernel/syscalls/syscall.tbl | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sh/kernel/syscalls/syscall.tbl b/arch/sh/kernel/syscalls/syscall.tbl index

[PATCH 09/15] sh: remove duplicate unistd_32.h file

2019-01-10 Thread Arnd Bergmann
When I merged this patch, the file was accidentally left intact instead of being removed, which means any changes to syscall.tbl have no effect. Fixes: 2b3c5a99d5f3 ("sh: generate uapi header and syscall table header files") Signed-off-by: Arnd Bergmann --- arch/sh/include/uapi/asm/unistd_32.h

[PATCH 01/15] ia64: add __NR_umount2 definition

2019-01-10 Thread Arnd Bergmann
Other architectures commonly use __NR_umount2 for sys_umount, only ia64 and alpha use __NR_umount here. In order to synchronize the generated tables, use umount2 like everyone else, and add back the old name from asm/unistd.h for compatibility. The __IGNORE_* lines are now all obsolete and can be

[PATCH v5 06/12] arm: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-10 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew Murray

[PATCH v5 09/12] powerpc: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-10 Thread Andrew Murray
For PowerPC PMUs that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew

[PATCH v5 08/12] drivers/perf: perf/core: strengthen exclude checks with PERF_PMU_CAP_NO_EXCLUDE

2019-01-10 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. This change means that

[PATCH v5 01/12] perf/doc: update design.txt for exclude_{host|guest} flags

2019-01-10 Thread Andrew Murray
Update design.txt to reflect the presence of the exclude_host and exclude_guest perf flags. Signed-off-by: Andrew Murray --- tools/perf/design.txt | 4 1 file changed, 4 insertions(+) diff --git a/tools/perf/design.txt b/tools/perf/design.txt index a28dca2..0453ba2 100644 ---

[PATCH v5 10/12] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-10 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NOEXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. PMU drivers that support at

[PATCH v5 02/12] perf/core: add function to test for event exclusion flags

2019-01-10 Thread Andrew Murray
Add a function that tests if any of the perf event exclusion flags are set on a given event. Signed-off-by: Andrew Murray --- include/linux/perf_event.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 1d5c551..54a78d2

[PATCH v5 03/12] perf/core: add PERF_PMU_CAP_NO_EXCLUDE for exclusion incapable PMUs

2019-01-10 Thread Andrew Murray
Many PMU drivers do not have the capability to exclude counting events that occur in specific contexts such as idle, kernel, guest, etc. These drivers indicate this by returning an error in their event_init upon testing the events attribute flags. This approach is error prone and often

[PATCH v5 04/12] alpha: perf/core: strengthen exclude checks with PERF_PMU_CAP_NO_EXCLUDE

2019-01-10 Thread Andrew Murray
As the Alpha PMU doesn't support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. This change means that

[PATCH v5 07/12] drivers/perf: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-10 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew Murray

[PATCH v5 05/12] arm: perf: conditionally use PERF_PMU_CAP_NO_EXCLUDE

2019-01-10 Thread Andrew Murray
The ARM PMU driver can be used to represent a variety of ARM based PMUs. Some of these PMUs do not provide support for context exclusion, where this is the case we advertise the PERF_PMU_CAP_NO_EXCLUDE capability to ensure that perf prevents us from handling events where any exclusion flags are

[PATCH v5 11/12] x86: perf/core: strengthen exclude checks with PERF_PMU_CAP_NO_EXCLUDE

2019-01-10 Thread Andrew Murray
For x86 PMUs that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. This change means that

[PATCH v5 12/12] perf/core: remove unused perf_flags

2019-01-10 Thread Andrew Murray
Now that perf_flags is not used we remove it. Signed-off-by: Andrew Murray --- include/uapi/linux/perf_event.h | 2 -- tools/include/uapi/linux/perf_event.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index

[PATCH v5 00/12] perf/core: Generalise event exclusion checking

2019-01-10 Thread Andrew Murray
Many PMU drivers do not have the capability to exclude counting events that occur in specific contexts such as idle, kernel, guest, etc. These drivers indicate this by returning an error in their event_init upon testing the events attribute flags. However this approach requires that each time a

Re: [PATCH v4 10/13] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-10 Thread Michael Ellerman
Peter Zijlstra writes: > On Mon, Jan 07, 2019 at 04:27:27PM +, Andrew Murray wrote: >> For drivers that do not support context exclusion let's advertise the >> PERF_PMU_CAP_NOEXCLUDE capability. This ensures that perf will >> prevent us from handling events where any exclusion flags are set.

Re: [PATCH v4 13/13] drivers/perf: use PERF_PMU_CAP_NO_EXCLUDE for Cavium TX2 PMU

2019-01-10 Thread Will Deacon
On Mon, Jan 07, 2019 at 04:27:30PM +, Andrew Murray wrote: > The Cavium ThunderX2 UNCORE PMU driver doesn't support any event > filtering. Let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability to > simplify the code. > > Signed-off-by: Andrew Murray > --- > drivers/perf/thunderx2_pmu.c |

[PATCH 14/14] syscall_get_arch: add "struct task_struct *" argument

2019-01-09 Thread Dmitry V. Levin
This argument is required to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request: syscall_get_arch() is going to be called from ptrace_request() along with syscall_get_nr(), syscall_get_arguments(), syscall_get_error(), and syscall_get_return_value() functions with a tracee as their

Re: [PATCH v3 0/8] net: y2038-safe socket timestamps

2019-01-08 Thread David Miller
From: Deepa Dinamani Date: Mon, 7 Jan 2019 19:26:49 -0800 > The series introduces new socket timestamps that are > y2038 safe. Great discussion, but this is definitely net-next material and the net-next tree is not open at this time.

Re: [PATCH] socket: move compat timeout handling into sock.c

2019-01-08 Thread Deepa Dinamani
On Tue, Jan 8, 2019 at 12:10 PM Arnd Bergmann wrote: > > This is a cleanup to prepare for the addition of 64-bit time_t > in O_SNDTIMEO/O_RCVTIMEO. The existing compat handler seems > unnecessarily complex and error-prone, moving it all into the > main setsockopt()/getsockopt() implementation

Re: [PATCH 2/3] socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes

2019-01-08 Thread Deepa Dinamani
On Tue, Jan 8, 2019 at 12:04 PM Arnd Bergmann wrote: > > On Tue, Jan 8, 2019 at 6:24 AM Deepa Dinamani wrote: > > > > SO_RCVTIMEO and SO_SNDTIMEO socket options use struct timeval > > as the time format. struct timeval is not y2038 safe. > > The subsequent patches in the series add support for

[PATCH] socket: move compat timeout handling into sock.c

2019-01-08 Thread Arnd Bergmann
This is a cleanup to prepare for the addition of 64-bit time_t in O_SNDTIMEO/O_RCVTIMEO. The existing compat handler seems unnecessarily complex and error-prone, moving it all into the main setsockopt()/getsockopt() implementation requires half as much code and is easier to extend. 32-bit user

Re: [PATCH 2/3] socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes

2019-01-08 Thread Arnd Bergmann
On Tue, Jan 8, 2019 at 6:24 AM Deepa Dinamani wrote: > > SO_RCVTIMEO and SO_SNDTIMEO socket options use struct timeval > as the time format. struct timeval is not y2038 safe. > The subsequent patches in the series add support for new socket > timeout options with _NEW suffix that are y2038 safe.

Re: [PATCH v4 10/13] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-08 Thread Peter Zijlstra
On Tue, Jan 08, 2019 at 11:36:33AM -0500, Boris Ostrovsky wrote: > On 1/8/19 5:48 AM, Peter Zijlstra wrote: > > On the various exclude options; they are as follows (IIUC): > > > > - exclude_guest: we're a HV/host-kernel and we don't want the counter > >to run when we run a

Re: [PATCH v4 10/13] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-08 Thread Boris Ostrovsky
On 1/8/19 5:48 AM, Peter Zijlstra wrote: > On Mon, Jan 07, 2019 at 04:27:27PM +, Andrew Murray wrote: >> For drivers that do not support context exclusion let's advertise the >> PERF_PMU_CAP_NOEXCLUDE capability. This ensures that perf will >> prevent us from handling events where any

Re: [PATCH v4 05/13] arm: perf: conditionally use PERF_PMU_CAP_NO_EXCLUDE

2019-01-08 Thread Peter Zijlstra
On Tue, Jan 08, 2019 at 01:13:57PM +, Andrew Murray wrote: > On Tue, Jan 08, 2019 at 02:10:31PM +0100, Peter Zijlstra wrote: > > On Tue, Jan 08, 2019 at 01:07:41PM +, Andrew Murray wrote: > > > > > Yes I found lots of examples like this across the tree whilst doing this > > > work.

Re: [PATCH v3 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2019-01-08 Thread Willem de Bruijn
On Mon, Jan 7, 2019 at 10:29 PM Deepa Dinamani wrote: > > Add SO_TIMESTAMP_NEW and SO_TIMESTAMPNS_NEW variants of > socket timestamp options. > These are the y2038 safe versions of the SO_TIMESTAMP_OLD > and SO_TIMESTAMPNS_OLD for all architectures. > > Note that the format of

Re: [PATCH v3 0/8] net: y2038-safe socket timestamps

2019-01-08 Thread Willem de Bruijn
On Tue, Jan 8, 2019 at 8:37 AM Willem de Bruijn wrote: > > On Mon, Jan 7, 2019 at 10:29 PM Deepa Dinamani wrote: > > > > The series introduces new socket timestamps that are > > y2038 safe. > > > > The time data types used for the existing socket timestamp > > options: SO_TIMESTAMP,

Re: [PATCH v3 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2019-01-08 Thread Willem de Bruijn
On Mon, Jan 7, 2019 at 10:29 PM Deepa Dinamani wrote: > > Add SO_TIMESTAMP_NEW and SO_TIMESTAMPNS_NEW variants of > socket timestamp options. > These are the y2038 safe versions of the SO_TIMESTAMP_OLD > and SO_TIMESTAMPNS_OLD for all architectures. > > Note that the format of

Re: [PATCH v3 7/8] socket: Add SO_TIMESTAMPING_NEW

2019-01-08 Thread Willem de Bruijn
On Mon, Jan 7, 2019 at 10:29 PM Deepa Dinamani wrote: > > Add SO_TIMESTAMPING_NEW variant of socket timestamp options. > This is the y2038 safe versions of the SO_TIMESTAMPING_OLD > for all architectures. > > Signed-off-by: Deepa Dinamani > Cc: ch...@zankel.net > Cc: fenghua...@intel.com > Cc:

Re: [PATCH v3 0/8] net: y2038-safe socket timestamps

2019-01-08 Thread Willem de Bruijn
On Mon, Jan 7, 2019 at 10:29 PM Deepa Dinamani wrote: > > The series introduces new socket timestamps that are > y2038 safe. > > The time data types used for the existing socket timestamp > options: SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING > are not y2038 safe. The series introduces

Re: [PATCH v4 05/13] arm: perf: conditionally use PERF_PMU_CAP_NO_EXCLUDE

2019-01-08 Thread Andrew Murray
On Tue, Jan 08, 2019 at 02:10:31PM +0100, Peter Zijlstra wrote: > On Tue, Jan 08, 2019 at 01:07:41PM +, Andrew Murray wrote: > > > Yes I found lots of examples like this across the tree whilst doing this > > work. However I decided to initially start with simply removing duplicated > > code

Re: [PATCH v4 10/13] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-08 Thread Andrew Murray
On Tue, Jan 08, 2019 at 11:48:41AM +0100, Peter Zijlstra wrote: > On Mon, Jan 07, 2019 at 04:27:27PM +, Andrew Murray wrote: > > For drivers that do not support context exclusion let's advertise the > > PERF_PMU_CAP_NOEXCLUDE capability. This ensures that perf will > > prevent us from handling

Re: [PATCH v4 05/13] arm: perf: conditionally use PERF_PMU_CAP_NO_EXCLUDE

2019-01-08 Thread Peter Zijlstra
On Tue, Jan 08, 2019 at 01:07:41PM +, Andrew Murray wrote: > Yes I found lots of examples like this across the tree whilst doing this > work. However I decided to initially start with simply removing duplicated > code as a result of adding this flag and attempting to preserve existing >

Re: [PATCH v4 11/13] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-08 Thread Andrew Murray
On Tue, Jan 08, 2019 at 11:49:40AM +0100, Peter Zijlstra wrote: > On Mon, Jan 07, 2019 at 04:27:28PM +, Andrew Murray wrote: > > This patch has the exact same subject as the previous one.. that seems > sub-optimal. Ah yes, I'll update that in subsquent revisions. (The reason for two patches

Re: [PATCH v4 05/13] arm: perf: conditionally use PERF_PMU_CAP_NO_EXCLUDE

2019-01-08 Thread Andrew Murray
On Tue, Jan 08, 2019 at 11:28:02AM +0100, Peter Zijlstra wrote: > On Mon, Jan 07, 2019 at 04:27:22PM +, Andrew Murray wrote: > > @@ -393,9 +386,8 @@ __hw_perf_event_init(struct perf_event *event) > > /* > > * Check whether we need to exclude the counter from certain modes. > > */

Re: [PATCH v4 10/13] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-08 Thread Peter Zijlstra
On Mon, Jan 07, 2019 at 04:27:27PM +, Andrew Murray wrote: > For drivers that do not support context exclusion let's advertise the > PERF_PMU_CAP_NOEXCLUDE capability. This ensures that perf will > prevent us from handling events where any exclusion flags are set. > Let's also remove the now

Re: [PATCH v4 11/13] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-08 Thread Peter Zijlstra
On Mon, Jan 07, 2019 at 04:27:28PM +, Andrew Murray wrote: This patch has the exact same subject as the previous one.. that seems sub-optimal.

Re: [PATCH v4 05/13] arm: perf: conditionally use PERF_PMU_CAP_NO_EXCLUDE

2019-01-08 Thread Peter Zijlstra
On Mon, Jan 07, 2019 at 04:27:22PM +, Andrew Murray wrote: > @@ -393,9 +386,8 @@ __hw_perf_event_init(struct perf_event *event) > /* >* Check whether we need to exclude the counter from certain modes. >*/ > + if (armpmu->set_event_filter && > +

[PATCH 2/3] socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes

2019-01-07 Thread Deepa Dinamani
SO_RCVTIMEO and SO_SNDTIMEO socket options use struct timeval as the time format. struct timeval is not y2038 safe. The subsequent patches in the series add support for new socket timeout options with _NEW suffix that are y2038 safe. Rename the existing options with _OLD suffix forms so that the

[PATCH v3 7/8] socket: Add SO_TIMESTAMPING_NEW

2019-01-07 Thread Deepa Dinamani
Add SO_TIMESTAMPING_NEW variant of socket timestamp options. This is the y2038 safe versions of the SO_TIMESTAMPING_OLD for all architectures. Signed-off-by: Deepa Dinamani Cc: ch...@zankel.net Cc: fenghua...@intel.com Cc: r...@twiddle.net Cc: t...@linutronix.de Cc: ubr...@linux.ibm.com Cc:

[PATCH v3 2/8] sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD

2019-01-07 Thread Deepa Dinamani
SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING options, the way they are currently defined, are not y2038 safe. Subsequent patches in the series add new y2038 safe versions of these options which provide 64 bit timestamps on all architectures uniformly. Hence, rename existing options with OLD

[PATCH v3 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2019-01-07 Thread Deepa Dinamani
Add SO_TIMESTAMP_NEW and SO_TIMESTAMPNS_NEW variants of socket timestamp options. These are the y2038 safe versions of the SO_TIMESTAMP_OLD and SO_TIMESTAMPNS_OLD for all architectures. Note that the format of scm_timestamping.ts[0] is not changed in this patch. Signed-off-by: Deepa Dinamani

[PATCH v3 0/8] net: y2038-safe socket timestamps

2019-01-07 Thread Deepa Dinamani
The series introduces new socket timestamps that are y2038 safe. The time data types used for the existing socket timestamp options: SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING are not y2038 safe. The series introduces SO_TIMESTAMP_NEW, SO_TIMESTAMPNS_NEW and SO_TIMESTAMPING_NEW to replace

Re: [PATCH RFC 3/4] barriers: convert a control to a data dependency

2019-01-07 Thread Michael S. Tsirkin
On Mon, Jan 07, 2019 at 11:02:36AM -0800, Paul E. McKenney wrote: > On Mon, Jan 07, 2019 at 08:36:36AM -0500, Michael S. Tsirkin wrote: > > On Mon, Jan 07, 2019 at 10:46:10AM +0100, Peter Zijlstra wrote: > > > On Sun, Jan 06, 2019 at 11:23:07PM -0500, Michael S. Tsirkin wrote: > > > > On Mon, Jan

Re: [PATCH RFC 3/4] barriers: convert a control to a data dependency

2019-01-07 Thread Paul E. McKenney
On Mon, Jan 07, 2019 at 08:36:36AM -0500, Michael S. Tsirkin wrote: > On Mon, Jan 07, 2019 at 10:46:10AM +0100, Peter Zijlstra wrote: > > On Sun, Jan 06, 2019 at 11:23:07PM -0500, Michael S. Tsirkin wrote: > > > On Mon, Jan 07, 2019 at 11:58:23AM +0800, Jason Wang wrote: > > > > On 2019/1/3

[PATCH v4 08/13] drivers/perf: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-07 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. This change means that

[PATCH v4 13/13] drivers/perf: use PERF_PMU_CAP_NO_EXCLUDE for Cavium TX2 PMU

2019-01-07 Thread Andrew Murray
The Cavium ThunderX2 UNCORE PMU driver doesn't support any event filtering. Let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability to simplify the code. Signed-off-by: Andrew Murray --- drivers/perf/thunderx2_pmu.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git

[PATCH v4 05/13] arm: perf: conditionally use PERF_PMU_CAP_NO_EXCLUDE

2019-01-07 Thread Andrew Murray
The ARM PMU driver can be used to represent a variety of ARM based PMUs. Some of these PMUs do not provide support for context exclusion, where this is the case we advertise the PERF_PMU_CAP_NO_EXCLUDE capability to ensure that perf prevents us from handling events where any exclusion flags are

[PATCH v4 11/13] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-07 Thread Andrew Murray
For x86 PMUs that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. This change means that

[PATCH v4 09/13] powerpc: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-07 Thread Andrew Murray
For PowerPC PMUs that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew

[PATCH v4 12/13] perf/core: remove unused perf_flags

2019-01-07 Thread Andrew Murray
Now that perf_flags is not used we remove it. Signed-off-by: Andrew Murray --- include/uapi/linux/perf_event.h | 2 -- tools/include/uapi/linux/perf_event.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index

[PATCH v4 07/13] drivers/perf: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-07 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew Murray

[PATCH v4 06/13] arm: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-07 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew Murray

[PATCH v4 02/13] perf/core: add function to test for event exclusion flags

2019-01-07 Thread Andrew Murray
Add a function that tests if any of the perf event exclusion flags are set on a given event. Signed-off-by: Andrew Murray --- include/linux/perf_event.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 1d5c551..54a78d2

[PATCH v4 03/13] perf/core: add PERF_PMU_CAP_NO_EXCLUDE for exclusion incapable PMUs

2019-01-07 Thread Andrew Murray
Many PMU drivers do not have the capability to exclude counting events that occur in specific contexts such as idle, kernel, guest, etc. These drivers indicate this by returning an error in their event_init upon testing the events attribute flags. This approach is error prone and often

[PATCH v4 00/13] perf/core: Generalise event exclusion checking

2019-01-07 Thread Andrew Murray
Many PMU drivers do not have the capability to exclude counting events that occur in specific contexts such as idle, kernel, guest, etc. These drivers indicate this by returning an error in their event_init upon testing the events attribute flags. However this approach requires that each time a

[PATCH v4 01/13] perf/doc: update design.txt for exclude_{host|guest} flags

2019-01-07 Thread Andrew Murray
Update design.txt to reflect the presence of the exclude_host and exclude_guest perf flags. Signed-off-by: Andrew Murray --- tools/perf/design.txt | 4 1 file changed, 4 insertions(+) diff --git a/tools/perf/design.txt b/tools/perf/design.txt index a28dca2..0453ba2 100644 ---

Re: [PATCH RFC 3/4] barriers: convert a control to a data dependency

2019-01-07 Thread Peter Zijlstra
On Mon, Jan 07, 2019 at 08:36:36AM -0500, Michael S. Tsirkin wrote: > On Mon, Jan 07, 2019 at 10:46:10AM +0100, Peter Zijlstra wrote: > > How about naming the thing: dependent_ptr() ? That is without any (r)mb > > implications at all. The address dependency is strictly weaker than an > > rmb in

Re: [PATCH v7 03/22] alpha: define remaining syscall_get_* functions

2019-01-07 Thread kbuild test robot
Hi Dmitry, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.0-rc1 next-20190103] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH v7 03/22] alpha: define remaining syscall_get_* functions

2019-01-06 Thread Dmitry V. Levin
syscall_get_* functions are required to be implemented on all architectures in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. This adds remaining 4 syscall_get_* functions as documented in asm-generic/syscall.h: syscall_get_nr, syscall_get_arguments,

Re: [PATCH RFC 3/4] barriers: convert a control to a data dependency

2019-01-02 Thread Michael S. Tsirkin
On Wed, Jan 02, 2019 at 01:00:24PM -0800, Matthew Wilcox wrote: > On Wed, Jan 02, 2019 at 03:57:58PM -0500, Michael S. Tsirkin wrote: > > @@ -875,6 +893,8 @@ to the CPU containing it. See the section on > > "Multicopy atomicity" > > for more information. > > > > > > + > > + > > In summary:

Re: [PATCH RFC 3/4] barriers: convert a control to a data dependency

2019-01-02 Thread Matthew Wilcox
On Wed, Jan 02, 2019 at 03:57:58PM -0500, Michael S. Tsirkin wrote: > @@ -875,6 +893,8 @@ to the CPU containing it. See the section on "Multicopy > atomicity" > for more information. > > > + > + > In summary: > >(*) Control dependencies can order prior loads against later stores.

[PATCH RFC 3/4] barriers: convert a control to a data dependency

2019-01-02 Thread Michael S. Tsirkin
It's not uncommon to have two access two unrelated memory locations in a specific order. At the moment one has to use a memory barrier for this. However, if the first access was a read and the second used an address depending on the first one we would have a data dependency and no barrier would

Re: [PULL] alpha.git

2018-12-31 Thread pr-tracker-bot
The pull request you sent on Sun, 30 Dec 2018 17:25:19 -0500: > https://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha.git for-linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/f12e840c819bab42621685558a01d3f46ab9a226 Thank you! -- Deet-doot-dot, I am a

[PATCH v2] alpha: fix page fault handling for r16-r18 targets

2018-12-31 Thread Sergei Trofimovich
Fix page fault handling code to fixup r16-r18 registers. Before the patch code had off-by-two registers bug. This bug caused overwriting of ps,pc,gp registers instead of fixing intended r16,r17,r18 (see `struct pt_regs`). More details: Initially Dmitry noticed a kernel bug as a failure on strace

[PULL] alpha.git

2018-12-30 Thread Matt Turner
Hi Linus, Please pull a few small changes for alpha as well as the new system call table generation support from Firoz Khan. Thanks, Matt The following changes since commit 9097a058d49e049925d8da72db07fffcee24efa0: Merge branch 'i2c/for-current' of

Re: [PATCH v3 0/5] alpha: system call table generation support

2018-12-22 Thread Stephen Rothwell
Hi Matt, On Fri, 21 Dec 2018 11:46:59 -0500 Matt Turner wrote: > > Probably so. This is just a super part-time thing for me, so I've > never figured out what I needed to do to be included in linux-next. The requirements are: "You will need to ensure that the patches/commits in your tree/series

Re: ensure dma_alloc_coherent always returns zeroed memory

2018-12-20 Thread h...@lst.de
Btw, can you try wit the very latests dma-mapping-for-next tree which has a new fix from Thierry Reding that might be related.

Re: ensure dma_alloc_coherent always returns zeroed memory

2018-12-20 Thread Eugeniy Paltsev
On Thu, 2018-12-20 at 15:34 +0100, h...@lst.de wrote: > On Thu, Dec 20, 2018 at 02:32:52PM +, Eugeniy Paltsev wrote: > > Hi Christoph, > > > > I test kernel from your 'dma-alloc-always-zero' branch, and as > > I can see we have DMA peripherals (like USB) broken. > > I would be really

Re: ensure dma_alloc_coherent always returns zeroed memory

2018-12-20 Thread Eugeniy Paltsev
Hi Christoph, I test kernel from your 'dma-alloc-always-zero' branch, and as I can see we have DMA peripherals (like USB) broken. There are the errors example I got during USB initializing: -->8 usb 1-1: device descriptor read/64, error

Re: [PATCH v3 0/5] alpha: system call table generation support

2018-12-19 Thread Arnd Bergmann
On Wed, Dec 19, 2018 at 4:59 PM Matt Turner wrote: > On Fri, Dec 14, 2018 at 10:18 AM Firoz Khan wrote: > > On Tue, 13 Nov 2018 at 15:02, Firoz Khan wrote: > > > > Could someone review this patch series and queue it for 4.21 > > through alpha tree would be great. > > Thank you! I'll take a

Re: ensure dma_alloc_coherent always returns zeroed memory

2018-12-19 Thread Christoph Hellwig
FYI, I've picked this up for dma-mapping for-next now.

Re: [PATCH v3 0/5] alpha: system call table generation support

2018-12-19 Thread Matt Turner
On Fri, Dec 14, 2018 at 10:18 AM Firoz Khan wrote: > > Hi Folks, > > On Tue, 13 Nov 2018 at 15:02, Firoz Khan wrote: > > > > The purpose of this patch series is, we can easily > > add/modify/delete system call table support by cha- > > nging entry in syscall.tbl file instead of manually > >

Re: [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-18 Thread Deepa Dinamani
On Tue, Dec 18, 2018 at 8:33 AM Arnd Bergmann wrote: > > On Sat, Dec 15, 2018 at 7:52 PM Willem de Bruijn > wrote: > > > > > 3 reasons for not doing this: > > > > > > 1. We do not want to break userspace. If we move this to > > > linux/socket.h all the userspace programs now have to include > >

Re: [PATCH v2 7/8] socket: Add SO_TIMESTAMPING_NEW

2018-12-18 Thread Deepa Dinamani
On Tue, Dec 18, 2018 at 8:16 AM Arnd Bergmann wrote: > > On Wed, Dec 12, 2018 at 4:25 PM Willem de Bruijn > wrote: > > On Tue, Dec 11, 2018 at 3:30 PM Deepa Dinamani > > wrote: > > > > @@ -851,39 +890,7 @@ int sock_setsockopt(struct socket *sock, int level, > > > int optname, > > >

Re: [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-18 Thread Arnd Bergmann
On Sat, Dec 15, 2018 at 7:52 PM Willem de Bruijn wrote: > > > 3 reasons for not doing this: > > > > 1. We do not want to break userspace. If we move this to > > linux/socket.h all the userspace programs now have to include > > linux/socket.h or get this definition through a new libc. > > 2. All

Re: [PATCH v2 7/8] socket: Add SO_TIMESTAMPING_NEW

2018-12-18 Thread Arnd Bergmann
On Wed, Dec 12, 2018 at 4:25 PM Willem de Bruijn wrote: > On Tue, Dec 11, 2018 at 3:30 PM Deepa Dinamani wrote: > > @@ -851,39 +890,7 @@ int sock_setsockopt(struct socket *sock, int level, > > int optname, > > break; > > > > case SO_TIMESTAMPING_OLD: > > -

[PATCH V3 1/2] mm: Replace all open encodings for NUMA_NO_NODE

2018-12-18 Thread Anshuman Khandual
At present there are multiple places where invalid node number is encoded as -1. Even though implicitly understood it is always better to have macros in there. Replace these open encodings for an invalid node number with the global macro NUMA_NO_NODE. This helps remove NUMA related assumptions

[PATCH V3 2/2] Tools: Replace open encodings for NUMA_NO_NODE

2018-12-18 Thread Anshuman Khandual
From: Stephen Rothwell This replaces all open encodings in tools with NUMA_NO_NODE. Also linux/numa.h is now needed for the perf build. Signed-off-by: Anshuman Khandual Signed-off-by: Stephen Rothwell --- tools/include/linux/numa.h | 16 tools/perf/bench/numa.c| 6

[PATCH V3 0/2] Replace all open encodings for NUMA_NO_NODE

2018-12-18 Thread Anshuman Khandual
Changes in V3: - Dropped all references to NUMA_NO_NODE as per Lubomir Rinetl - Split the patch into two creating a new one specifically for tools - Folded Stephen's linux-next build fix into the second patch Changes in V2: (https://patchwork.kernel.org/patch/10698089/) - Added inclusion of

Re: [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-15 Thread Deepa Dinamani
> > Also for the other comment. The reason the conditionals were not > > consistent is because they were not consistent to begin with. > > The only difference I see is an inversion of the test. Nesting order > is the same: > > int need_software_tstamp = sock_flag(sk, SOCK_RCVTSTAMP); >

Re: [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-15 Thread Willem de Bruijn
> 3 reasons for not doing this: > > 1. We do not want to break userspace. If we move this to > linux/socket.h all the userspace programs now have to include > linux/socket.h or get this definition through a new libc. > 2. All the socket options are together in the file asm/socket.h. It > doesn't

Re: [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-15 Thread Deepa Dinamani
On Sat, Dec 15, 2018 at 7:12 AM Willem de Bruijn wrote: > > On Fri, Dec 14, 2018 at 8:07 PM Deepa Dinamani wrote: > > > > > > diff --git a/arch/alpha/include/uapi/asm/socket.h > > > > b/arch/alpha/include/uapi/asm/socket.h > > > > index 00e45c80e574..352e3dc0b3d9 100644 > > > > ---

Re: [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-15 Thread Willem de Bruijn
On Fri, Dec 14, 2018 at 8:07 PM Deepa Dinamani wrote: > > > > diff --git a/arch/alpha/include/uapi/asm/socket.h > > > b/arch/alpha/include/uapi/asm/socket.h > > > index 00e45c80e574..352e3dc0b3d9 100644 > > > --- a/arch/alpha/include/uapi/asm/socket.h > > > +++

<    7   8   9   10   11   12   13   14   15   16   >