Re: [PATCH v3 0/9] trace_uprobe: Support SDT markers having reference count (semaphore)

2018-05-03 Thread Ravi Bangoria
On 04/17/2018 10:02 AM, Ravi Bangoria wrote: > Userspace Statically Defined Tracepoints[1] are dtrace style markers > inside userspace applications. Applications like PostgreSQL, MySQL, > Pthread, Perl, Python, Java, Ruby, Node.js, libvirt, QEMU, glib etc > have these markers embedded in them. The

Spende für Sie

2018-05-03 Thread Domenico Curro'
Mein Name ist RICHARD WAHL. Ich habe eine Spende von 3,5 Millionen Euro für Sie gewonnen. Ich habe $ 533 Millionen Mega Millions Jackpot 2018 gewonnen. Ich habe derzeit keine Krebserkrankungen und mein Gesundheitszustand ist schlecht. Bitte mailen Sie mich an on- (richardwah...@gmail.com) -- T

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-03 Thread Andrey Konovalov
On Wed, May 2, 2018 at 7:25 PM, Andrey Konovalov wrote: > On Wed, May 2, 2018 at 5:36 PM, Kirill A. Shutemov > wrote: >> On Wed, May 02, 2018 at 02:38:42PM +, Andrey Konovalov wrote: >>> > Does having a tagged address here makes any difference? I couldn't hit a >>> > failure with my simple te

[PATCH v2 2/6] uaccess: add untagged_addr definition for other arches

2018-05-03 Thread Andrey Konovalov
To allow arm64 syscalls accept tagged pointers from userspace, we must untag them when they are passed to the kernel. Since untagging is done in generic parts of the kernel (like the mm subsystem), the untagged_addr macro should be defined for all architectures. Define it as a noop for other archi

[PATCH v2 0/6] arm64: untag user pointers passed to the kernel

2018-05-03 Thread Andrey Konovalov
Hi! arm64 has a feature called Top Byte Ignore, which allows to embed pointer tags into the top byte of each pointer. Userspace programs (such as HWASan, a memory debugging tool [1]) might use this feature and pass tagged user pointers to the kernel through syscalls or other interfaces. This patc

[PATCH v2 5/6] lib, arm64: untag addrs passed to strncpy_from_user and strnlen_user

2018-05-03 Thread Andrey Konovalov
strncpy_from_user and strnlen_user accept user addresses as arguments, and do not go through the same path as copy_from_user and others, so here we need to handle the case of tagged user addresses separately. Untag user pointers passed to these functions. Signed-off-by: Andrey Konovalov --- lib

[PATCH v2 3/6] arm64: untag user addresses in access_ok and __uaccess_mask_ptr

2018-05-03 Thread Andrey Konovalov
copy_from_user (and a few other similar functions) are used to copy data from user memory into the kernel memory or vice versa. Since a user can provided a tagged pointer to one of the syscalls that use copy_from_user, we need to correctly handle such pointers. Do this by untagging user pointers i

[PATCH v2 6/6] arm64: update Documentation/arm64/tagged-pointers.txt

2018-05-03 Thread Andrey Konovalov
Add a note that work on passing tagged user pointers to the kernel via syscalls has started, but might not be complete yet. Signed-off-by: Andrey Konovalov --- Documentation/arm64/tagged-pointers.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/arm64/tag

[PATCH v2 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-03 Thread Andrey Konovalov
mm/gup.c provides a kernel interface that accepts user addresses and manipulates user pages directly (for example get_user_pages, that is used by the futex syscall). Here we also need to handle the case of tagged user pointers. Add untagging to gup.c functions that use user pointers for vma lookup

[PATCH v2 1/6] arm64: add type casts to untagged_addr macro

2018-05-03 Thread Andrey Konovalov
This patch makes the untagged_addr macro accept all kinds of address types (void *, unsigned long, etc.) and allows not to specify type casts in each place where it is used. This is done by using __typeof__. Signed-off-by: Andrey Konovalov --- arch/arm64/include/asm/uaccess.h | 3 ++- 1 file cha

Re: [PATCH v3 9/9] perf probe: Support SDT markers having reference counter (semaphore)

2018-05-03 Thread Masami Hiramatsu
On Tue, 17 Apr 2018 10:02:44 +0530 Ravi Bangoria wrote: > From: Ravi Bangoria > > With this, perf buildid-cache will save SDT markers with reference > counter in probe cache. Perf probe will be able to probe markers > having reference counter. Ex, > > # readelf -n /tmp/tick | grep -A1 loop2

Re: [PATCH v3 8/9] trace_uprobe/sdt: Document about reference counter

2018-05-03 Thread Masami Hiramatsu
On Tue, 17 Apr 2018 10:02:43 +0530 Ravi Bangoria wrote: > From: Ravi Bangoria > > Reference counter gate the invocation of probe. If present, > by default reference count is 0. Kernel needs to increment > it before tracing the probe and decrement it when done. This > is identical to semaphore i

Re: [PATCH v3 2/9] mm: Prefix vma_ to vaddr_to_offset() and offset_to_vaddr()

2018-05-03 Thread Steven Rostedt
On Tue, 17 Apr 2018 10:02:37 +0530 Ravi Bangoria wrote: > From: Ravi Bangoria > > Make function names more meaningful by adding vma_ prefix > to them. Actually, I would have done this patch before the first one, since the first one makes the functions global. -- Steve > > Signed-off-by: Rav

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-03 Thread Kirill A. Shutemov
On Thu, May 03, 2018 at 04:09:56PM +0200, Andrey Konovalov wrote: > On Wed, May 2, 2018 at 7:25 PM, Andrey Konovalov > wrote: > > On Wed, May 2, 2018 at 5:36 PM, Kirill A. Shutemov > > wrote: > >> On Wed, May 02, 2018 at 02:38:42PM +, Andrey Konovalov wrote: > >>> > Does having a tagged addr

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-03 Thread Andrey Konovalov
On Thu, May 3, 2018 at 5:24 PM, Kirill A. Shutemov wrote: > On Thu, May 03, 2018 at 04:09:56PM +0200, Andrey Konovalov wrote: >> On Wed, May 2, 2018 at 7:25 PM, Andrey Konovalov >> wrote: >> I wasn't able to find anything that calls follow_page with pointers >> passed from userspace except for

Re: [PATCH v2 3/4] seccomp: Audit attempts to modify the actions_logged sysctl

2018-05-03 Thread Paul Moore
On Wed, May 2, 2018 at 2:18 PM, Steve Grubb wrote: > On Wednesday, May 2, 2018 11:53:19 AM EDT Tyler Hicks wrote: >> The decision to log a seccomp action will always be subject to the >> value of the kernel.seccomp.actions_logged sysctl, even for processes >> that are being inspected via the audit

Re: [PATCH v2 3/4] seccomp: Audit attempts to modify the actions_logged sysctl

2018-05-03 Thread Steve Grubb
On Thursday, May 3, 2018 4:18:26 PM EDT Paul Moore wrote: > On Wed, May 2, 2018 at 2:18 PM, Steve Grubb wrote: > > On Wednesday, May 2, 2018 11:53:19 AM EDT Tyler Hicks wrote: > >> The decision to log a seccomp action will always be subject to the > >> value of the kernel.seccomp.actions_logged sy

Re: [PATCH v2 3/4] seccomp: Audit attempts to modify the actions_logged sysctl

2018-05-03 Thread Paul Moore
On Thu, May 3, 2018 at 4:42 PM, Steve Grubb wrote: > On Thursday, May 3, 2018 4:18:26 PM EDT Paul Moore wrote: >> On Wed, May 2, 2018 at 2:18 PM, Steve Grubb wrote: >> > On Wednesday, May 2, 2018 11:53:19 AM EDT Tyler Hicks wrote: >> >> The decision to log a seccomp action will always be subject

Re: [PATCH v2 3/4] seccomp: Audit attempts to modify the actions_logged sysctl

2018-05-03 Thread Tyler Hicks
On 05/03/2018 03:48 PM, Paul Moore wrote: > On Thu, May 3, 2018 at 4:42 PM, Steve Grubb wrote: >> On Thursday, May 3, 2018 4:18:26 PM EDT Paul Moore wrote: >>> On Wed, May 2, 2018 at 2:18 PM, Steve Grubb wrote: On Wednesday, May 2, 2018 11:53:19 AM EDT Tyler Hicks wrote: > The decision t

Re: [PATCH v2 3/4] seccomp: Audit attempts to modify the actions_logged sysctl

2018-05-03 Thread Steve Grubb
On Thursday, May 3, 2018 4:51:36 PM EDT Tyler Hicks wrote: > On 05/03/2018 03:48 PM, Paul Moore wrote: > > On Thu, May 3, 2018 at 4:42 PM, Steve Grubb wrote: > >> On Thursday, May 3, 2018 4:18:26 PM EDT Paul Moore wrote: > >>> On Wed, May 2, 2018 at 2:18 PM, Steve Grubb wrote: > On Wednesday

Re: [PATCH v2 3/4] seccomp: Audit attempts to modify the actions_logged sysctl

2018-05-03 Thread Tyler Hicks
On 05/03/2018 04:12 PM, Steve Grubb wrote: > On Thursday, May 3, 2018 4:51:36 PM EDT Tyler Hicks wrote: >> On 05/03/2018 03:48 PM, Paul Moore wrote: >>> On Thu, May 3, 2018 at 4:42 PM, Steve Grubb wrote: On Thursday, May 3, 2018 4:18:26 PM EDT Paul Moore wrote: > On Wed, May 2, 2018 at 2:

Re: [PATCH v2 3/4] seccomp: Audit attempts to modify the actions_logged sysctl

2018-05-03 Thread Steve Grubb
On Thursday, May 3, 2018 6:36:18 PM EDT Tyler Hicks wrote: > On 05/03/2018 04:12 PM, Steve Grubb wrote: > > On Thursday, May 3, 2018 4:51:36 PM EDT Tyler Hicks wrote: > >> On 05/03/2018 03:48 PM, Paul Moore wrote: > >>> On Thu, May 3, 2018 at 4:42 PM, Steve Grubb wrote: > On Thursday, May 3,

Re: [PATCH v4 2/2] ThunderX2: Add Cavium ThunderX2 SoC UNCORE PMU driver

2018-05-03 Thread Kim Phillips
On Tue, 1 May 2018 12:54:05 +0100 Will Deacon wrote: > Hi Kim, Hi Will, thanks for responding. > On Fri, Apr 27, 2018 at 11:56:25AM -0500, Kim Phillips wrote: > > On Fri, 27 Apr 2018 17:09:14 +0100 > > Will Deacon wrote: > > > On Fri, Apr 27, 2018 at 10:46:29AM -0500, Kim Phillips wrote: > > >

[PATCH v3 3/4] seccomp: Audit attempts to modify the actions_logged sysctl

2018-05-03 Thread Tyler Hicks
The decision to log a seccomp action will always be subject to the value of the kernel.seccomp.actions_logged sysctl, even for processes that are being inspected via the audit subsystem, in an upcoming patch. Therefore, we need to emit an audit record on attempts at writing to the actions_logged sy

[PATCH v3 2/4] seccomp: Configurable separator for the actions_logged string

2018-05-03 Thread Tyler Hicks
The function that converts a bitmask of seccomp actions that are allowed to be logged is currently only used for constructing the display string for the kernel.seccomp.actions_logged sysctl. That string wants a space character to be used for the separator between actions. A future patch will make

[PATCH v3 4/4] seccomp: Don't special case audited processes when logging

2018-05-03 Thread Tyler Hicks
Seccomp logging for "handled" actions such as RET_TRAP, RET_TRACE, or RET_ERRNO can be very noisy for processes that are being audited. This patch modifies the seccomp logging behavior to treat processes that are being inspected via the audit subsystem the same as processes that aren't under inspec

[PATCH v3 0/4] Better integrate seccomp logging and auditing

2018-05-03 Thread Tyler Hicks
Seccomp received improved logging controls in v4.14. Applications can opt into logging of "handled" actions (SECCOMP_RET_TRAP, SECCOMP_RET_TRACE, SECCOMP_RET_ERRNO) using the SECCOMP_FILTER_FLAG_LOG bit when loading filters. They can also debug filter matching with the new SECCOMP_RET_LOG action. A

[PATCH v3 1/4] seccomp: Separate read and write code for actions_logged sysctl

2018-05-03 Thread Tyler Hicks
Break the read and write paths of the kernel.seccomp.actions_logged sysctl into separate functions to maintain readability. An upcoming change will need to audit writes, but not reads, of this sysctl which would introduce too many conditional code paths on whether or not the 'write' parameter evalu

Re: [PATCH v3 6/9] trace_uprobe: Support SDT markers having reference count (semaphore)

2018-05-03 Thread Masami Hiramatsu
Hi Ravi, I have some comments, please see below. On Tue, 17 Apr 2018 10:02:41 +0530 Ravi Bangoria wrote:\ > diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h > index 7bd2760..2db3ed1 100644 > --- a/include/linux/uprobes.h > +++ b/include/linux/uprobes.h > @@ -122,6 +122,8 @@ struct