Re: [PATCH v2 1/2] jump_label: Explicitly disable jump labels in __init code

2018-02-16 Thread Jason Baron
On 02/16/2018 11:31 AM, Josh Poimboeuf wrote: > After initmem has been freed, any jump label entries in __init code are > prevented from being written to by the kernel_text_address() check in > __jump_label_update(). However, this check is quite broad. If > kernel_text_address() were to return

Re: [PATCH net-next 1/2] virtio_net: allow hypervisor to indicate linkspeed and duplex setting

2017-12-20 Thread Jason Baron
On 12/20/2017 09:57 AM, Michael S. Tsirkin wrote: > On Thu, Dec 14, 2017 at 02:33:53PM -0500, Jason Baron wrote: >> If the hypervisor exports the link and duplex speed, let's use that instead >> of the default unknown speed. The user can still overwrite it later if >>

Re: [PATCH net-next 1/2] virtio_net: allow hypervisor to indicate linkspeed and duplex setting

2017-12-20 Thread Jason Baron
On 12/20/2017 12:52 PM, Michael S. Tsirkin wrote: > On Wed, Dec 20, 2017 at 12:07:55PM -0500, Jason Baron wrote: >> >> >> On 12/20/2017 09:57 AM, Michael S. Tsirkin wrote: >>> On Thu, Dec 14, 2017 at 02:33:53PM -0500, Jason Baron wrote: >>>> If the hy

Re: [Qemu-devel] [PATCH 2/2] qemu: add linkspeed and duplex setting to virtio-net

2017-12-21 Thread Jason Baron
On 12/20/2017 09:33 AM, Yan Vugenfirer wrote: > >> On 20 Dec 2017, at 16:31, Michael S. Tsirkin wrote: >> >> On Tue, Dec 19, 2017 at 11:52:39AM -0500, Jason Baron wrote: >>> >>> >>> On 12/19/2017 04:19 AM, Yan Vugenfirer wrote: >>>>

Re: waitqueue lockdep annotation

2017-12-05 Thread Jason Baron
On 12/01/2017 06:03 PM, Christoph Hellwig wrote: > On Fri, Dec 01, 2017 at 05:34:50PM -0500, Jason Baron wrote: >> hmmm...I'm not sure how this suggestion would change the locking rules >> from what we currently have. Right now, we use ep->lock, if we remove >> that

Re: [Qemu-devel] [PATCH 2/2] qemu: add linkspeed and duplex setting to virtio-net

2017-12-18 Thread Jason Baron
On 12/18/2017 06:34 AM, Yan Vugenfirer wrote: > >> On 14 Dec 2017, at 21:33, Jason Baron via Qemu-devel >> wrote: >> >> Although they can be currently set in linux via 'ethtool -s', this requires >> guest changes, and thus it would be nice to exten

Re: [Qemu-devel] [PATCH 2/2] qemu: add linkspeed and duplex setting to virtio-net

2017-12-19 Thread Jason Baron
On 12/19/2017 04:19 AM, Yan Vugenfirer wrote: > >> On 18 Dec 2017, at 18:04, Jason Baron via Qemu-devel >> mailto:qemu-de...@nongnu.org>> wrote: >> >> >> >> On 12/18/2017 06:34 AM, Yan Vugenfirer wrote: >>> >>>> On 14

[PATCH 0/2] virtio_net: allow hypervisor to indicate linkspeed and duplex setting

2017-12-14 Thread Jason Baron
meant as a demonstration of how I intend this to work. Thanks, -Jason Jason Baron (2): virtio_net: allow hypervisor to indicate linkspeed and duplex setting qemu: add linkspeed and duplex setting to virtio-net linux changes: drivers/net/virtio_net.c| 11 ++- include/uapi/linux/vi

[PATCH net-next 1/2] virtio_net: allow hypervisor to indicate linkspeed and duplex setting

2017-12-14 Thread Jason Baron
EX feature flag, to indicate that a linkspeed and duplex setting are present. Signed-off-by: Jason Baron Cc: "Michael S. Tsirkin" Cc: Jason Wang --- drivers/net/virtio_net.c| 11 ++- include/uapi/linux/virtio_net.h | 4 2 files changed, 14 insertions(+), 1

[PATCH 2/2] qemu: add linkspeed and duplex setting to virtio-net

2017-12-14 Thread Jason Baron
vice virtio-net,speed=1,duplex=full' where speed is [-1...INT_MAX], and duplex is ["half"|"full"]. Signed-off-by: Jason Baron Cc: "Michael S. Tsirkin" Cc: Jason Wang --- hw/net/virtio-net.c | 29 +

Re: [PATCH v4.1 2/2] livepatch: force transition to finish

2017-12-15 Thread Jason Baron
On 11/22/2017 05:29 AM, Miroslav Benes wrote: > If a task sleeps in a set of patched functions uninterruptedly, it could > block the whole transition indefinitely. Thus it may be useful to clear > its TIF_PATCH_PENDING to allow the process to finish. > > Admin can do that now by writing to force

Re: [PATCH 0/3] livepatch: introduce atomic replace

2017-08-10 Thread Jason Baron
On 08/10/2017 07:12 AM, Miroslav Benes wrote: Ok - associating the "atomic replace" with the patch itself makes sense to me. It would also basically work, I think with the patch I proposed except for the case where the the "atomic replace" was on top of several non-"atomic replace" patches. T

Re: [PATCH v2 2/3] livepatch: add atomic replace

2017-09-12 Thread Jason Baron
On 09/12/2017 01:35 AM, Petr Mladek wrote: > On Mon 2017-09-11 23:46:28, Jason Baron wrote: >> On 09/11/2017 09:53 AM, Petr Mladek wrote: >>> On Wed 2017-08-30 17:38:44, Jason Baron wrote: >>>> diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h >

Re: [PATCH v2 2/3] livepatch: add atomic replace

2017-09-14 Thread Jason Baron
On 09/14/2017 06:32 AM, Petr Mladek wrote: > On Tue 2017-09-12 23:47:32, Jason Baron wrote: >> >> >> On 09/12/2017 01:35 AM, Petr Mladek wrote: >>> On Mon 2017-09-11 23:46:28, Jason Baron wrote: >>>> On 09/11/2017 09:53 AM, Petr Mladek wrote: >>&

Re: [PATCH 2/3] livepatch: add atomic replace

2017-08-30 Thread Jason Baron
On 08/25/2017 05:26 AM, Petr Mladek wrote: > On Wed 2017-07-19 13:18:06, Jason Baron wrote: >> Introduce atomic replace, by first creating a 'no_op' klp_func for all >> the functions that are reverted by patch B. > >> diff --git a/include/linux/livepatch.h b/

[PATCH v2 2/3] livepatch: add atomic replace

2017-08-30 Thread Jason Baron
. Patch A is now in a permanently disabled state. But if it is removed from the kernel with rmmod, it can be re-inserted (insmod), and act as an atomic replace on top of patch A. Signed-off-by: Jason Baron Cc: Josh Poimboeuf Cc: Jessica Yu Cc: Jiri Kosina Cc: Miroslav Benes Cc: Petr Mladek

[PATCH v2 1/3] livepatch: Add dynamic klp_object and klp_func iterators

2017-08-30 Thread Jason Baron
In preparation to introducing atomic replace, introduce iterators for klp_func and klp_object, such that objects and functions can be dynmically allocated (needed for atomic replace). This patch is intended to effectively be a no-op until atomic replace is introduced. Signed-off-by: Jason Baron

[PATCH v2 0/3] livepatch: introduce atomic replace

2017-08-30 Thread Jason Baron
d to klp_patch, similar to the immediate field -a 'replace' patch now disables all previous patches -tried to shorten klp_init_patch_no_ops()... -Simplified logic klp_complete_transition (Petr Mladek) Jason Baron (3): livepatch: Add dynamic klp_object and klp_func iterators livep

[PATCH v2 3/3] livepatch: Add a sysctl livepatch_mode for atomic replace

2017-08-30 Thread Jason Baron
ly. The intent is for the tool that creates the livepatch modules to set the 'replace' field in struct klp_patch to 1, to indicate that atomic replace mode is being requested, 0 otherwise. Signed-off-by: Jason Baron Cc: Josh Poimboeuf Cc: Jessica Yu Cc: Jiri Kosina Cc: Miroslav Be

Re: [PATCH 1/3] livepatch: Add klp_object and klp_func iterators

2017-08-24 Thread Jason Baron
Hi Petr, On 08/24/2017 10:25 AM, Petr Mladek wrote: > On Wed 2017-07-19 13:18:05, Jason Baron wrote: >> In preparation to introducing atomic replace, introduce iterators for >> klp_func >> and klp_object, such that objects and functions can be dynmically allocated >>

Re: [PATCH v2 2/3] livepatch: add atomic replace

2017-09-11 Thread Jason Baron
On 09/11/2017 09:53 AM, Petr Mladek wrote: > On Wed 2017-08-30 17:38:44, Jason Baron wrote: >> When doing cumulative patches, if patch A introduces a change to function 1, >> and patch B reverts the change to function 1 and introduces changes to say >> function 2 and 3 as

Re: [PATCH v3 1/2] livepatch: Add dynamic klp_object and klp_func iterators

2017-10-10 Thread Jason Baron
On 10/06/2017 05:22 PM, Josh Poimboeuf wrote: > On Wed, Sep 27, 2017 at 11:41:29PM -0400, Jason Baron wrote: >> In preparation to introducing atomic replace, introduce iterators for >> klp_func and klp_object, such that objects and functions can be dynamically >> allocat

[PATCH v3.1 2/3] livepatch: shuffle core.c function order

2017-10-10 Thread Jason Baron
In preparation for __klp_enable_patch() to call a number of 'static' functions, in a subsequent patch, move them earlier in core.c. This patch should be a nop from a functional pov. Signed-off-by: Jason Baron Cc: Josh Poimboeuf Cc: Jessica Yu Cc: Jiri Kosina Cc: Miroslav Benes

[PATCH v3.1 3/3] livepatch: add atomic replace

2017-10-10 Thread Jason Baron
epatch/kpatch-b/enabled 0 Note that it may be possible to unload (rmmod) replaced patches in some cases based on the consistency model, when we know that all the functions that are contained in the patch may no longer be in used, however its left as future work, if this functionality is desired. Sign

Re: [PATCH v3 2/2] livepatch: add atomic replace

2017-10-10 Thread Jason Baron
On 10/06/2017 06:32 PM, Josh Poimboeuf wrote: > On Wed, Sep 27, 2017 at 11:41:30PM -0400, Jason Baron wrote: >> Since 'atomic replace' has completely replaced all previous livepatch >> modules, it explicitly disables all previous livepatch modules. However, >>

Re: [RFC][PATCH] tracing/jump-labels: Add message when a trace event has no instances

2017-10-11 Thread Jason Baron
On 10/10/2017 06:56 PM, Steven Rostedt wrote: > From: Steven Rostedt (VMware) > > The TRACE_EVENT() macro creates a few data structures and several > helper functions. This takes up some memory. It dawned on me that if a > trace event is created but never used, it's like a header file that is >

[PATCH v3 0/2] livepatch: introduce atomic replace

2017-09-27 Thread Jason Baron
the immediate field -a 'replace' patch now disables all previous patches -tried to shorten klp_init_patch_no_ops()... -Simplified logic klp_complete_transition (Petr Mladek) Jason Baron (2): livepatch: Add dynamic klp_object and klp_func iterators livepatch: add atomic replace i

[PATCH v3 1/2] livepatch: Add dynamic klp_object and klp_func iterators

2017-09-27 Thread Jason Baron
In preparation to introducing atomic replace, introduce iterators for klp_func and klp_object, such that objects and functions can be dynamically allocated (needed for atomic replace). This patch is intended to effectively be a no-op until atomic replace is introduced. Signed-off-by: Jason Baron

[PATCH v3 2/2] livepatch: add atomic replace

2017-09-27 Thread Jason Baron
lp_enable_patch() calls klp_add_nops(), which necessitated moving a bunch of existing functions before __klp_enable_patch(). So there is a bit of churn in moving functions that are not modified. Signed-off-by: Jason Baron Cc: Josh Poimboeuf Cc: Jessica Yu Cc: Jiri Kosina Cc: Miroslav Benes Cc: Petr

[PATCH v4 0/3] livepatch: introduce atomic replace

2017-10-12 Thread Jason Baron
ps()... -Simplified logic klp_complete_transition (Petr Mladek) Jason Baron (3): livepatch: use lists to manage patches, objects and functions livepatch: shuffle core.c function order livepatch: add atomic replace include/linux/livepatch.h | 23 +- kernel/livepatch/core.c |

[PATCH v4 2/3] livepatch: shuffle core.c function order

2017-10-12 Thread Jason Baron
In preparation for __klp_enable_patch() to call a number of 'static' functions, in a subsequent patch, move them earlier in core.c. This patch should be a nop from a functional pov. Signed-off-by: Jason Baron Cc: Josh Poimboeuf Cc: Jessica Yu Cc: Jiri Kosina Cc: Miroslav Benes

[PATCH v4 3/3] livepatch: add atomic replace

2017-10-12 Thread Jason Baron
epatch/kpatch-b/enabled 0 Note that it may be possible to unload (rmmod) replaced patches in some cases based on the consistency model, when we know that all the functions that are contained in the patch may no longer be in used, however its left as future work, if this functionality is desired. Sign

[PATCH v4 1/3] livepatch: use lists to manage patches, objects and functions

2017-10-12 Thread Jason Baron
together via linked lists. This allows us to more easily allocate new objects and functions, while having the iterator be a simple linked list walk. This patch is intended to be a no-op until atomic replace is introduced by a subsequent patch. Signed-off-by: Jason Baron Cc: Josh Poimboeuf Cc: Jessica

[PATCH] epoll: avoid calling ep_call_nested() from ep_poll_safewake()

2017-10-13 Thread Jason Baron
x27;t think CONFIG_DEBUG_LOCK_ALLOC is generally used for production. This patch, also apparently fixes a workload at Google that Salman Qazi reported by completely removing the poll_safewake_ncalls->lock from wakeup paths. Signed-off-by: Jason Baron Cc: Alexander Viro Cc: Andrew Morton Cc: Sal

[PATCH] intel_idle: replace conditionals with static_cpu_has(X86_FEATURE_ARAT)

2017-10-06 Thread Jason Baron
If the 'arat' cpu flag is set, then the conditionals in intel_idle() that guard calling tick_broadcast_enter()/exit() will never be true. Use static_cpu_has(X86_FEATURE_ARAT) to create a fast path to replace the conditional. Signed-off-by: Jason Baron Cc: Jacob Pan Cc: Len Brown Cc

Re: [PATCH] intel_idle: replace conditionals with static_cpu_has(X86_FEATURE_ARAT)

2017-10-06 Thread Jason Baron
On 10/06/2017 02:36 PM, Jacob Pan wrote: > On Fri, 6 Oct 2017 13:19:45 -0400 > Jason Baron wrote: > >> If the 'arat' cpu flag is set, then the conditionals in intel_idle() >> that guard calling tick_broadcast_enter()/exit() will never be true. >> Use stati

nowait aio return value

2017-07-26 Thread Jason Baron
Hi, In testing nowait aio on ext4, I found that when appending to a file the return value is EAGAIN/EWOULDBLOCK, because as mentioned in the commit this will potentially trigger an allocation. However, the EAGAIN, seems somewhat misleading to me, in that if I continuously try the write, it wil

Re: waitqueue lockdep annotation

2017-11-30 Thread Jason Baron
On 11/30/2017 03:50 PM, Andrew Morton wrote: > On Thu, 30 Nov 2017 06:20:35 -0800 Christoph Hellwig wrote: > >> Hi all, >> >> this series adds a strategic lockdep_assert_held to __wake_up_common >> to ensure callers really do hold the wait_queue_head lock when calling >> the unlocked wake_up va

Re: waitqueue lockdep annotation

2017-11-30 Thread Jason Baron
On 11/30/2017 05:11 PM, Christoph Hellwig wrote: > On Thu, Nov 30, 2017 at 04:38:02PM -0500, Jason Baron wrote: >> I don't think there is a bug here. The 'wake_up_locked()' calls in epoll >> are being protected by the ep->lock, not the wait_queue_head lock. S

Re: waitqueue lockdep annotation

2017-12-01 Thread Jason Baron
On 12/01/2017 12:11 PM, Christoph Hellwig wrote: > On Thu, Nov 30, 2017 at 05:18:07PM -0500, Jason Baron wrote: >> Yes, but for those cases it uses the ep->poll_wait waitqueue not the >> ep->wq, which is guarded by the ep->wq->lock. > > True. So it looks

Re: waitqueue lockdep annotation

2017-12-01 Thread Jason Baron
On 12/01/2017 05:02 PM, Christoph Hellwig wrote: > On Fri, Dec 01, 2017 at 02:00:33PM -0500, Jason Baron wrote: >> You could leave the annotation and do something like: >> s/ep->lock/ep->wq->lock. And then that would remove the ep->lock saving >> a bit of space. &g

Re: [PATCH 1/2] epoll: use the waitqueue lock to protect ep->wq

2017-12-07 Thread Jason Baron
rt locking invariations in the waitqueue code. > > Signed-off-by: Christoph Hellwig Probably should also fix the locking comments at the top of fs/eventpoll.c that refer to ep->lock... The rest looks good. Reviewed-by: Jason Baron Thanks,

Re: [jump_label_test] WARNING: CPU: 0 PID: 1 at kernel/jump_label.c:761 jump_label_test+0x63/0xab

2017-11-09 Thread Jason Baron
On 11/08/2017 02:01 AM, Fengguang Wu wrote: > On Tue, Nov 07, 2017 at 05:17:38PM -0500, Jason Baron wrote: >> >> >> On 11/07/2017 04:27 AM, Fengguang Wu wrote: >>> Hello, >>> >>> FYI this happens in v4.14-rc8 -- it's not necessarily a new bug

Re: [jump_label_test] WARNING: CPU: 0 PID: 1 at kernel/jump_label.c:761 jump_label_test+0x63/0xab

2017-11-10 Thread Jason Baron
On 11/09/2017 03:56 PM, Paul E. McKenney wrote: > On Thu, Nov 09, 2017 at 03:13:24PM -0500, Jason Baron wrote: >> On 11/08/2017 02:01 AM, Fengguang Wu wrote: >>> On Tue, Nov 07, 2017 at 05:17:38PM -0500, Jason Baron wrote: >>>> >>>> >>>> O

Re: [PATCH 1/2] dynamic_debug: fix optional/omitted ending line number to be LARGE instead of 0

2017-11-10 Thread Jason Baron
ddebug_parse_query: last-line:0 < 1st-line:1 > dynamic_debug:ddebug_exec_query: query parse failed > > Signed-off-by: Randy Dunlap > Cc: Jason Baron > --- > lib/dynamic_debug.c |4 > 1 file changed, 4 insertions(+) > > --- lnx-414-rc8.orig/lib/dynamic_debug.c > +++ lnx-414

Re: BUG: KASAN: use-after-scope in ep_poll+0x5cd/0xc90

2017-11-30 Thread Jason Baron
Hi, On 11/29/2017 10:41 PM, Fengguang Wu wrote: > Hello, > > FYI this happens in mainline kernel 4.15.0-rc1. > It looks a new regression and bisect is on the way. > > It occurs in 3 out of 3 boots. > > [ 35.704690] init: Failed to create pty - disabling logging for job > [ 35.706676] init:

Re: [jump_label_test] WARNING: CPU: 0 PID: 1 at kernel/jump_label.c:761 jump_label_test+0x63/0xab

2017-11-07 Thread Jason Baron
On 11/07/2017 04:27 AM, Fengguang Wu wrote: > Hello, > > FYI this happens in v4.14-rc8 -- it's not necessarily a new bug. > Hi, So this looks like the branches aren't getting updated because the WARN_ON()s are all from the second half of the test loop (where we actually change the branch direc

Re: [jump_label_test] WARNING: CPU: 0 PID: 1 at kernel/jump_label.c:761 jump_label_test+0x63/0xab

2017-11-08 Thread Jason Baron
On 11/08/2017 02:01 AM, Fengguang Wu wrote: > On Tue, Nov 07, 2017 at 05:17:38PM -0500, Jason Baron wrote: >> >> >> On 11/07/2017 04:27 AM, Fengguang Wu wrote: >>> Hello, >>> >>> FYI this happens in v4.14-rc8 -- it's not necessarily a new bug

[tip:locking/urgent] jump_label: Invoke jump_label_test() via early_initcall()

2017-11-14 Thread tip-bot for Jason Baron
Commit-ID: 92ee46efeb505ead3ab06d3c5ce695637ed5f152 Gitweb: https://git.kernel.org/tip/92ee46efeb505ead3ab06d3c5ce695637ed5f152 Author: Jason Baron AuthorDate: Mon, 13 Nov 2017 16:48:47 -0500 Committer: Ingo Molnar CommitDate: Tue, 14 Nov 2017 08:41:41 +0100 jump_label: Invoke

[tip:core/debug] panic: Make panic_timeout configurable

2013-11-26 Thread tip-bot for Jason Baron
Commit-ID: 5800dc3cff87c3a1548382298bb16e1fb4ec7e32 Gitweb: http://git.kernel.org/tip/5800dc3cff87c3a1548382298bb16e1fb4ec7e32 Author: Jason Baron AuthorDate: Mon, 25 Nov 2013 23:23:04 + Committer: Ingo Molnar CommitDate: Tue, 26 Nov 2013 12:12:26 +0100 panic: Make panic_timeout

[tip:core/debug] powerpc: Clean up panic_timeout usage

2013-11-26 Thread tip-bot for Jason Baron
Commit-ID: b71d47c14fba6270c0b5a0d56639bf042017025b Gitweb: http://git.kernel.org/tip/b71d47c14fba6270c0b5a0d56639bf042017025b Author: Jason Baron AuthorDate: Mon, 25 Nov 2013 23:23:11 + Committer: Ingo Molnar CommitDate: Tue, 26 Nov 2013 12:12:28 +0100 powerpc: Clean up

[tip:sched/core] sched: Fix static_key race with sched_feat()

2014-07-16 Thread tip-bot for Jason Baron
Commit-ID: 5cd08fbfdb6baa9fe98f530b76898fc5725a6289 Gitweb: http://git.kernel.org/tip/5cd08fbfdb6baa9fe98f530b76898fc5725a6289 Author: Jason Baron AuthorDate: Wed, 2 Jul 2014 15:52:44 + Committer: Ingo Molnar CommitDate: Wed, 16 Jul 2014 13:38:21 +0200 sched: Fix static_key race

[tip:sched/core] sched: Remove extra static_key*() function indirection

2014-07-16 Thread tip-bot for Jason Baron
Commit-ID: 6e76ea8a8209386c3cc7ee5594e6ea5d25525cf2 Gitweb: http://git.kernel.org/tip/6e76ea8a8209386c3cc7ee5594e6ea5d25525cf2 Author: Jason Baron AuthorDate: Wed, 2 Jul 2014 15:52:41 + Committer: Ingo Molnar CommitDate: Wed, 16 Jul 2014 13:38:20 +0200 sched: Remove extra

[tip:locking/core] jump_label: Provide a self-test

2015-08-03 Thread tip-bot for Jason Baron
Commit-ID: 579e1acb153464649781feb4892c0ff84a40 Gitweb: http://git.kernel.org/tip/579e1acb153464649781feb4892c0ff84a40 Author: Jason Baron AuthorDate: Thu, 30 Jul 2015 03:59:44 + Committer: Ingo Molnar CommitDate: Mon, 3 Aug 2015 11:51:11 +0200 jump_label: Provide a self

[tip:locking/core] jump label, locking/static_keys: Update docs

2015-08-03 Thread tip-bot for Jason Baron
Commit-ID: 412758cb26704e5087ca2976ec3b28fb2bdbfad4 Gitweb: http://git.kernel.org/tip/412758cb26704e5087ca2976ec3b28fb2bdbfad4 Author: Jason Baron AuthorDate: Thu, 30 Jul 2015 03:59:48 + Committer: Ingo Molnar CommitDate: Mon, 3 Aug 2015 11:51:14 +0200 jump label, locking

<    1   2   3   4   5