Re: [PATCH] x86/vdso: Add prctl to set per-process VDSO load

2014-09-19 Thread Filipe Brandenburger
On Fri, Sep 19, 2014 at 8:27 PM, Andy Lutomirski wrote: >> I thought of doing that from the prctl but AFAICT remap_pfn_range >> requires that it's unmapped before the call (remap_pte_range has >> BUG_ON(!pte_none(*pte));) and doing a zap_page_range followed by >> remap_pfn_range might incur a race

Re: [PATCH] x86/vdso: Add prctl to set per-process VDSO load

2014-09-19 Thread Filipe Brandenburger
Hi Andy, On Fri, Sep 19, 2014 at 3:31 PM, Andy Lutomirski wrote: >> Sorry if I wasn't clear... That's the exact point of my patch, to make >> vm_special_mapping local to the task. >> >> I started with an approach of keeping a struct vm_special_mapping + a >> struct page * array per mm_struct. >>

Re: [PATCH] x86/vdso: Add prctl to set per-process VDSO load

2014-09-19 Thread Filipe Brandenburger
Hi, On Fri, Sep 19, 2014 at 3:09 PM, Andy Lutomirski wrote: > On Fri, Sep 19, 2014 at 3:02 PM, Filipe Brandenburger > wrote: >> In case that's useful, I was looking at swapping the vvar page by >> changing the vm_special_mapping to change the pages array between the >

Re: [PATCH] x86/vdso: Add prctl to set per-process VDSO load

2014-09-19 Thread Filipe Brandenburger
Hi Andy, On Fri, Sep 19, 2014 at 12:27 PM, Andy Lutomirski wrote: > I have this (special mapping tracking) 3/4 implemented. I'm planning > on making it fully functional for 64-bit programs and almost correct > for 32-bit. (You'll still crash if you have multiple threads, you use > sysenter, and

Re: [PATCH] x86/vdso: Add prctl to set per-process VDSO load

2014-09-17 Thread Filipe Brandenburger
Hi, On Wed, Sep 17, 2014 at 1:46 AM, H. Peter Anvin wrote: > Why would we need/want per process vvar contents? It seems better to > have the code swapped out. We are looking at the migration use case (CRIU). In specific, we want to make CLOCK_MONOTONIC keep the "monotonic" promise after migrat

Re: [PATCH] x86/vdso: Add prctl to set per-process VDSO load

2014-09-16 Thread Filipe Brandenburger
Hi Andy, On Tue, Sep 16, 2014 at 10:00 PM, Andy Lutomirski wrote: > I think that the patch should instead tweak the vvar mapping to tell > the vdso not to use rdtsc. It should be based on this: I've been working on this approach which extends the vvar from 2 to 3 pages. The third page would ini

[PATCH] xattr: fix check for simultaneous glibc header inclusion

2014-08-13 Thread Filipe Brandenburger
The guard was introduced in patch ea1a8217b06b41 ("xattr: guard against simultaneous glibc header inclusion") but it is using #ifdef to check for a define that is either set to 1 or 0. Fix it to use #if instead. Signed-off-by: Filipe Brandenburger Cc: Serge Hallyn Cc: Andrew Morton

[PATCH] core: fix typo in percpu read_mostly section

2014-07-01 Thread Filipe Brandenburger
atch: $ objdump -h vmlinux.o | grep '\.data\.\.read.*mostly' 38 .data..read_mostly 4438 00431ac0 2**6 Signed-off-by: Zhengyu He Signed-off-by: Filipe Brandenburger --- include/asm-generic/vmlinux.lds.h | 2 +- include/linux/percpu-defs.

[PATCH] core: fix typo in percpu read_mostly section

2014-06-23 Thread Filipe Brandenburger
atch: $ objdump -h vmlinux.o | grep '\.data\.\.read.*mostly' 38 .data..read_mostly 4438 00431ac0 2**6 Signed-off-by: Zhengyu He Signed-off-by: Filipe Brandenburger --- include/asm-generic/vmlinux.lds.h | 2 +- include/linux/percpu-defs.

aic94xx: maybe uninitialized variable in asd_process_ctrl_a_user

2014-04-10 Thread Filipe Brandenburger
Hi James, While building a recent kernel with -Werror I found this warning: drivers/scsi/aic94xx/aic94xx_sds.c: In function 'asd_read_flash': drivers/scsi/aic94xx/aic94xx_sds.c:597:21: error: 'offs' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/scsi/aic94xx/aic9

Re: [PATCH 1/3] tracing: correctly expand len expressions from __dynamic_array macro

2014-03-03 Thread Filipe Brandenburger
014 at 11:51 AM, Steven Rostedt wrote: > On Fri, 28 Feb 2014 21:32:16 -0800 > Filipe Brandenburger wrote: > >> This fixes expansion of the len argument in __dynamic_array macros. >> The previous code from commit 7d536cb3f would not fully evaluate the >> expression before

[PATCH 2/3] tracing: evaluate len expression only once in __dynamic_array macro

2014-02-28 Thread Filipe Brandenburger
Use a temporary variable to store the expansion of the len expression. If the evaluation is expensive, this commit will ensure it is evaluated only once inside ftrace_get_offsets_. Signed-off-by: Filipe Brandenburger --- include/trace/ftrace.h | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH 1/3] tracing: correctly expand len expressions from __dynamic_array macro

2014-02-28 Thread Filipe Brandenburger
one that was broken here) is only used by filter_pred_strloc which only acts on strings for which the size of the type is 1. Signed-off-by: Filipe Brandenburger --- include/trace/ftrace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/ftrace.h b/include/trace

[PATCH 0/3] tracing: fix macro expansion and refactor some of dynamic_array support

2014-02-28 Thread Filipe Brandenburger
t. Cheers, Filipe Filipe Brandenburger (3): tracing: correctly expand len expressions from __dynamic_array macro tracing: evaluate len expression only once in __dynamic_array macro tracing: introduce a trace_data_offset struct to store array size include/linux/ftrace_event.h

[PATCH 3/3] tracing: introduce a trace_data_offset struct to store array size

2014-02-28 Thread Filipe Brandenburger
exec/filter, enabled tracing, checked that calling pstree would log the trace event as expected. Signed-off-by: Filipe Brandenburger --- include/linux/ftrace_event.h | 5 + include/trace/ftrace.h | 28 ++-- kernel/trace/trace_events_filter.c | 13 ++

[PATCH 2/2] Btrfs: refactor error handling to drop inode in btrfs_create()

2012-11-29 Thread Filipe Brandenburger
Refactor it by checking whether the inode has been created and needs to be dropped (drop_inode_on_err) and also if the err variable is set. That way the variable doesn't need to be set on each and every error handling block. Signed-off-by: Filipe Brandenburger --- fs/btrfs/inode.c

[PATCH 1/2] Btrfs: fix permissions of empty files not affected by umask

2012-11-29 Thread Filipe Brandenburger
the inode (e.g. writing content changing the size or touching the file changing the mtime.) This fix adds a call to btrfs_update_inode() to btrfs_create() to make sure that the change will not get lost if the in-memory inode is flushed before other changes are made to the file. Signed-off-

[PATCH 0/2] Btrfs: fix mode umasking on empty files

2012-11-29 Thread Filipe Brandenburger
checking the ACLs before creating the inode (which might need a rework of btrfs_init_acl()) or umasking the bits unconditionally, but I guess there's a reason to apply that logic... The first patch fixes the issue, the second patch refactors the code to avoid the repetition of settin

[PATCHv3] locks: prevent side-effects of locks_release_private before file_lock is initialized

2012-07-26 Thread Filipe Brandenburger
described here: https://bugzilla.kernel.org/show_bug.cgi?id=43336 This patch reverts a commit from Oct 2004 (with subject "nfs4 lease: move the f_delown processing") which originally introduced the lm_release_private callback. Signed-off-by: Filipe Brandenburger --- fs/lock