The patch fixes two things at once:
1) It checks the env->allow_ptr_leaks and only prints the map address
to the log if we have the privileges to do so, otherwise it just dumps
0 as we would when kptr_restrict is enabled on %pK. Given the latter
is off by default and not every distro sets it, I don't want to rely
on this, hence the 0 by default for unprivileged.
2) Printing of ldimm64 in the verifier log is currently broken in that
we don't print the full immediate, but only the 32 bit part of the
first insn part for ldimm64. Thus, fix this up as well; it's okay
to access, since we verified all ldimm64 earlier already (including
just constants) through replace_map_fd_with_map_ptr().
Fixes: 1be7f75d16 ("bpf: enable non-root eBPF programs")
Fixes: cbd3570086 ("bpf: verifier (add ability to receive verification log)")
Change-Id: Icfc2f72c98470b106f6972fea3eaa26d5489c234
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Like commit 657831ffc3 ("dccp/tcp: do not inherit mc_list from parent")
we should clear ipv6_mc_list etc. for IPv6 sockets too.
Change-Id: Ide3801c6bcdeb291f3ab96d6c7745483195bf4ea
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The handling of the might_cancel queueing is not properly protected,
so parallel operations on the file descriptor can race with each
other and lead to list corruptions or use after free.
Protect the context for these operations with a seperate lock.
The wait queue lock cannot be reused for this because that would
create a lock inversion scenario vs. the cancel lock. Replacing
might_cancel with an atomic (atomic_t or atomic bit) does not help
either because it still can race vs. the actual list operation.
Change-Id: I43c9338fd2f7306aefc538328f09669376da4bea
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "linux-fsdevel@vger.kernel.org"
Cc: syzkaller <syzkaller@googlegroups.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1701311521430.3457@nanos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Subtracting tp_sizeof_priv from tp_block_size and casting to int
to check whether one is less then the other doesn't always work
(both of them are unsigned ints).
Compare them as is instead.
Also cast tp_sizeof_priv to u64 before using BLK_PLUS_PRIV, as
it can overflow inside BLK_PLUS_PRIV otherwise.
Change-Id: I07d8b7617fde3963c35ea8edca29b91782a1c498
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
- Now no more need add *.img command when build Image & dtb file.
Instead, please use 'make Image dtbs' commands.
- rk3399-odroidn1-rev0.dtb
Change-Id: I7693aaca53ff6c9376351a5e0ec119611e146102
- This patch migrate the thermal maps from rk3399.dtsi to
rk3399-odroidn1.dtsi for fixing the original rk3399 dts file.
Change-Id: I963203916f51b32ff01a14cdfc82a6df3f4fe2cd
This commit is to activate cold reset by handling OTP_OUT_H
and it makes RK808 to enter cold reset status.
- OTP_OUT_H : GPIO1_A6 (Active High)
Change-Id: I2e25fd76160a10bf8768fa14aa8a625d8cef7c5a
in case of the max frequency set, increase operation voltage
- 1.992 GHz : 1.25V -> 1.3V
- 1.512 GHz : 1.125V -> 1.2V
Change-Id: I6612502c2bac3ba1b80ec751a585fc7b3580ad95