Re: [PATCH 3/4] Add 32 bit VDSO time support for 32 bit kernel

2014-02-01 Thread Andy Lutomirski
On Sat, Feb 1, 2014 at 4:26 PM, H. Peter Anvin h...@zytor.com wrote: On 02/01/2014 03:59 PM, Andy Lutomirski wrote: If it is, indeed, okay to use non-fixed maps on 32-bit, it might also be okay on 64-bit. If so, it could be useful to implement that, which would remove a bit of a wart

Why is syscall auditing on with no rules?

2014-02-01 Thread Andy Lutomirski
On a stock Fedora installation: $ sudo auditctl -l No rules Nonetheless TIF_SYSCALL_AUDIT is set and the __audit_syscall_entry and __audit_syscall_exit account for 20% of syscall overhead according to perf. This sucks. Unless I'm missing something, syscall auditing is *off*. How hard would it

Re: Why is syscall auditing on with no rules?

2014-02-01 Thread Andy Lutomirski
On Sat, Feb 1, 2014 at 6:32 PM, Andy Lutomirski l...@amacapital.net wrote: On a stock Fedora installation: $ sudo auditctl -l No rules Nonetheless TIF_SYSCALL_AUDIT is set and the __audit_syscall_entry and __audit_syscall_exit account for 20% of syscall overhead according to perf

Re: [PATCH 6/8] cleanup __vdso_gettimeofday

2014-02-02 Thread Andy Lutomirski
-by: Stefani Seibold stef...@seibold.net Acked-by: Andy Lutomirski l...@amacapital.net --- arch/x86/vdso/vclock_gettime.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c index 743f277..bf969a0 100644

Re: [PATCH 4/8] vclock_gettime.c __vdso_clock_gettime cleanup

2014-02-02 Thread Andy Lutomirski
); } int clock_gettime(clockid_t, struct timespec *) __attribute__((weak, alias(__vdso_clock_gettime))); -- 1.8.5.3 -- Andy Lutomirski AMA Capital Management, LLC -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH 3/8] revamp vclock_gettime.c

2014-02-02 Thread Andy Lutomirski
-by: Stefani Seibold stef...@seibold.net Acked-by: Andy Lutomirski l...@amacapital.net --- arch/x86/vdso/vclock_gettime.c | 85 +- 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso

Re: [PATCH 5/8] replace VVAR(vsyscall_gtod_data) by gtod macro

2014-02-02 Thread Andy Lutomirski
On Sun, Feb 2, 2014 at 3:27 AM, stef...@seibold.net wrote: From: Stefani Seibold stef...@seibold.net There a currently more than 30 users of the gtod macro, so replace the last VVAR(vsyscall_gtod_data) by gtod macro. Acked-by: Andy Lutomirski l...@amacapital.net Signed-off-by: Stefani

Re: [PATCH 7/8] Add 32 bit VDSO time support for 32 bit kernel

2014-02-02 Thread Andy Lutomirski
On Sun, Feb 2, 2014 at 3:27 AM, stef...@seibold.net wrote: From: Stefani Seibold stef...@seibold.net This patch add the time support for 32 bit a VDSO to a 32 bit kernel. [...] Can you address the review comments from last time around? For example, this still seems to have redundant vvar

Re: [PATCH 7/8] Add 32 bit VDSO time support for 32 bit kernel

2014-02-02 Thread Andy Lutomirski
On Sun, Feb 2, 2014 at 1:39 PM, Stefani Seibold stef...@seibold.net wrote: Am Sonntag, den 02.02.2014, 08:46 -0800 schrieb Andy Lutomirski: On Sun, Feb 2, 2014 at 3:27 AM, stef...@seibold.net wrote: From: Stefani Seibold stef...@seibold.net This patch add the time support for 32 bit

Re: [PATCH 7/8] Add 32 bit VDSO time support for 32 bit kernel

2014-02-03 Thread Andy Lutomirski
On Sun, Feb 2, 2014 at 11:44 PM, Stefani Seibold stef...@seibold.net wrote: Am Sonntag, den 02.02.2014, 16:12 -0800 schrieb Andy Lutomirski: On Sun, Feb 2, 2014 at 1:39 PM, Stefani Seibold stef...@seibold.net wrote: Am Sonntag, den 02.02.2014, 08:46 -0800 schrieb Andy Lutomirski: On Sun, Feb

Re: Why is syscall auditing on with no rules?

2014-02-03 Thread Andy Lutomirski
On Mon, Feb 3, 2014 at 6:49 AM, Steve Grubb sgr...@redhat.com wrote: On Saturday, February 01, 2014 06:51:56 PM Andy Lutomirski wrote: On Sat, Feb 1, 2014 at 6:32 PM, Andy Lutomirski l...@amacapital.net wrote: On a stock Fedora installation: $ sudo auditctl -l No rules What rules would

[PATCH] audit: Only use the syscall slowpath when syscall audit rules exist

2014-02-03 Thread Andy Lutomirski
...@redhat.com Signed-off-by: Andy Lutomirski l...@amacapital.net --- This is not the best-tested patch in the world. Someone who actually knows how to use syscall auditing should probably give it a spin. It fixes an IMO huge performance issue, though. include/linux/audit.h | 9 +-- kernel

Re: [PATCH] audit: Only use the syscall slowpath when syscall audit rules exist

2014-02-03 Thread Andy Lutomirski
On Mon, Feb 3, 2014 at 10:11 AM, Oleg Nesterov o...@redhat.com wrote: On 02/03, Andy Lutomirski wrote: @@ -911,6 +918,47 @@ static inline struct audit_context *audit_alloc_context(enum audit_state state) return context; } +void audit_inc_n_rules() +{ + struct task_struct *p

[PATCH v2] audit: Only use the syscall slowpath when syscall audit rules exist

2014-02-03 Thread Andy Lutomirski
...@redhat.com Signed-off-by: Andy Lutomirski l...@amacapital.net --- Changes from v1: - For new tasks, set flags in a new audit_sync_flags callback instead of in audit_alloc (thanks, Oleg). - Rework locking. - Use irqsave/irqrestore to avoid having to think about who else might have taken spinlocks

[PATCH v2.1] audit: Only use the syscall slowpath when syscall audit rules exist

2014-02-03 Thread Andy Lutomirski
...@redhat.com Signed-off-by: Andy Lutomirski l...@amacapital.net --- This brown paper bag release is brought to you by git commit's -a flag. Changes from v2: Contains the correct patch Changes from v1: - For new tasks, set flags in a new audit_sync_flags callback instead of in audit_alloc (thanks, Oleg

Re: [RFC PATCH 0/3] epoll: read(),write(),ioctl() interface

2014-02-03 Thread Andy Lutomirski
On 02/02/2014 06:17 PM, Nathaniel Yazdani wrote: Hi everyone, This patch series adds support for read(), write(), and ioctl() operations on eventpolls as well as an associated userspace structure to format the eventpoll entries delivered via read()/write() buffers. The new structure, struct

Re: [RFC PATCH 0/3] epoll: read(),write(),ioctl() interface

2014-02-03 Thread Andy Lutomirski
On Mon, Feb 3, 2014 at 11:42 AM, Nathaniel Yazdani n1ght.4nd@gmail.com wrote: On 2/3/14, Andy Lutomirski l...@amacapital.net wrote: On 02/02/2014 06:17 PM, Nathaniel Yazdani wrote: Hi everyone, This patch series adds support for read(), write(), and ioctl() operations on eventpolls

Re: [PATCH v2.1] audit: Only use the syscall slowpath when syscall audit rules exist

2014-02-03 Thread Andy Lutomirski
On Mon, Feb 3, 2014 at 12:35 PM, Eric Paris epa...@redhat.com wrote: H, My problem with doing this has always actually been because of SELinux. Knowing syscall information with AVCs can be a huge help running down problems. We already make people load rules if they want to get pathname

Re: [PATCH 7/8] Add 32 bit VDSO time support for 32 bit kernel

2014-02-03 Thread Andy Lutomirski
On Mon, Feb 3, 2014 at 2:01 PM, Stefani Seibold stef...@seibold.net wrote: Am Montag, den 03.02.2014, 08:36 -0800 schrieb Andy Lutomirski: On Sun, Feb 2, 2014 at 11:44 PM, Stefani Seibold stef...@seibold.net wrote: Am Sonntag, den 02.02.2014, 16:12 -0800 schrieb Andy Lutomirski: On Sun, Feb

Re: [RFC PATCH 0/3] epoll: read(),write(),ioctl() interface

2014-02-03 Thread Andy Lutomirski
On Mon, Feb 3, 2014 at 1:51 PM, Eric Wong normalper...@yhbt.net wrote: Andy Lutomirski l...@amacapital.net wrote: On 02/02/2014 06:17 PM, Nathaniel Yazdani wrote: So are you saying that those features you mentioned are specifically sought after for the kernel? If so I'd like to take a crack

Re: [PATCH] audit: Only use the syscall slowpath when syscall audit rules exist

2014-02-03 Thread Andy Lutomirski
On Mon, Feb 3, 2014 at 12:23 PM, Steve Grubb sgr...@redhat.com wrote: On Monday, February 03, 2014 09:53:23 AM Andy Lutomirski wrote: This toggles TIF_SYSCALL_AUDIT as needed when rules change instead of leaving it set whenever rules might be set in the future. This reduces syscall latency

Re: [PATCH v2.1] audit: Only use the syscall slowpath when syscall audit rules exist

2014-02-04 Thread Andy Lutomirski
On Tue, Feb 4, 2014 at 8:50 AM, Oleg Nesterov o...@redhat.com wrote: On 02/03, Andy Lutomirski wrote: +void audit_inc_n_rules() +{ + struct task_struct *p, *g; + unsigned long flags; + + read_lock_irqsave(tasklist_lock, flags); Confused... read_lock(tasklist) doesn't need

Re: [PATCH v11 1/9] Make vsyscall_gtod_data handling x86 generic

2014-02-04 Thread Andy Lutomirski
On Tue, Feb 4, 2014 at 2:15 AM, stef...@seibold.net wrote: From: Stefani Seibold stef...@seibold.net This patch move the vsyscall_gtod_data handling out of vsyscall_64.c into an additonal file vsyscall_gtod.c to make the functionality available for x86 32 bit kernel. It also adds a new

Re: [PATCH v11 7/9] introduce VVAR marco for vdso32

2014-02-04 Thread Andy Lutomirski
\ __attribute__((section(.vvar_ #name), aligned(16))) __visible -#define VVAR(name) (*vvaraddr_ ## name) - #endif /* DECLARE_VVAR(offset, type, name) */ -- 1.8.5.3 -- Andy Lutomirski AMA Capital Management, LLC

Re: [PATCH v11 9/9] Add 32 bit VDSO time support for 64 bit kernel

2014-02-04 Thread Andy Lutomirski
On Tue, Feb 4, 2014 at 2:15 AM, stef...@seibold.net wrote: From: Stefani Seibold stef...@seibold.net This patch add the VDSO time support for the IA32 Emulation Layer. Due the nature of the kernel headers and the LP64 compiler where the size of a long and a pointer differs against a 32 bit

Re: [PATCH v2.1] audit: Only use the syscall slowpath when syscall audit rules exist

2014-02-04 Thread Andy Lutomirski
On Tue, Feb 4, 2014 at 11:11 AM, Oleg Nesterov o...@redhat.com wrote: On 02/04, Andy Lutomirski wrote: On Tue, Feb 4, 2014 at 8:50 AM, Oleg Nesterov o...@redhat.com wrote: On 02/03, Andy Lutomirski wrote: Sorry, forgot to mention: where is this mythical for_each_process_thread? In Linus's

Re: [PATCH] x86: Remove hpet vclock support

2014-02-04 Thread Andy Lutomirski
On Tue, Feb 4, 2014 at 11:31 AM, Thomas Gleixner t...@linutronix.de wrote: On Fri, 31 Jan 2014, Andy Lutomirski wrote: The HPET is so amazingly slow that this is barely a win. It adds That's nonsense. It's definitely a win to access HPET directly especially on older systems with TSC

[ARCH question] Do syscall_get_nr and syscall_get_arguments always work?

2014-02-04 Thread Andy Lutomirski
On Tue, Feb 4, 2014 at 11:32 AM, Andy Lutomirski l...@amacapital.net wrote: Now we get rid of __audit_syscall_entry. (This speeds up even the auditing-is-on case.) Instead we have __audit_start_record, which does more or less the same thing, except that (a) it doesn't BUG if in_syscall

Dirty deleted files cause pointless I/O storms (unless truncated first)

2014-01-20 Thread Andy Lutomirski
The code below runs quickly for a few iterations, and then it slows down and the whole system becomes laggy for far too long. Removing the sync_file_range call results in no I/O being performed at all (which means that the kernel isn't totally screwing this up), and changing 4096 to SIZE causes

[BTRFS-specific] Re: Dirty deleted files cause pointless I/O storms (unless truncated first)

2014-01-20 Thread Andy Lutomirski
[cc: btrfs] On Mon, Jan 20, 2014 at 8:46 PM, Dave Chinner da...@fromorbit.com wrote: On Mon, Jan 20, 2014 at 04:59:23PM -0800, Andy Lutomirski wrote: The code below runs quickly for a few iterations, and then it slows down and the whole system becomes laggy for far too long. Removing

Re: [Bug 67651] Bisected: Lots of fragmented mmaps cause gimp to fail in 3.12 after exceeding vm_max_map_count

2014-01-22 Thread Andy Lutomirski
On 01/22/2014 11:08 AM, Mel Gorman wrote: Cyrill, Gimp is broken due to a kernel bug included in 3.12. It cannot open large files without failing memory allocations due to exceeding vm.max_map_count. The relevant bugzilla entries are https://bugzilla.kernel.org/show_bug.cgi?id=67651

Re: Possible SNB throttling erratum in need of workaround?

2014-01-07 Thread Andy Lutomirski
[cc: some more people] On Wed, Dec 18, 2013 at 6:02 PM, Andy Lutomirski l...@amacapital.net wrote: I have a box running 3.9.4. For a few hundred ms, all packages and cores* exceeded their power limits, and then they all came back to normal. Since then, turbo boost went away. The first

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-09 Thread Andy Lutomirski
On 01/09/2014 06:19 AM, Jeff Layton wrote: It's not really feasible to do deadlock detection with FL_FILE_PVT locks since they aren't owned by a single task, per-se. Deadlock detection also tends to be rather expensive so just skip it for these sorts of locks. I just looked at the existing

Re: [PATCH v5 14/14] locks: add new fcntl cmd values for handling file private locks

2014-01-09 Thread Andy Lutomirski
On 01/09/2014 06:19 AM, Jeff Layton wrote: Due to some unfortunate history, POSIX locks have very strange and unhelpful semantics. The thing that usually catches people by surprise is that they are dropped whenever the process closes any file descriptor associated with the inode. [...]

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-09 Thread Andy Lutomirski
On Thu, Jan 9, 2014 at 4:49 PM, Jeff Layton jlay...@redhat.com wrote: On Thu, 09 Jan 2014 12:25:25 -0800 Andy Lutomirski l...@amacapital.net wrote: On 01/09/2014 06:19 AM, Jeff Layton wrote: It's not really feasible to do deadlock detection with FL_FILE_PVT locks since they aren't owned

Re: [PATCH v5 14/14] locks: add new fcntl cmd values for handling file private locks

2014-01-09 Thread Andy Lutomirski
On Thu, Jan 9, 2014 at 4:55 PM, Jeff Layton jlay...@redhat.com wrote: On Thu, 09 Jan 2014 12:29:04 -0800 Andy Lutomirski l...@amacapital.net wrote: On 01/09/2014 06:19 AM, Jeff Layton wrote: Due to some unfortunate history, POSIX locks have very strange and unhelpful semantics. The thing

[RFC] subreaper mode 2 (Re: A feature suggestion for sandboxing processes)

2014-01-09 Thread Andy Lutomirski
On 01/09/2014 03:55 PM, Victor Porton wrote: In Fedora there is bin/sandbox command which runs a specified command in so called 'sandbox'. Program running in sandbox cannot open new files (it is commonly used with preopen stdin and stdout) and possibly its access to network is limited. It

Re: [PATCH 05/11] vfs: add RENAME_NOREPLACE flag

2014-01-15 Thread Andy Lutomirski
On Wed, Jan 15, 2014 at 10:19 AM, J. Bruce Fields bfie...@fieldses.org wrote: On Wed, Jan 08, 2014 at 11:10:09PM +0100, Miklos Szeredi wrote: From: Miklos Szeredi mszer...@suse.cz If this flag is specified and the target of the rename exists then the rename syscall fails with EEXIST. Why is

Re: [PATCH REGRESSION FIX] x86 idle: restore mwait_idle()

2014-01-16 Thread Andy Lutomirski
On 01/14/2014 09:37 PM, Len Brown wrote: From: Len Brown len.br...@intel.com In Linux-3.9 we removed the mwait_idle() loop: 'x86 idle: remove mwait_idle() and idle=mwait cmdline param' (69fb3676df3329a7142803bb3502fa59dc0db2e3) The reasoning was that modern machines should be sufficiently

Re: [tip:perf/core] x86, mm, perf: Allow recursive faults from interrupts

2014-01-17 Thread Andy Lutomirski
On Fri, Jan 17, 2014 at 10:10 AM, Waiman Long waiman.l...@hp.com wrote: On 01/16/2014 08:39 AM, tip-bot for Peter Zijlstra wrote: Commit-ID: c026b3591e4f2a4993df773183704bb31634e0bd Gitweb: http://git.kernel.org/tip/c026b3591e4f2a4993df773183704bb31634e0bd Author: Peter

Re: [RFC PATCHv2 1/2] Add mm flag to control THP

2014-01-17 Thread Andy Lutomirski
On Thu, Jan 16, 2014 at 1:01 PM, Alex Thorlton athorl...@sgi.com wrote: This patch adds an mm flag (MMF_THP_DISABLE) to disable transparent hugepages using prctl. --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1998,6 +1998,17 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned

Re: [tip:perf/core] x86, mm, perf: Allow recursive faults from interrupts

2014-01-17 Thread Andy Lutomirski
On Fri, Jan 17, 2014 at 12:08 PM, Waiman Long waiman.l...@hp.com wrote: On 01/17/2014 02:17 PM, Andy Lutomirski wrote: On Fri, Jan 17, 2014 at 10:10 AM, Waiman Longwaiman.l...@hp.com wrote: On 01/16/2014 08:39 AM, tip-bot for Peter Zijlstra wrote: Commit-ID

Re: [RFC PATCH 0/3] Change how we determine when to hand out THPs

2013-12-16 Thread Andy Lutomirski
On Mon, Dec 16, 2013 at 9:12 AM, Alex Thorlton athorl...@sgi.com wrote: Please cc Andrea on this. I'm going to clean up a few small things for a v2 pretty soon, I'll be sure to cc Andrea there. My proposed solution to the problem is to allow users to set a threshold at which THPs will be

Re: [PATCH 1/2] procfs: make /proc/*/{stack,syscall,personality} 0400

2013-12-16 Thread Andy Lutomirski
/*/{stack,syscall,personality} files. Looks good. It's hard to imagine this breaking anything that deserves to work. Acked-by: Andy Lutomirski l...@amacapital.net Cc: Eric W. Biederman ebied...@xmission.com Acked-by: Kees Cook keesc...@chromium.org Signed-off-by: Djalal Harouni tix

Re: [PATCH 2/2] procfs: make /proc/*/pagemap 0400

2013-12-16 Thread Andy Lutomirski
files. Looks good. Acked-by: Andy Lutomirski l...@amacapital.net Cc: Eric W. Biederman ebied...@xmission.com Cc: Kees Cook keesc...@chromium.org Signed-off-by: Djalal Harouni tix...@opendz.org --- fs/proc/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs

Re: [RFC PATCH 0/3] Change how we determine when to hand out THPs

2013-12-17 Thread Andy Lutomirski
On Tue, Dec 17, 2013 at 8:04 AM, Alex Thorlton athorl...@sgi.com wrote: On Mon, Dec 16, 2013 at 05:43:40PM -0800, Andy Lutomirski wrote: On Mon, Dec 16, 2013 at 9:12 AM, Alex Thorlton athorl...@sgi.com wrote: Please cc Andrea on this. I'm going to clean up a few small things for a v2

Re: [RFC PATCH 0/3] Change how we determine when to hand out THPs

2013-12-17 Thread Andy Lutomirski
On Tue, Dec 17, 2013 at 9:47 AM, Alex Thorlton athorl...@sgi.com wrote: On Tue, Dec 17, 2013 at 08:54:10AM -0800, Andy Lutomirski wrote: On Tue, Dec 17, 2013 at 8:04 AM, Alex Thorlton athorl...@sgi.com wrote: On Mon, Dec 16, 2013 at 05:43:40PM -0800, Andy Lutomirski wrote: On Mon, Dec 16

Re: [RFC PATCH 00/13] nohz: Use sysidle detection to let the timekeeper sleep

2013-12-18 Thread Andy Lutomirski
On 12/18/2013 09:43 AM, Frederic Weisbecker wrote: On Wed, Dec 18, 2013 at 10:04:43AM +0800, Alex Shi wrote: On 12/18/2013 06:51 AM, Frederic Weisbecker wrote: So this is what this series brings, more details following: * Some code, naming and whitespace cleanups * Allow all CPUs outside

Re: [RFC PATCH 00/13] nohz: Use sysidle detection to let the timekeeper sleep

2013-12-18 Thread Andy Lutomirski
On Wed, Dec 18, 2013 at 1:49 PM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Wed, Dec 18, 2013 at 01:29:53PM -0800, Andy Lutomirski wrote: On 12/18/2013 09:43 AM, Frederic Weisbecker wrote: On Wed, Dec 18, 2013 at 10:04:43AM +0800, Alex Shi wrote: On 12/18/2013 06:51 AM, Frederic

Re: [RFC PATCH 00/13] nohz: Use sysidle detection to let the timekeeper sleep

2013-12-18 Thread Andy Lutomirski
On Wed, Dec 18, 2013 at 1:57 PM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Wed, Dec 18, 2013 at 01:53:18PM -0800, Andy Lutomirski wrote: On Wed, Dec 18, 2013 at 1:49 PM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Wed, Dec 18, 2013 at 01:29:53PM -0800, Andy Lutomirski

Possible SNB throttling erratum in need of workaround?

2013-12-18 Thread Andy Lutomirski
I have a box running 3.9.4. For a few hundred ms, all packages and cores* exceeded their power limits, and then they all came back to normal. Since then, turbo boost went away. The first thing I tried was writing 0 to msr 0x19C to clear the throttling log bit. The bit was clear, but still no

Re: [PATCH v2 1/2] Create eeprom_dev hardware class for EEPROM devices

2014-01-24 Thread Andy Lutomirski
On 01/23/2014 11:16 AM, Curt Brune wrote: Create a new hardware class under /sys/class/eeprom_dev EEPROM drivers can register their devices with the eeprom_dev class during instantiation. The registered devices show up as: /sys/class/eeprom_dev/eeprom0 /sys/class/eeprom_dev/eeprom1

Re: [PATCH v3 1/4] x86, mpx: add documentation on Intel MPX

2014-01-27 Thread Andy Lutomirski
On 01/26/2014 01:08 AM, Qiaowei Ren wrote: This patch adds the Documentation/x86/intel_mpx.txt file with some information about Intel MPX. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- Documentation/x86/intel_mpx.txt | 226 +++ 1 files

Re: [PATCH v3 2/4] x86, mpx: hook #BR exception handler to allocate bound tables

2014-01-27 Thread Andy Lutomirski
On 01/26/2014 01:08 AM, Qiaowei Ren wrote: An access to an invalid bound directory entry will cause a #BR exception. This patch hook #BR exception handler to allocate one bound table and bind it with that buond directory entry. This will avoid the need of forwarding the #BR exception to the

Re: [PATCH v3 3/4] x86, mpx: add prctl commands PR_MPX_INIT, PR_MPX_RELEASE

2014-01-27 Thread Andy Lutomirski
On 01/26/2014 01:08 AM, Qiaowei Ren wrote: This patch adds the PR_MPX_INIT and PR_MPX_RELEASE prctl() commands on the x86 platform. These commands can be used to init and release MPX related resource. A MMU notifier will be registered during PR_MPX_INIT command execution. So the bound

Re: [PATCH v3 3/4] x86, mpx: add prctl commands PR_MPX_INIT, PR_MPX_RELEASE

2014-01-27 Thread Andy Lutomirski
On 01/26/2014 06:10 PM, H. Peter Anvin wrote: On 01/26/2014 05:55 PM, Ren Qiaowei wrote: Peter, you mean we should remove these two call and do what they do in user-space, right? Unless we think there is a benefit to the kernel to have a on/off switch for the #BR exception (if disabled,

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-27 Thread Andy Lutomirski
On 01/26/2014 01:08 AM, Qiaowei Ren wrote: This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. These fields will be set in #BR exception handler by decoding the user

Re: [RFC] de-asmify the x86-64 system call slowpath

2014-01-27 Thread Andy Lutomirski
On 01/26/2014 11:42 PM, Al Viro wrote: On Sun, Jan 26, 2014 at 08:32:09PM -0800, Linus Torvalds wrote: On Sun, Jan 26, 2014 at 4:22 PM, Al Viro v...@zeniv.linux.org.uk wrote: Umm... Can't uprobe_notify_resume() modify regs as well? Probably. .. and on the other hand, we should actually be

Re: [RFC] de-asmify the x86-64 system call slowpath

2014-01-27 Thread Andy Lutomirski
On Mon, Jan 27, 2014 at 2:43 PM, Linus Torvalds torva...@linux-foundation.org wrote: On Mon, Jan 27, 2014 at 2:32 PM, Al Viro v...@zeniv.linux.org.uk wrote: do_signal() is also a place where arbitrary changes to regs might've been done by tracer, so regs-cs might need to be checked in the same

Re: [RFC] de-asmify the x86-64 system call slowpath

2014-01-27 Thread Andy Lutomirski
On Mon, Jan 27, 2014 at 4:22 PM, H. Peter Anvin h...@zytor.com wrote: On 01/27/2014 02:46 PM, Andy Lutomirski wrote: I think that sysret for sigreturn is probably not very interesting. On the other hand, sysret for #PF might be a huge win, despite being even scarier. SYSRET for #PF

Re: [PATCH v3 2/4] x86, mpx: hook #BR exception handler to allocate bound tables

2014-01-27 Thread Andy Lutomirski
On Mon, Jan 27, 2014 at 7:35 PM, Ren Qiaowei qiaowei@intel.com wrote: On 01/28/2014 04:36 AM, Andy Lutomirski wrote: + bd_entry = status MPX_BNDSTA_ADDR_MASK; + if ((bd_entry = bd_base) (bd_entry bd_base + bd_size)) + allocate_bt(bd_entry); What happens

Re: [PATCH v3 2/4] x86, mpx: hook #BR exception handler to allocate bound tables

2014-01-27 Thread Andy Lutomirski
On Mon, Jan 27, 2014 at 9:39 PM, Ren Qiaowei qiaowei@intel.com wrote: On 01/28/2014 01:21 PM, Andy Lutomirski wrote: On Mon, Jan 27, 2014 at 7:35 PM, Ren Qiaowei qiaowei@intel.com wrote: On 01/28/2014 04:36 AM, Andy Lutomirski wrote: + bd_entry = status MPX_BNDSTA_ADDR_MASK

Re: [PATCH 0/4] Add 32 bit VDSO time function support

2014-01-30 Thread Andy Lutomirski
that there are few if any machines for which the HPET is fast enough that avoiding a syscall matters at all. (On my box at work, reading the HPET takes ~500 nanoseconds. I can do a lot of syscalls in that amount of time.) - Stefani -- Andy Lutomirski AMA Capital Management, LLC -- To unsubscribe from

Re: [PATCH 1/4] Make vsyscall_gtod_data handling x86 generic

2014-01-30 Thread Andy Lutomirski
); +} + + -- 1.8.5.3 -- Andy Lutomirski AMA Capital Management, LLC -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [PATCH 0/4] Add 32 bit VDSO time function support

2014-01-30 Thread Andy Lutomirski
On Thu, Jan 30, 2014 at 10:03 AM, H. Peter Anvin h...@zytor.com wrote: On 01/30/2014 09:57 AM, Andy Lutomirski wrote: By definition there aren't any broken users of the new functions, because there aren't any users at all. So... should we start randomizing this thing from the beginning

Re: [PATCH 3/4] Add 32 bit VDSO support for 32 kernel

2014-01-30 Thread Andy Lutomirski
On Thu, Jan 30, 2014 at 2:49 AM, stef...@seibold.net wrote: From: Stefani Seibold stef...@seibold.net This patch add the support for 32 bit VDSO to a 32 bit kernel. For 32 bit programs running on a 32 bit kernel, the same mechanism is used as for 64 bit programs running on a 64 bit kernel.

Re: [PATCH 4/4] Add 32 bit VDSO support for 64 kernel

2014-01-30 Thread Andy Lutomirski
On Thu, Jan 30, 2014 at 2:49 AM, stef...@seibold.net wrote: From: Stefani Seibold stef...@seibold.net This patch add the support for the IA32 Emulation Layer to run 32 bit applications on a 64 bit kernel. Due the nature of the kernel headers and the LP64 compiler where the size of a long

Re: [PATCH 3/4] Add 32 bit VDSO support for 32 kernel

2014-01-30 Thread Andy Lutomirski
On Thu, Jan 30, 2014 at 11:39 AM, Stefani Seibold stef...@seibold.net wrote: Am Donnerstag, den 30.01.2014, 10:17 -0800 schrieb Andy Lutomirski: +struct vsyscall_gtod_data vvar_vsyscall_gtod_data + __attribute__((visibility(hidden))); + +u32 hpet_counter + __attribute__

Re: [PATCH 1/4] Make vsyscall_gtod_data handling x86 generic

2014-01-30 Thread Andy Lutomirski
On Thu, Jan 30, 2014 at 11:27 AM, Stefani Seibold stef...@seibold.net wrote: Am Donnerstag, den 30.01.2014, 10:05 -0800 schrieb Andy Lutomirski: On Thu, Jan 30, 2014 at 2:49 AM, stef...@seibold.net wrote: diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h index

Re: [RFC PATCH 2/3] Add tunable to control THP behavior

2013-12-12 Thread Andy Lutomirski
On Thu, Dec 12, 2013 at 10:00 AM, Alex Thorlton athorl...@sgi.com wrote: This part of the patch adds a tunable to /sys/kernel/mm/transparent_hugepage called threshold. This threshold determines how many pages a user must fault in from a single node before a temporary compound page is turned

Re: Clock control algorithms (Re: [RFC][PATCH 5/7] x86: Use latch data structure for cyc2ns)

2013-12-12 Thread Andy Lutomirski
On Sat, Nov 30, 2013 at 9:34 AM, H. Peter Anvin h...@zytor.com wrote: There is a huge difference between something that breaks after 2^32 and 2^64 events. Very few computers will ever be able to have 2^64 events of any kind in their lifetime, never mind a single boot. Given that struct

Re: [RFC PATCH 2/3] Add tunable to control THP behavior

2013-12-12 Thread Andy Lutomirski
On Thu, Dec 12, 2013 at 12:49 PM, Alex Thorlton athorl...@sgi.com wrote: Is there a setting that will turn off the must-be-the-same-node behavior? There are workloads where TLB matters more than cross-node traffic (or where all the pages are hopelessly shared between nodes, but hugepages

Re: [PATCH 1/9] Known exploit detection

2013-12-12 Thread Andy Lutomirski
for months at a time without anyone complaining. Perhaps Fenguang Wu can add something to the daily test runs if we add an over all make test-secure target or similar. This has the added benefit of making sure that the exploits don't (trivially) regress. --Andy Dave -- Andy

Re: [PATCH 1/2] kernel/sys.c: return the current gid when error occurs

2013-08-07 Thread Andy Lutomirski
On Wed, Aug 7, 2013 at 6:30 PM, Chen Gang gang.c...@asianux.com wrote: On 08/08/2013 12:58 AM, Andy Lutomirski wrote: On Wed, Aug 7, 2013 at 9:21 AM, Oleg Nesterov o...@redhat.com wrote: On 08/06, Andy Lutomirski wrote: I assume that what the man page means is that the return value

Re: [RFC 0/3] Add madvise(..., MADV_WILLWRITE)

2013-08-08 Thread Andy Lutomirski
On Thu, Aug 8, 2013 at 3:18 AM, Jan Kara j...@suse.cz wrote: On Wed 07-08-13 11:00:52, Andy Lutomirski wrote: On Wed, Aug 7, 2013 at 10:40 AM, Dave Hansen dave.han...@intel.com wrote: On 08/07/2013 06:40 AM, Jan Kara wrote: One question before I look at the patches: Why don't you use

Re: [RFC 0/3] Add madvise(..., MADV_WILLWRITE)

2013-08-08 Thread Andy Lutomirski
On Thu, Aug 8, 2013 at 11:53 AM, Jan Kara j...@suse.cz wrote: On Thu 08-08-13 08:56:28, Andy Lutomirski wrote: On Thu, Aug 8, 2013 at 3:18 AM, Jan Kara j...@suse.cz wrote: On Wed 07-08-13 11:00:52, Andy Lutomirski wrote: On Wed, Aug 7, 2013 at 10:40 AM, Dave Hansen dave.han...@intel.com

Re: [RFC 0/3] Add madvise(..., MADV_WILLWRITE)

2013-08-08 Thread Andy Lutomirski
On Thu, Aug 8, 2013 at 12:25 PM, Andy Lutomirski l...@amacapital.net wrote: Whoops -- I read your email too quickly. I haven't tried MADV_WILLNEED, but I think I tried reading each page to fault them in. Is there any reason to expect MADV_WILLNEED to do any better? I'll try to do some new

Re: [RFC 0/3] Add madvise(..., MADV_WILLWRITE)

2013-08-09 Thread Andy Lutomirski
On Fri, Aug 9, 2013 at 12:55 AM, Jan Kara j...@suse.cz wrote: On Thu 08-08-13 15:58:39, Dave Hansen wrote: I was coincidentally tracking down what I thought was a scalability problem (turned out to be full disks :). I noticed, though, that ext4 is about 20% slower than ext2/3 at doing write

Re: [RFC 0/3] Add madvise(..., MADV_WILLWRITE)

2013-08-09 Thread Andy Lutomirski
. Should it have? Try reading all the pages after mmap (and keep the fallocate). In theory, MAP_POPULATE should help some, but until Linux 3.9 MAP_POPULATE was a disaster, and I'm still a bit afraid of it. --Andy -- Andy Lutomirski AMA Capital Management, LLC -- To unsubscribe from this list

Re: [RFC][PATCH 3/2] x86/jump labels: Count and display the short jumps used

2013-08-09 Thread Andy Lutomirski
On 08/07/2013 02:56 PM, Linus Torvalds wrote: Both of the biased cases *might* also want things like save register state in the unlikely path so that the *likely* path doesn't have to. Think things like it's a leaf function, and the likely path doesn't need any temporaries, but the unlikely

Re: Should unprivileged linkat(..., AT_EMPTY_PATH) work on O_TMPFILE files?

2013-08-11 Thread Andy Lutomirski
On Sun, Aug 11, 2013 at 9:45 AM, Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com wrote: Andy Lutomirski l...@amacapital.net writes: The change: commit f4e0c30c191f87851c4a53454abb55ee276f4a7e Author: Al Viro v...@zeniv.linux.org.uk Date: Tue Jun 11 08:34:36 2013 +0400 allow

Re: Request for comments: reserving a value for O_SEARCH and O_EXEC

2013-08-12 Thread Andy Lutomirski
[cc: linux-api] On 08/02/2013 07:48 PM, Rich Felker wrote: Hi, At present, one of the few interface-level conformance issues for Linux against POSIX 2008 is lack of O_SEARCH and O_EXEC. I am trying to get full, conforming support for them both into musl libc (for which I am the

Re: question about ioremap_cache and PAT

2013-08-12 Thread Andy Lutomirski
On 08/11/2013 09:50 AM, Andreas Werner wrote: Hi i have a question about ioremap_cache and the resulting PAT attribute on X86 system. If I configure the mtrr to Write-Through for an adress range, and call ioremap_cache to map the mmio, the resulting PAT attribute is set to UC. If I check the

Re: Should unprivileged linkat(..., AT_EMPTY_PATH) work on O_TMPFILE files?

2013-08-12 Thread Andy Lutomirski
On Sun, Aug 11, 2013 at 9:25 PM, Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com wrote: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com writes: Andy Lutomirski l...@amacapital.net writes: On Sun, Aug 11, 2013 at 9:45 AM, Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com wrote: Andy

Re: [patch 2/2] [PATCH] mm: Save soft-dirty bits on file pages

2013-08-12 Thread Andy Lutomirski
On Mon, Aug 12, 2013 at 2:57 PM, Andrew Morton a...@linux-foundation.org wrote: On Thu, 8 Aug 2013 18:51:20 +0400 Cyrill Gorcunov gorcu...@gmail.com wrote: On Wed, Aug 07, 2013 at 01:28:12PM -0700, Andrew Morton wrote: Good god. I wonder if these can be turned into out-of-line functions

[PATCH] x86: Don't rebuild 32-bit vdsos on every make

2014-03-25 Thread Andy Lutomirski
vdso32/vclock_gettime.o was confusing kbuild. Signed-off-by: Andy Lutomirski l...@amacapital.net --- arch/x86/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile index a2de5fc..6e6361a 100644 --- a/arch/x86/vdso

Re: [Lsf] Postgresql performance problems with IO latency, especially during fsync()

2014-03-26 Thread Andy Lutomirski
On Wed, Mar 26, 2014 at 12:11 PM, Andres Freund and...@anarazel.de wrote: Hi, At LSF/MM there was a slot about postgres' problems with the kernel. Our top#1 concern is frequent slow read()s that happen while another process calls fsync(), even though we'd be perfectly fine if that fsync()

Re: [Lsf] Postgresql performance problems with IO latency, especially during fsync()

2014-03-26 Thread Andy Lutomirski
On Wed, Mar 26, 2014 at 2:55 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-03-26 14:41:31 -0700, Andy Lutomirski wrote: On Wed, Mar 26, 2014 at 12:11 PM, Andres Freund and...@anarazel.de wrote: Hi, At LSF/MM there was a slot about postgres' problems with the kernel. Our top#1

Re: [Lsf] Postgresql performance problems with IO latency, especially during fsync()

2014-03-26 Thread Andy Lutomirski
On Wed, Mar 26, 2014 at 3:35 PM, David Lang da...@lang.hm wrote: On Wed, 26 Mar 2014, Andy Lutomirski wrote: I'm not sure I understand the request queue stuff, but here's an idea. The block core contains this little bit of code: I haven't read enough of the code yet, to comment

Re: [Lsf] Postgresql performance problems with IO latency, especially during fsync()

2014-03-26 Thread Andy Lutomirski
On Wed, Mar 26, 2014 at 4:11 PM, Andy Lutomirski l...@amacapital.net wrote: On Wed, Mar 26, 2014 at 3:35 PM, David Lang da...@lang.hm wrote: On Wed, 26 Mar 2014, Andy Lutomirski wrote: I'm not sure I understand the request queue stuff, but here's an idea. The block core contains this little

Thoughts on credential switching

2014-03-26 Thread Andy Lutomirski
Hi various people who care about user-space NFS servers and/or security-relevant APIs. I propose the following set of new syscalls: int credfd_create(unsigned int flags): returns a new credfd that corresponds to current's creds. int credfd_activate(int fd, unsigned int flags): Change current's

Re: Bug 71331 - mlock yields processor to lower priority process

2014-03-26 Thread Andy Lutomirski
On 03/21/2014 07:50 AM, jimmie.da...@l-3com.com wrote: From: Mike Galbraith [umgwanakikb...@gmail.com] Sent: Friday, March 21, 2014 9:41 AM To: Davis, Bud @ SSG - Link Cc: oneu...@suse.de; artem_fetis...@epam.com; pet...@infradead.org;

Re: [PATCH v2 02/03]: hwrng: create filler thread

2014-03-26 Thread Andy Lutomirski
On 03/21/2014 07:33 AM, Torsten Duwe wrote: This can be viewed as the in-kernel equivalent of hwrngd; like FUSE it is a good thing to have a mechanism in user land, but for some reasons (simplicity, secrecy, integrity, speed) it may be better to have it in kernel space. Nice. [...]

Re: Thoughts on credential switching

2014-03-26 Thread Andy Lutomirski
On Wed, Mar 26, 2014 at 5:42 PM, Serge Hallyn serge.hal...@ubuntu.com wrote: Quoting Andy Lutomirski (l...@amacapital.net): Hi various people who care about user-space NFS servers and/or security-relevant APIs. I propose the following set of new syscalls: int credfd_create(unsigned int

Re: [PATCH v2 02/03]: hwrng: create filler thread

2014-03-26 Thread Andy Lutomirski
[cc: Greg Price, might be working on this stuff] On Wed, Mar 26, 2014 at 6:03 PM, H. Peter Anvin h...@zytor.com wrote: I'm wondering more about the default. We default to 50% for arch_get_random_seed, and this is supposed to be the default for in effect unverified hwrngs... TBH I'm highly

Re: Thoughts on credential switching

2014-03-26 Thread Andy Lutomirski
On Wed, Mar 26, 2014 at 7:48 PM, Jeff Layton jlay...@redhat.com wrote: On Wed, 26 Mar 2014 17:23:24 -0700 Andy Lutomirski l...@amacapital.net wrote: Hi various people who care about user-space NFS servers and/or security-relevant APIs. I propose the following set of new syscalls: int

Re: [PATCH v2 02/03]: hwrng: create filler thread

2014-03-27 Thread Andy Lutomirski
... If the default were 0, it would be exactly the old behaviour. How about that? Plus, driver authors would have to come up with an estimate on their own. On March 26, 2014 5:50:09 PM PDT, Andy Lutomirski l...@amacapital.net wrote: + current hwrng entropy estimation per mill

Re: [PATCH v2 02/03]: hwrng: create filler thread

2014-03-27 Thread Andy Lutomirski
On Wed, Mar 26, 2014 at 9:47 PM, H. Peter Anvin h...@zytor.com wrote: On 03/26/2014 06:11 PM, Andy Lutomirski wrote: TBH I'm highly skeptical of this kind of entropy estimation. /dev/random is IMO just silly, since you need to have very conservative entropy estimates for the concept to really

Re: Thoughts on credential switching

2014-03-27 Thread Andy Lutomirski
On Thu, Mar 27, 2014 at 8:41 AM, Florian Weimer fwei...@redhat.com wrote: On 03/27/2014 02:01 AM, Andy Lutomirski wrote: Essentially, it's a performance problem. knfsd has override_creds, and it can cache struct cred. But userspace doing the same thing (i.e. impersonating a user) has to do

Re: Thoughts on credential switching

2014-03-27 Thread Andy Lutomirski
they should keep working. Cheers, Jeremy. -- Andy Lutomirski AMA Capital Management, LLC -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

<    5   6   7   8   9   10   11   12   13   14   >