Commit Graph

600954 Commits

Author SHA1 Message Date
Daniel Borkmann
a0b2c35580 bpf: don't let ldimm64 leak map addresses on unprivileged
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>
2017-11-23 11:56:24 +09:00
WANG Cong
b5573db403 ipv6/dccp: do not inherit ipv6_mc_list from parent
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>
2017-11-23 11:56:18 +09:00
Thomas Gleixner
a6c9e9ca13 timerfd: Protect the might cancel mechanism proper
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>
2017-11-23 11:56:11 +09:00
Andrey Konovalov
0c6c26ba43 net/packet: fix overflow in check for priv area size
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>
2017-11-23 11:56:04 +09:00
Joy Cho
e7c024cc4c Merge "drm: bridge: add vout mode swithcing as hdmi or dvi" into odroidn1-4.4.y-android 2017-11-22 09:58:51 +09:00
Brian Kim
4a253fdea8 arm64: cpuinfo: Add "Hardware" and "Revision" information in the '/proc/cpuinfo'
Some software such as wiringPi library refers this information in order
to detect hardware.

Change-Id: Ia30543f548a919442798e620beb805426fb7e88a
2017-11-13 14:00:44 +09:00
joy
b3c19dc007 drm: bridge: add vout mode swithcing as hdmi or dvi
Change-Id: Ia347e651e31bf2a628a66f911122d257152b71f0
2017-11-13 12:30:05 +09:00
Joy Cho
59444d8d9b arm64/dts: fix some of rk808 pmic configuration
- set LDO2 as off by default (nc)
- fix vddio's source (vcc_3v0)

Change-Id: Ie0c0741260deadb586bedec895c92eb5705c7d12
2017-11-10 16:14:59 +09:00
Joy Cho
484ef169f8 arm64/dts: remove unused hw components
Change-Id: I979c08ea4bc1f017baf6fa955106944a20c79535
2017-11-10 15:30:09 +09:00
Joy Cho
e8cebc544d Merge "arm64/dts,config: remove fairchild type-c controller" into odroidn1-4.4.y-android 2017-11-10 15:09:59 +09:00
Joy Cho
5d2d0c7f05 arm64/dts,config: remove fairchild type-c controller
Change-Id: Ifa6f4bdeb9508ab8bc2a259013a71948cdd00371
2017-11-10 10:16:00 +09:00
codewalker
026994f07d ODROID-N1: Fix build error.
Change-Id: I1425f39365948f1be62fb753d4930f831d058777
2017-11-09 14:02:46 +09:00
codewalker
0d6f8f2b78 ODROID-N1: Add wakelock.
Change-Id: I4492c2913dd8a30f459cc90311979bece1c99dcc
2017-11-08 11:23:23 +09:00
Luke Go
dbf0bde927 arm64/dts: pwm: odroid-n1: enable pwm1.
Change-Id: I0acdb8d7e8d449b0d1a3bc244b4e0478c4c89a81
2017-11-06 12:03:30 +09:00
Luke Go
67deeb3e5a arm64: odroid: not build kernel.img and resource.img
- 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
2017-11-06 10:25:34 +09:00
Luke Go
33c1805059 arm64/dts: remove mpu6550.
Change-Id: I49a599617e8f165cc58ff73c3548ee889ba5e6e5
2017-11-03 14:15:09 +09:00
Luke Go
49edb85beb ODROID-N1: blue led blink on off.
Change-Id: I6368110a539e3f8598834ec5e76e34d57b6a6566
2017-10-31 16:02:19 +09:00
Luke Go
ad73ac7858 Merge "arm64/dts: thermal: migrate theraml map." into odroidn1-4.4.y-android 2017-10-31 13:39:18 +09:00
Luke Go
28c4288394 arm64/dts: thermal: migrate theraml map.
- This patch migrate the thermal maps from rk3399.dtsi to
  rk3399-odroidn1.dtsi for fixing the original rk3399 dts file.

Change-Id: I963203916f51b32ff01a14cdfc82a6df3f4fe2cd
2017-10-30 14:23:01 +09:00
Joy Cho
2e04622808 arm64/dts: Fix vin-supply of VDD_CPU_B and VDD_GPU
Change-Id: Icf91288b50c6317b3355cda28991590a3a570f7e
2017-10-20 12:22:04 +09:00
codewalker
9ce831700a ODROID-N1: Fix sd/eMMC boot device name bug.
Change-Id: I7e6141ed9dd6851767cfaf73577ef54ab5c22de1
2017-10-17 17:51:43 +09:00
Joy Cho
a714ee6cfb Merge "ARM64/defconfig: Activate CONFIG_POWER_RESET_GPIO_RESTART" into odroidn1-4.4.y-android 2017-10-16 10:34:32 +09:00
Joy Cho
6b365ae952 Merge "ARM64/kernel: use do_kernel_restart in machine_restart by force" into odroidn1-4.4.y-android 2017-10-16 10:34:20 +09:00
Joy Cho
da47456f40 Merge "ARM64/dts: Add gpio-restart devicetree to handle cold reset" into odroidn1-4.4.y-android 2017-10-16 10:34:08 +09:00
Joy Cho
7b7543ce8d ARM64/defconfig: Activate CONFIG_POWER_RESET_GPIO_RESTART
Change-Id: I1b1a1205f617872ecc34598345640fcdcba83438
2017-10-15 13:31:44 +09:00
Joy Cho
c51fd83fbc Merge "ODROID-N1: remove pwm key wakeup event of RKPM" into odroidn1-4.4.y-android 2017-10-15 13:20:39 +09:00
Joy Cho
5eb0f48ee1 ARM64/kernel: use do_kernel_restart in machine_restart by force
- to use restart_handler.notifier_call of drivers

Change-Id: I6b55d83f0e6010fc8c9350d07f137f1983aaa678
2017-10-15 13:13:51 +09:00
Joy Cho
486d2da990 ARM64/dts: Add gpio-restart devicetree to handle cold reset
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
2017-10-15 13:12:53 +09:00
joy
78267a16a6 ODROID-N1: Adjust the config option of boot device handling
Change-Id: Idf1bd0922f60c759bb34151bf0c5ec52dc2e8af5
2017-10-02 09:54:01 +09:00
joy
94e352d0fd ARM64/defconfig: Introduce a config, CONFIG_PLAT_RK3399_ODROIDN1
Change-Id: I1b8bb3b210f16ae63bebef024a512d644ac2c75e
2017-10-02 09:38:36 +09:00
Luke Go
649d5bbd91 ODROID-N1: set boot device as always mmcblk0
Change-Id: I7dbd2f4b686a723474e5cacc74b9497ff38b48e3
2017-09-29 12:10:34 +09:00
Luke Go
01faf53d77 Revert "UPSTREAM: mmc: block: Use the mmc host device index as the mmcblk device index"
- Using name_idx to fix number of mmcblk.

This reverts commit a0a1e633bc.

Change-Id: Ia664af2af2d2d1b675aa6e00add83add78377544
2017-09-29 11:35:44 +09:00
Joy Cho
cd1e520a13 odroid-sysfs: add odroid-sysfs including boot mode detection
Change-Id: I77954dde91d2f85bc57d00173b79a1922cbaf2bf
2017-09-28 18:09:39 +09:00
Joy Cho
2f424f09f3 arm64/dts: adjust voltage for VDD_CPU_B and VDD_CPU_L
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
2017-09-27 10:16:31 +09:00
Chris Kim
7b9c410d64 Merge "ODROID: touch: Add multitouch V/PIDs." into odroidn1-4.4.y-android 2017-09-25 15:33:34 +09:00
Chris Kim
f9b48c906d Merge "ODROID: touch: Add multitouch V/PIDs." into odroidn1-4.4.y-android 2017-09-25 15:33:30 +09:00
Chris Kim
9323412557 Merge "ODROID: Enable invert touch screen." into odroidn1-4.4.y-android 2017-09-25 15:33:25 +09:00
Chris Kim
3e50e27b51 Merge "ODROID: touch: Add multitouch V/PIDs." into odroidn1-4.4.y-android 2017-09-25 15:33:20 +09:00
Chris Kim
3ba744b05b Merge "ODROID: touch: Add multitouch V/PIDs." into odroidn1-4.4.y-android 2017-09-25 15:33:16 +09:00
Chris Kim
f861b5e4fe Merge "ODROID: touch: Add multitouch V/PIDs." into odroidn1-4.4.y-android 2017-09-25 15:33:11 +09:00
Chris Kim
023a43eef2 Merge "ODROID: touch: Add multitouch V/PIDs." into odroidn1-4.4.y-android 2017-09-25 15:33:06 +09:00
Chris Kim
bdda0fc760 Merge "ODROID: touch: Add multitouch V/PIDs." into odroidn1-4.4.y-android 2017-09-25 15:33:01 +09:00
Chris Kim
71e756e3da Merge "ODROID: touch: Add multitouch V/PIDs." into odroidn1-4.4.y-android 2017-09-25 15:32:56 +09:00
Chris Kim
189de24e71 Merge "ODROID: touch: Add options to ignore the Vu7 id." into odroidn1-4.4.y-android 2017-09-25 15:32:49 +09:00
Chris Kim
838587af5b Merge "ODROID: touch: Add multitouch V/PIDs." into odroidn1-4.4.y-android 2017-09-25 15:32:44 +09:00
Chris Kim
98adbb32ff Merge "ODROID: touch: Add multitouch V/PIDs." into odroidn1-4.4.y-android 2017-09-25 15:32:40 +09:00
Chris Kim
971ec2a1d9 Merge "ODROID: touch: Add New touch product(HID Raw)." into odroidn1-4.4.y-android 2017-09-25 15:32:36 +09:00
Chris Kim
4983d41b43 Merge "ODROID: touch: Add multitouch V/PIDs." into odroidn1-4.4.y-android 2017-09-25 15:32:32 +09:00
Chris Kim
a9374bbcf7 Merge "ODROID-N1: Add si1132 si702x drivres." into odroidn1-4.4.y-android 2017-09-25 15:32:27 +09:00
Chris Kim
54f7985911 Merge "ODROID: touch: Add D-WAV Multitouch driver." into odroidn1-4.4.y-android 2017-09-25 15:32:22 +09:00