[PATCH] MAINTAINERS: Add me to Android drivers

2018-10-04 Thread Joel Fernandes (Google)
locking. So I would like to be added to the MAINTAINERS file for android drivers for review and maintenance of ashmem and other Android drivers. Cc: tk...@google.com Cc: gre...@linuxfoundation.org Signed-off-by: Joel Fernandes (Google) --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH RFC] mm: Add an fs-write seal to memfd

2018-10-05 Thread Joel Fernandes (Google)
ret=3 map 0 passed write passed map 1 prot-write passed as expected fs-write seal now active write failed as expected due to fs-write seal map 2 prot-write failed as expected due to seal : Permission denied map 3 prot-read passed as expected Cc: jr...@google.com Cc: john.stu...@linaro.org Cc: t

[PATCH] trace: Use rcu_dereference_raw for hooks from trace-event subsystem

2018-08-02 Thread Joel Fernandes (Google)
] ? start_kernel+0x49d/0x4bd [ 282.093987] ? secondary_startup_64+0xa5/0xb0 Reported-by: Masami Hiramatsu Fixes: e6753f23d961 ("tracepoint: Make rcuidle tracepoint callers use SRCU") Signed-off-by: Joel Fernandes (Google) --- kernel/trace/trace_events.c | 4 ++-- 1 file changed, 2 insert

[PATCH] doc: rcu: Fix code listing in performance and scalability requirements

2018-10-14 Thread Joel Fernandes (Google)
The code listing under this section has a quick quiz that says line 19 uses rcu_access_pointer, but the code listing itself does not. Fix this. Signed-off-by: Joel Fernandes (Google) --- .../RCU/Design/Requirements/Requirements.html| 2 +- kernel/sys.c

[PATCH ftrace/core] tracing: irqsoff: Account for additional preempt_disable

2018-08-05 Thread Joel Fernandes (Google)
oints and unify their usage") Fixes: e6753f23d961 ("tracepoint: Make rcuidle tracepoint callers use SRCU") Reported-by: Masami Hiramatsu Signed-off-by: Joel Fernandes (Google) --- kernel/trace/trace_irqsoff.c | 26 ++ 1 file changed, 26 insertions(+) diff

[RFC] tracepoint: Run tracepoints even after CPU is offline

2018-08-05 Thread Joel Fernandes (Google)
f-by: Joel Fernandes (Google) --- include/linux/tracepoint.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index d9a084c72541..020885714a0f 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.

[PATCH RFC] tracepoint: Use SRCU for all tracepoint invocations

2018-08-07 Thread Joel Fernandes (Google)
ate SRCU node for tracepoints called from in_nmi(). This is needed to also make tracepoints work while CPU is offline. Fixes: c3bc8fd637a9 ("tracing: Centralize preemptirq tracepoints and unify their usage") Reported-by: Masami Hiramatsu Signed-off-by: Joel

[PATCH RFC ftrace/core] tracing: Directly call tracer and lockdep probes

2018-08-08 Thread Joel Fernandes (Google)
Fernandes (Google) --- Steve, I expanded your partial revert such that it fixes the remaining issues as well while keeping the clean ups and benefits of my original patch. Its based on the latest ftrace/core. I'm still testing it, but it works so far. What do you think? I feel like it could still

[PATCH v1 1/2] Add polling support to pidfd

2019-04-25 Thread Joel Fernandes (Google)
: Jonathan Kowalski Cc: torva...@linux-foundation.org Cc: kernel-t...@android.com Co-developed-by: Daniel Colascione Signed-off-by: Joel Fernandes (Google) --- RFC -> v1: * Based on CLONE_PIDFD patches: https://lwn.net/Articles/786244/ * Updated selftests. * Renamed poll wake function to do_notify_pi

[PATCH v1 2/2] Add selftests for pidfd polling

2019-04-25 Thread Joel Fernandes (Google)
, then the thread group leader is signaled to exit and is replaced with the execing thread as the new leader, however the parent is not notified in this case. Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/pidfd/Makefile | 2 +- tools/testing/selftests/pidfd

[PATCH v2 4/4] tools: Sync uapi headers with new bpf function calls

2019-05-06 Thread Joel Fernandes (Google)
The uapi in tools/ needs an update after support for new bpf function calls were added. This commit does the same. Signed-off-by: Joel Fernandes (Google) --- tools/include/uapi/linux/bpf.h | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi

[PATCH v2 3/4] bpf: Add warning when program uses deprecated bpf_probe_read

2019-05-06 Thread Joel Fernandes (Google)
bpf_probe_read is deprecated and ambiguous. Add a warning if programs still use it, so that they may be moved to not use it. After sufficient time, the warning can be removed. Signed-off-by: Joel Fernandes (Google) --- kernel/bpf/verifier.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH v2 1/4] bpf: Add support for reading user pointers

2019-05-06 Thread Joel Fernandes (Google)
Fernandes (Google) --- Masami, could you carry these patches in the series where are you add probe_user_read function? Previous submissions is here: https://lore.kernel.org/patchwork/patch/1069552/ v1->v2: split tools uapi sync into separate commit, added deprecation warning for old bpf_probe_r

[PATCH RFC] bpf: Add support for reading user pointers

2019-05-02 Thread Joel Fernandes (Google)
: Srinivas Ramana Cc: duyuchao Cc: Manjo Raja Rao Cc: Karim Yaghmour Cc: Tamir Carmeli Cc: Yonghong Song Cc: Alexei Starovoitov Cc: Brendan Gregg Cc: Masami Hiramatsu Cc: Peter Ziljstra Cc: Steven Rostedt Cc: Kees Cook Cc: kernel-t...@android.com Signed-off-by: Joel Fernandes (Google

[PATCH v2 1/2] Add polling support to pidfd

2019-04-30 Thread Joel Fernandes (Google)
Viro Cc: Kees Cook Cc: David Howells Cc: Oleg Nesterov Cc: kernel-t...@android.com (Oleg improved the code by showing how to avoid tasklist_lock) Suggested-by: Oleg Nesterov Co-developed-by: Daniel Colascione Signed-off-by: Daniel Colascione Signed-off-by: Joel Fernandes (Google) --- v1

[PATCH v2 2/2] Add selftests for pidfd polling

2019-04-30 Thread Joel Fernandes (Google)
, then the thread group leader is signaled to exit and is replaced with the execing thread as the new leader, however the parent is not notified in this case. Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/pidfd/Makefile | 2 +- tools/testing/selftests/pidfd

[PATCH v4 1/2] kheaders: Move from proc to sysfs

2019-05-15 Thread Joel Fernandes (Google)
-by: Steven Rostedt Signed-off-by: Joel Fernandes (Google) --- This patch applies on top of the previous patch that was applied to the driver tree: https://lore.kernel.org/patchwork/patch/1067310/ v2->v3: Fixed sysfs file mode nit (Greg). v1->v2: Fixed some kconfig nits (Masami). init/K

[PATCH -manpage 1/2] fcntl.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal

2019-03-14 Thread Joel Fernandes (Google)
More details of the seal can be found in the LKML patch: https://lore.kernel.org/lkml/20181120052137.74317-1-j...@joelfernandes.org/T/#t Signed-off-by: Joel Fernandes (Google) --- man2/fcntl.2 | 15 +++ 1 file changed, 15 insertions(+) diff --git a/man2/fcntl.2 b/man2/fcntl.2 index

[PATCH -manpage 0/2]

2019-03-14 Thread Joel Fernandes (Google)
This documentation is for F_SEAL_FUTURE_WRITE patches that are in linux-next. Joel Fernandes (Google) (2): fcntl.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal memfd_create.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal man2/fcntl.2| 15 +++ man2

[PATCH -manpage 2/2] memfd_create.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal

2019-03-14 Thread Joel Fernandes (Google)
More details of the seal can be found in the LKML patch: https://lore.kernel.org/lkml/20181120052137.74317-1-j...@joelfernandes.org/T/#t Signed-off-by: Joel Fernandes (Google) --- man2/memfd_create.2 | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/man2

[PATCH v2 1/4] lockdep: Add assertion to check if in an interrupt

2019-03-26 Thread Joel Fernandes (Google)
: kernel-t...@android.com Cc: r...@vger.kernel.org Signed-off-by: Joel Fernandes (Google) --- include/linux/lockdep.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index c5335df2372f..d24f564823d3 100644 --- a/include/linux/lockdep.h +++ b

[PATCH v2 3/4] rcutorture: Select from only online CPUs

2019-03-26 Thread Joel Fernandes (Google)
the online CPUs on the system. Cc: r...@vger.kernel.org Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/rcutorture/bin/jitter.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/jitter.sh b/tools/testing/selftests

[PATCH v2 2/4] rcutree: Add checks for dynticks counters in rcu_is_cpu_rrupt_from_idle

2019-03-26 Thread Joel Fernandes (Google)
chul.p...@lge.com Cc: kernel-t...@android.com Cc: r...@vger.kernel.org Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/tree.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 9180158756d2..dbff8a274c46 100

[PATCH v2 4/4] rcutorture: Add cpu0 to the set of CPUs to add jitter

2019-03-26 Thread Joel Fernandes (Google)
jitter.sh currently does not add CPU0 to the list of CPUs for adding of jitter. Let us add it to this list even when it is not hot-pluggable. Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/rcutorture/bin/jitter.sh | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions

[PATCH] Convert struct pid count to refcount_t

2019-03-27 Thread Joel Fernandes (Google)
...@lists.openwall.com Signed-off-by: Joel Fernandes (Google) --- include/linux/pid.h | 5 +++-- kernel/pid.c| 8 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/linux/pid.h b/include/linux/pid.h index 14a9a39da9c7..8cb86d377ff5 100644 --- a/include/linux/pid.h

[PATCH v3 2/2] Add selftests for module build using in-kernel headers

2019-02-27 Thread Joel Fernandes (Google)
This test tries to build a module successfully using the in-kernel headers found in /proc/kheaders.tar.xz. Verified pass and fail scenarios by running: make -C tools/testing/selftests TARGETS=kheaders run_tests Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/Makefile

[PATCH v3 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-02-27 Thread Joel Fernandes (Google)
_ST and IKHD_ED markers as is to facilitate future patches that would extract the headers from a kernel or module image. Signed-off-by: Joel Fernandes (Google) --- Changes since v2: (Thanks to Masahiro Yamada for several excellent suggestions) - Added support for out of tree builds. - Ad

[PATCH 1/2] module: Prepare for addition of new ro_after_init sections

2019-04-09 Thread Joel Fernandes (Google)
...@linux.vnet.ibm.com Cc: rost...@goodmis.org Cc: mathieu.desnoy...@efficios.com Cc: r...@vger.kernel.org Cc: kernel-harden...@lists.openwall.com Cc: kernel-t...@android.com Suggested-by: keesc...@chromium.org Signed-off-by: Joel Fernandes (Google) --- kernel/module.c | 42

[PATCH 2/2] module: Make srcu_struct ptr array as read-only post init

2019-04-09 Thread Joel Fernandes (Google)
f pointers to be writable, and can cause security or other hidden bugs. Mark these are read-only after the module init has completed. Suggested-by: paul...@linux.vnet.ibm.com Suggested-by: keesc...@chromium.org Signed-off-by: Joel Fernandes (Google) --- kernel/module.c | 9 - 1 file changed, 8 insert

[PATCH v2 2/3] module: Make srcu_struct ptr array as read-only post init

2019-04-10 Thread Joel Fernandes (Google)
f pointers to be writable, and can cause security or other hidden bugs. Mark these are read-only after the module init has completed. Suggested-by: paul...@linux.vnet.ibm.com Suggested-by: keesc...@chromium.org Acked-by: keesc...@chromium.org Signed-off-by: Joel Fernandes (Google) --- kernel/module.c | 10 +++

[PATCH v2 1/3] module: Prepare for addition of new ro_after_init sections

2019-04-10 Thread Joel Fernandes (Google)
(Google) --- kernel/module.c | 41 +++-- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index 524da609c884..1acddb93282a 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -3300,11 +3300,27 @@ static bool

[PATCH v2 3/3] module: Make __tracepoints_ptrs as read-only

2019-04-10 Thread Joel Fernandes (Google)
security or other hidden bugs. Mark these as ro_after_init. Suggested-by: paul...@linux.vnet.ibm.com Suggested-by: keesc...@chromium.org Suggested-by: mathieu.desnoy...@efficios.com Cc: rost...@goodmis.org Signed-off-by: Joel Fernandes (Google) --- kernel/module.c | 6 ++ 1 file changed, 6

[PATCH v3 3/3] module: Make __tracepoints_ptrs as read-only

2019-04-10 Thread Joel Fernandes (Google)
security or other hidden bugs. Mark these as ro_after_init. Suggested-by: paul...@linux.vnet.ibm.com Suggested-by: keesc...@chromium.org Suggested-by: mathieu.desnoy...@efficios.com Cc: rost...@goodmis.org Signed-off-by: Joel Fernandes (Google) --- kernel/module.c | 6 ++ 1 file changed, 6

[PATCH v3 1/3] module: Prepare for addition of new ro_after_init sections

2019-04-10 Thread Joel Fernandes (Google)
(Google) --- kernel/module.c | 41 +++-- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index 524da609c884..42e4e289d6c7 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -3300,11 +3300,27 @@ static bool

[PATCH v3 2/3] module: Make srcu_struct ptr array as read-only post init

2019-04-10 Thread Joel Fernandes (Google)
f pointers to be writable, and can cause security or other hidden bugs. Mark these are read-only after the module init has completed. Suggested-by: paul...@linux.vnet.ibm.com Suggested-by: keesc...@chromium.org Acked-by: keesc...@chromium.org Signed-off-by: Joel Fernandes (Google) --- kernel/module.c | 6

[PATCH RFC 2/2] Add selftests for pidfd polling

2019-04-11 Thread Joel Fernandes (Google)
, then the thread group leader is signaled to exit and is replaced with the execing thread as the new leader, however the parent is not notified in this case. Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/pidfd/Makefile | 2 +- tools/testing/selftests/pidfd

[PATCH RFC 1/2] Add polling support to pidfd

2019-04-11 Thread Joel Fernandes (Google)
/lkml/20181029175322.189042-1-dan...@google.com/ Cc: l...@amacapital.net Cc: rost...@goodmis.org Cc: dan...@google.com Cc: christ...@brauner.io Cc: ja...@google.com Cc: sur...@google.com Cc: torva...@linux-foundation.org Co-developed-by: Daniel Colascione Signed-off-by: Joel Fernandes (Google

[PATCH] srcu: Remove unused vmlinux srcu linker entries

2019-04-07 Thread Joel Fernandes (Google)
it is able to find and initialize the srcu structures. Cc: kernel-t...@android.com Cc: paul...@linux.vnet.ibm.com Signed-off-by: Joel Fernandes (Google) --- include/asm-generic/vmlinux.lds.h | 4 1 file changed, 4 deletions(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm

[PATCH v2] srcu: Remove unused vmlinux srcu linker entries

2019-04-07 Thread Joel Fernandes (Google)
initialize the srcu structures. Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: kernel-t...@android.com Cc: paul...@linux.vnet.ibm.com Signed-off-by: Joel Fernandes (Google) --- v1->v2: Added more context to change log. include/asm-generic/vmlinux.lds.h | 4

[PATCH v2 0/4] RCU fixes for rcu_assign_pointer() usage

2019-03-20 Thread Joel Fernandes (Google)
added in the series can also help avoid future incorrect usages and bugs so it is a good idea to do in any case. RFC v1 -> Patch v2: Made changes based on Peter Zijlstra review. Joel Fernandes (Google) (4): sched/cpufreq: Annotate cpufreq_update_util_data pointer with __rcu sched_domain: Annot

[PATCH v2 2/4] sched_domain: Annotate RCU pointers properly

2019-03-20 Thread Joel Fernandes (Google)
fair.c:9421:16: error: incompatible types in comparison expression fair.c:9421:16: error: incompatible types in comparison expression [From an RCU perspective] Reviewed-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) --- include/linux/sched/topology.h | 4 ++-- kernel/sched/sched.h

[PATCH v2 3/4] rcuwait: Annotate task_struct with __rcu

2019-03-20 Thread Joel Fernandes (Google)
E. McKenney Signed-off-by: Joel Fernandes (Google) --- include/linux/rcuwait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/rcuwait.h b/include/linux/rcuwait.h index 90bfa3279a01..563290fc194f 100644 --- a/include/linux/rcuwait.h +++ b/include/linux/rcuwait.h

[PATCH v2 1/4] sched/cpufreq: Annotate cpufreq_update_util_data pointer with __rcu

2019-03-20 Thread Joel Fernandes (Google)
(Google) --- kernel/sched/cpufreq.c | 2 +- kernel/sched/sched.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/cpufreq.c b/kernel/sched/cpufreq.c index 835671f0f917..b5dcd1d83c7f 100644 --- a/kernel/sched/cpufreq.c +++ b/kernel/sched/cpufreq.c @@ -7,7 +7,7

[PATCH v2 4/4] sched: Annotate perf_domain pointer with __rcu

2019-03-20 Thread Joel Fernandes (Google)
. McKenney Signed-off-by: Joel Fernandes (Google) --- kernel/sched/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 2b452d68ab2e..b52ed1ada0be 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -780,7 +780,7

[PATCH] module: Make srcu_struct ptr array as read-only

2019-04-11 Thread Joel Fernandes (Google)
mod); Cc: Rasmus Villemoes Cc: paul...@linux.vnet.ibm.com Cc: rost...@goodmis.org Cc: mathieu.desnoy...@efficios.com Cc: r...@vger.kernel.org Cc: kernel-harden...@lists.openwall.com Cc: kernel-t...@android.com Signed-off-by: Joel Fernandes (Google) --- This single patch superceded the patches at: ht

[RFC 1/2] lockdep: Add assertion to check if in an interrupt

2019-03-22 Thread Joel Fernandes (Google)
: kernel-t...@android.com Cc: r...@vger.kernel.org Signed-off-by: Joel Fernandes (Google) --- include/linux/lockdep.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index c5335df2372f..d24f564823d3 100644 --- a/include/linux/lockdep.h +++ b

[RFC 2/2] rcutree: Add checks for dynticks counters in rcu_is_cpu_rrupt_from_idle

2019-03-22 Thread Joel Fernandes (Google)
chul.p...@lge.com Cc: kernel-t...@android.com Cc: r...@vger.kernel.org Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/tree.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 9180158756d2..d94c8ed29f6b 100

[PATCH] rcutorture: Select from only online CPUs

2019-03-22 Thread Joel Fernandes (Google)
the online CPUs on the system. Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/rcutorture/bin/jitter.sh | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/bin/jitter.sh b/tools/testing/selftests/rcutorture/bin/jitter.sh

[RFC 2/5] ixgbe: Fix incorrect RCU API usage

2019-02-19 Thread Joel Fernandes (Google)
From: Joel Fernandes Recently, I added an RCU annotation check in rcu_assign_pointer. This caused a sparse error to be reported by the ixgbe driver. Further looking, it seems the adapter->xdp_prog pointer is not annotated with __rcu. Annonating it fixed the error, but caused a bunch of other

[RFC 1/5] net: rtnetlink: Fix incorrect RCU API usage

2019-02-19 Thread Joel Fernandes (Google)
From: Joel Fernandes rtnl_register_internal() and rtnl_unregister_all tries to directly dereference an RCU protected pointed outside RCU read side section. While this is Ok to do since a lock is held, let us use the correct API to avoid programmer bugs in the future. This also fixes sparse

[RFC 0/5] RCU fixes for rcu_assign_pointer usage

2019-02-19 Thread Joel Fernandes (Google)
These patches fix various RCU API usage issues found due to sparse errors as a result of the recent check to add rcu_check_sparse() to rcu_assign_pointer(). This is very early RFC stage, and is only build tested. I am also only sending to the RCU group for initial review before sending to LKML.

[RFC 4/5] sched/toplogy: Use smp_store_release() instead of rcu_assign_pointer

2019-02-19 Thread Joel Fernandes (Google)
From: Joel Fernandes The scheduler's topology code seems to want to use rcu_assign_pointer() to initialize various pointers for no apparent reason. With a guess that what was needed here is smp_store_release(), I am replacing it with that. This suppresses the new sparse errors caused by an

[RFC 3/5] sched/cpufreq: Fix incorrect RCU API usage

2019-02-19 Thread Joel Fernandes (Google)
From: Joel Fernandes Recently I added an RCU annotation check to rcu_assign_pointer(). All pointers assigned to RCU protected data are to be annotated with __rcu inorder to be able to use rcu_assign_pointer() similar to checks in other RCU APIs. This resulted in a sparse error:

[RFC 5/5] rcuwait: Replace rcu_assign_pointer with smp_store_release

2019-02-19 Thread Joel Fernandes (Google)
From: Joel Fernandes This suppresses a sparse error generated to the recently added rcu_assign_pointer sparse check: >> kernel//locking/percpu-rwsem.c:162:9: sparse: error: incompatible types in comparison expression (different address spaces) Signed-off-by: Joel Fernandes ---

[PATCH RFC 0/5] RCU fixes for rcu_assign_pointer() usage

2019-02-20 Thread Joel Fernandes (Google)
time since fixing them is a bit more involved). Joel Fernandes (Google) (5): net: rtnetlink: Fix incorrect RCU API usage ixgbe: Fix incorrect RCU API usage sched/cpufreq: Fix incorrect RCU API usage sched/topology: Annonate RCU pointers properly rcuwait: Replace rcu_assign_pointer() with WRITE_ONCE

[PATCH RFC 2/5] ixgbe: Fix incorrect RCU API usage

2019-02-20 Thread Joel Fernandes (Google)
rea to test it properly. Signed-off-by: Joel Fernandes (Google) --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 4 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 17 - 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgb

[PATCH RFC 4/5] sched/topology: Annonate RCU pointers properly

2019-02-20 Thread Joel Fernandes (Google)
/sched/topology.c:618:9: sparse: error: incompatible types in comparison expression (different address spaces) kernel//sched/topology.c:621:9: sparse: error: incompatible types in comparison expression (different address spaces) Signed-off-by: Joel Fernandes (Google) --- kernel/sched/sched.h

[PATCH RFC 1/5] net: rtnetlink: Fix incorrect RCU API usage

2019-02-20 Thread Joel Fernandes (Google)
not using RCU API. net/core/rtnetlink.c:332:13: warning: incorrect type in assignment (different address spaces) net/core/rtnetlink.c:332:13:expected struct rtnl_link **tab net/core/rtnetlink.c:332:13:got struct rtnl_link *[noderef] * Signed-off-by: Joel Fernandes (Google) --- net/core

[PATCH RFC 3/5] sched/cpufreq: Fix incorrect RCU API usage

2019-02-20 Thread Joel Fernandes (Google)
and replaced with, say, WRITE_ONCE or smp_store_release. Or, may be we add a new API to do it. But calls rcu_assign_pointer seems an abuse of the RCU API unless RCU is being used. Signed-off-by: Joel Fernandes (Google) --- kernel/sched/cpufreq.c | 8 ++-- kernel/sched/sched.h | 2 +- 2 files changed

[PATCH RFC 5/5] rcuwait: Replace rcu_assign_pointer() with WRITE_ONCE

2019-02-20 Thread Joel Fernandes (Google)
ed-off-by: Joel Fernandes (Google) --- include/linux/rcuwait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/rcuwait.h b/include/linux/rcuwait.h index 90bfa3279a01..9e5b4760e6c2 100644 --- a/include/linux/rcuwait.h +++ b/include/linux/rcuwait.h @@ -44,7 +44,7 @@ exter

[PATCH v2 2/6] ixgbe: Fix incorrect RCU API usage

2019-02-22 Thread Joel Fernandes (Google)
rea to review / test it properly. The sparse error fixed is: ixgbe_main.c:10256:25: error: incompatible types in comparison expression Signed-off-by: Joel Fernandes (Google) --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 4 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |

[PATCH v2 0/6] RCU fixes for rcu_assign_pointer() usage

2019-02-22 Thread Joel Fernandes (Google)
and bugs so it is a good idea to do in any case. RFC v1 -> Patch v2: Made changes to various scheduler patches (Peter Zijlstra) Joel Fernandes (Google) (6): net: rtnetlink: Fix incorrect RCU API usage ixgbe: Fix incorrect RCU API usage sched/cpufreq: Annotate cpufreq_update_util_data pointer with __

[PATCH v2 3/6] sched/cpufreq: Annotate cpufreq_update_util_data pointer with __rcu

2019-02-22 Thread Joel Fernandes (Google)
: error: incompatible types in comparison expression (different address spaces) Fix this by annotating cpufreq_update_util_data pointer with __rcu. This will also help sparse catch any future RCU misuage bugs. Signed-off-by: Joel Fernandes (Google) --- kernel/sched/cpufreq.c | 2 +- kernel/sched

[PATCH v2 4/6] sched_domain: Annotate RCU pointers properly

2019-02-22 Thread Joel Fernandes (Google)
fair.c:9421:16: error: incompatible types in comparison expression fair.c:9421:16: error: incompatible types in comparison expression Signed-off-by: Joel Fernandes (Google) --- include/linux/sched/topology.h | 4 ++-- kernel/sched/sched.h | 14 +++--- kernel/sched/topology.c

[PATCH v2 5/6] rcuwait: Annotate task_struct with __rcu

2019-02-22 Thread Joel Fernandes (Google)
This suppresses sparse error generated due to the recently added rcu_assign_pointer sparse check. percpu-rwsem.c:162:9: sparse: error: incompatible types in comparison expression exit.c:316:16: sparse: error: incompatible types in comparison expression Signed-off-by: Joel Fernandes (Google

[PATCH v2 6/6] sched: Annotate perf_domain pointer with __rcu

2019-02-22 Thread Joel Fernandes (Google)
This fixes the following sparse errors in sched/fair.c: fair.c:6506:14: error: incompatible types in comparison expression fair.c:8642:21: error: incompatible types in comparison expression Using __rcu will also help sparse catch any future bugs. Signed-off-by: Joel Fernandes (Google

[PATCH v2 1/6] net: rtnetlink: Fix incorrect RCU API usage

2019-02-22 Thread Joel Fernandes (Google)
not using RCU API. net/core/rtnetlink.c:332:13: warning: incorrect type in assignment (different address spaces) net/core/rtnetlink.c:332:13:expected struct rtnl_link **tab net/core/rtnetlink.c:332:13:got struct rtnl_link *[noderef] * Signed-off-by: Joel Fernandes (Google) --- net/core

[PATCH v4 2/2] Add selftests for module build using in-kernel headers

2019-03-01 Thread Joel Fernandes (Google)
This test tries to build a module successfully using the in-kernel headers found in /proc/kheaders.tar.xz. Verified pass and fail scenarios by running: make -C tools/testing/selftests TARGETS=kheaders run_tests Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/Makefile

[PATCH v4 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-03-01 Thread Joel Fernandes (Google)
rom a kernel or module image. Signed-off-by: Joel Fernandes (Google) --- Changes since v3: - Blank tar was being generated because of a one line I forgot to push. It is updated now. - Added module.lds since arm64 needs it to build modules. Changes since v2: (Tha

[PATCH v2 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-02-11 Thread Joel Fernandes (Google)
-xvf /proc/kheaders.txz -C $HOME/headers >/dev/null cd my-kernel-module make -C $HOME/headers M=$(pwd) modules rmmod kheaders Signed-off-by: Joel Fernandes (Google) --- Changes since v1: - removed IKH_EXTRA variable, not needed (Masahiro Yamada) - small fix ups to selftest - added tar

[PATCH v2 2/2] Add selftests for module build using in-kernel headers

2019-02-11 Thread Joel Fernandes (Google)
This test tries to build a module successfully using the in-kernel headers found in /proc/kheaders.txz. Verified pass and fail scenarios by running: make -C tools/testing/selftests TARGETS=kheaders run_tests Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/Makefile

[RFC] rcu: Avoid unnecessary softirq when system is idle

2019-01-19 Thread Joel Fernandes (Google)
Fernandes (Google) --- kernel/rcu/tree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 9180158756d2..96ad80c76b15 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2273,6 +2273,7 @@ rcu_report_qs_rdp(int cpu, struct rcu_data *rdp

[PATCH RFC v2 0/3] cleanups for pstore and ramoops

2018-11-03 Thread Joel Fernandes (Google)
Here are some simple cleanups and fixes for ramoops in pstore. Let me know what you think, thanks. Joel Fernandes (Google) (3): pstore: map pstore types to names pstore: simplify ramoops_get_next_prz arguments pstore: donot treat empty buffers as valid fs/pstore/inode.c | 53

[PATCH RFC v2 1/3] pstore: map pstore types to names

2018-11-03 Thread Joel Fernandes (Google)
In later patches we will need to map types to names, so create a table for that which can also be used and reused in different parts of old and new code. Also use it to save the type in the PRZ which will be useful in later patches. Signed-off-by: Joel Fernandes (Google) --- fs/pstore/inode.c

[PATCH RFC v2 3/3] pstore: donot treat empty buffers as valid

2018-11-03 Thread Joel Fernandes (Google)
like: found existing buffer, size 0, start 0 When I was expecting: no valid data in buffer (sig = ...) Signed-off-by: Joel Fernandes (Google) --- Note that if you feel this patch is not necessary, then feel free to drop it. I would say it is harmless and is a good clean up. fs/pstore/ram_core.c

[PATCH RFC v2 2/3] pstore: simplify ramoops_get_next_prz arguments

2018-11-03 Thread Joel Fernandes (Google)
hed into a single patch to reduce fixup conflicts. Signed-off-by: Joel Fernandes (Google) --- fs/pstore/ram.c | 48 ++-- 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index b174d0fc009f..202eaa82bcc6 100

[PATCH v3 resend 1/2] mm: Add an F_SEAL_FUTURE_WRITE seal to memfd

2018-11-07 Thread Joel Fernandes (Google)
write passed as expected future-write seal now active write failed as expected due to future-write seal map 2 prot-write failed as expected due to seal : Permission denied map 3 prot-read passed as expected Cc: jr...@google.com Cc: john.stu...@linaro.org Cc: tk...@google.com Cc: gre...@linuxf

[PATCH v3 resend 2/2] selftests/memfd: Add tests for F_SEAL_FUTURE_WRITE seal

2018-11-07 Thread Joel Fernandes (Google)
Add tests to verify sealing memfds with the F_SEAL_FUTURE_WRITE works as expected. Cc: dan...@google.com Cc: minc...@kernel.org Reviewed-by: John Stultz Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/memfd/memfd_test.c | 74 ++ 1 file changed, 74

[PATCH 2/7] dmaengine: stm32-dma: fix incomplete configuration in cyclic mode

2018-10-08 Thread Joel Fernandes (Google)
From: Pierre Yves MORDRET When in cyclic mode, the configuration is updated after having started the DMA hardware (STM32_DMA_SCR_EN) leading to incomplete configuration of SMxAR registers. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Hugues Fruchet Signed-off-by: Vinod Koul ---

[PATCH 0/7] NULL pointer deref fix for stm32-dma

2018-10-08 Thread Joel Fernandes (Google)
Hi Greg, While looking at android-4.14, I found a NULL pointer deref with stm32-dma driver using Coccicheck errors. I found that upstream had a bunch of patches on stm32-dma that have fixed this and other issues, I applied these patches cleanly onto Android 4.14. I believe these should goto

[PATCH 1/7] dmaengine: stm32-dma: threshold manages with bitfield feature

2018-10-08 Thread Joel Fernandes (Google)
From: Pierre Yves MORDRET >From now on, DMA bitfield is to manage DMA FIFO Threshold. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Vinod Koul --- drivers/dma/stm32-dma.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/dma/stm32-dma.c

[PATCH 3/7] dmaengine: stm32-dma: fix typo and reported checkpatch warnings

2018-10-08 Thread Joel Fernandes (Google)
From: Pierre Yves MORDRET Fix typo in a comment and solved reported checkpatch warnings. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Vinod Koul --- drivers/dma/stm32-dma.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/dma/stm32-dma.c

[PATCH 5/7] dmaengine: stm32-dma: fix DMA IRQ status handling

2018-10-08 Thread Joel Fernandes (Google)
From: Pierre Yves MORDRET Update the way Transfer Complete and Half Transfer Complete status are acknowledge. Even if HTI is not enabled its status is shown when reading registers, driver has to clear it gently and not raise an error. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Vinod

[PATCH 4/7] dmaengine: stm32-dma: Improve memory burst management

2018-10-08 Thread Joel Fernandes (Google)
From: Pierre Yves MORDRET This patch improves memory burst capability using best burst size according to transferred buffer size from/to memory. >From now on, memory burst is not necessarily same as with peripheral burst one and fifo threshold is directly managed by this driver in order to fit

[PATCH 7/7] dmaengine: stm32-dma: properly mask irq bits

2018-10-08 Thread Joel Fernandes (Google)
From: Pierre Yves MORDRET A single register of the controller holds the information for four dma channels. The functions stm32_dma_irq_status() don't mask the relevant bits after the shift, thus adjacent channel's status is also reported in the returned value. Fixed by masking the value before

[PATCH 6/7] dmaengine: stm32-dma: fix max items per transfer

2018-10-08 Thread Joel Fernandes (Google)
From: Pierre Yves MORDRET Having 0 in item counter register is valid and stands for a "No or Ended transfer". Therefore valid transfer starts from @+0 to @+0xFFFE leading to unaligned scatter gather at boundary. Thus it's safer to round down this value on its FIFO size (16 Bytes).

[PATCH] mm: Speed up mremap on large regions

2018-10-09 Thread Joel Fernandes (Google)
and arm64. Cc: minc...@google.com Cc: hu...@google.com Cc: lokeshgi...@google.com Cc: kernel-t...@android.com Signed-off-by: Joel Fernandes (Google) --- mm/mremap.c | 62 + 1 file changed, 62 insertions(+) diff --git a/mm/mremap.c b/mm/mremap.c index

[PATCH v2 1/2] mm: Add an F_SEAL_FS_WRITE seal to memfd

2018-10-09 Thread Joel Fernandes (Google)
f the memfd. This is not something we do in Android so it does not affect us, however I have mentioned this behavior of the seal in the manpage. Cc: jr...@google.com Cc: john.stu...@linaro.org Cc: tk...@google.com Cc: gre...@linuxfoundation.org Signed-off-by: Joel Fernandes (Google) --- v1->v

[PATCH v2 2/2] selftests/memfd: Add tests for F_SEAL_FS_WRITE seal

2018-10-09 Thread Joel Fernandes (Google)
Add tests to verify sealing memfds with the F_SEAL_FS_WRITE works as expected. Cc: dan...@google.com Cc: minc...@google.com Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/memfd/memfd_test.c | 51 +- 1 file changed, 50 insertions(+), 1 deletion(-) diff

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-22 Thread Joel Fernandes (Google)
Hi, On Mon, Mar 20, 2017 at 11:08 AM, Patrick Bellasi wrote: > On 20-Mar 13:15, Tejun Heo wrote: >> Hello, >> >> On Tue, Feb 28, 2017 at 02:38:38PM +, Patrick Bellasi wrote: [..] >> > These attributes: >> > a) are tunable at all hierarchy levels, i.e. root group too >> >> This usually is

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-24 Thread Joel Fernandes (Google)
Hi Tejun, >> That's also why the proposed interface has now been defined as a extension of >> the CPU controller in such a way to keep a consistent view. >> >> This controller is already used by run-times like Android to "scope" apps by >> constraining the amount of CPUs resource they are

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-24 Thread Joel Fernandes (Google)
Hi Patrick, On Thu, Mar 23, 2017 at 3:32 AM, Patrick Bellasi wrote: [..] >> > which can be used to defined tunable root constraints when CGroups are >> > not available, and becomes RO when CGroups are. >> > >> > Can this be eventually an acceptable option? >> > >> > In any case I think that this

FW:

2016-11-12 Thread GOOGLE FREE-LOTTO
GOOGLE EUROPA INTERLOTTO / EUROMILLINEN FREE-LOTTO BONUS-PROGRAMM BÜRO: PLAZA EMILIO JIM NEZ MILLAS 3352, MADRID, SPANIEN. Aufmerksamkeit: Dies soll Ihnen mitteilen, dass Sie 1,450,000.00Euro von Google Inc-Free-Lotto, 2016 saction gewonnen haben und keine öffentliche Verlosung durchgeführt

Re: [RFC v3 5/5] sched/{core,cpufreq_schedutil}: add capacity clamping for RT/DL tasks

2017-03-13 Thread Joel Fernandes (Google)
Hi Patrick, On Tue, Feb 28, 2017 at 6:38 AM, Patrick Bellasi wrote: > Currently schedutil enforce a maximum OPP when RT/DL tasks are RUNNABLE. > Such a mandatory policy can be made more tunable from userspace thus > allowing for example to define a reasonable max capacity (i.e. > frequency)

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-13 Thread Joel Fernandes (Google)
On Tue, Feb 28, 2017 at 6:38 AM, Patrick Bellasi wrote: > The CPU CGroup controller allows to assign a specified (maximum) > bandwidth to tasks within a group, however it does not enforce any > constraint on how such bandwidth can be consumed. > With the integration of schedutil, the scheduler

Fwd: CONGRATULATIONS

2016-06-05 Thread Google UK Ltd
Please find attached Letter confirming your email address as one of Google winners for 2016 annual promotion.

[PATCH v8 -tip 01/26] sched: Wrap rq::lock access

2020-10-19 Thread Joel Fernandes (Google)
From: Peter Zijlstra In preparation of playing games with rq->lock, abstract the thing using an accessor. Tested-by: Julien Desfossez Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Vineeth Remanan Pillai Signed-off-by: Julien Desfossez --- kernel/sched/core.c | 46

[PATCH v8 -tip 00/26] Core scheduling

2020-10-19 Thread Joel Fernandes (Google)
- Fix for 32bit build - Aubrey Li Aubrey Li (1): sched: migration changes for core scheduling Joel Fernandes (Google) (13): sched/fair: Snapshot the min_vruntime of CPUs on force idle arch/x86: Add a new TIF flag for untrusted tasks kernel/entry: Add support for core-wide protection of kernel-mode

[PATCH v8 -tip 02/26] sched: Introduce sched_class::pick_task()

2020-10-19 Thread Joel Fernandes (Google)
(Intel) Signed-off-by: Vineeth Remanan Pillai Signed-off-by: Julien Desfossez Signed-off-by: Joel Fernandes (Google) --- kernel/sched/deadline.c | 16 ++-- kernel/sched/fair.c | 32 +++- kernel/sched/idle.c | 8 kernel/sched/rt.c

[PATCH v8 -tip 08/26] sched/fair: Snapshot the min_vruntime of CPUs on force idle

2020-10-19 Thread Joel Fernandes (Google)
usecase. Tested-by: Julien Desfossez Signed-off-by: Joel Fernandes (Google) --- kernel/sched/core.c | 33 - kernel/sched/fair.c | 40 kernel/sched/sched.h | 5 + 3 files changed, 65 insertions(+), 13 deletions(-) diff

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