Commit Graph

1066174 Commits

Author SHA1 Message Date
Cai YiWei
b818d97299 media: rockchip: isp: max height 3072 for isp21
Change-Id: I02ef7a19679597f9a4028c29e55d134d597091c4
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:51 +08:00
Cai YiWei
8799055d92 media: rockchip: isp: use same api to set clk
Change-Id: I0229675cc2ff13ca4c30e3c32b4e69e4318ff6d8
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:50 +08:00
Cai YiWei
53c41d150a media: rockchip: ispp: disable sharp output if it bypass
Change-Id: I094dcce7ee12f77e5f524a46d9565a63f4523801
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:49 +08:00
Cai YiWei
186fdf90b0 media: rockchip: isp/ispp adjust probe order
isp hw device -> isp virtual device then
ispp hw device -> ispp virtual device

Change-Id: I7897f50c2323c2d57b0eb143a53423390d6d7d6c
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:48 +08:00
Cai YiWei
3e8baf6650 media: rockchip: isp: add monitor to restart if abnormal
enable monitor:
add rockchip,restart-monitor-en to rkisp node on dts or
echo Y > /sys/module/video_rkisp/parameters/monitor
NOTE: shouldn't enable this when porting camera!!!

Change-Id: I35fa45488136e2e0ec16c4e6179a39f34cf5ebc9
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:47 +08:00
Cai YiWei
0fca9e8350 media: rockchip: ispp: dma buf alloc limit to DMA32
Change-Id: Id0a8cda55bce267ba3a6fd51599b17d7d10dc26e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:46 +08:00
Cai YiWei
2d243f431a media: rockchip: isp: dma buf alloc limit to DMA32
Change-Id: Ibc1f4afc45a031714ee4cabfc70b38f930706d46
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:46 +08:00
Cai YiWei
fe0ef1d4b5 media: rockchip: isp: resolution limit for isp21
Change-Id: I046ac456fad9d4617c8fcc4f228409f59d23281a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:45 +08:00
Fenrir Lin
bef090db70 media: rockchip: ispp: add vidioc_enum_input
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
Change-Id: Id2b2c34b80245a2fa8dec97c5ca9ca64dd2c7363
2021-08-31 16:37:44 +08:00
Cai YiWei
2c4fb4942b media: rockchip: isp/ispp add check for params subscribe event
Change-Id: If8b79286de5d9921abd69c96cb0b17ef297d75ef
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:43 +08:00
Cai YiWei
93b52078a6 media: rockchip: isp: update procfs info
Change-Id: I48d64f9e579ca6eee1af5b707420a055e5b1b17f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:42 +08:00
Cai YiWei
4033489c82 media: rockchip: isp: fix multi dev refcnt
Change-Id: Id6c742f1ce90bdf327b382864a26739bdf80661e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:41 +08:00
Cai YiWei
7c513c616c media: rockchip: ispp: config default params
Change-Id: I8ef48c03123149564835143d4bda5dc011e7e9d3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:40 +08:00
Cai YiWei
f7fb9e42a9 media: rockchip: ispp: optimize first frame memory copy
Change-Id: I38803f1b8cb5bbe6fe53856037eb9214c0e85cbe
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:39 +08:00
Cai YiWei
6f4298adbc media: rockchip: isp/ispp to version v1.6.0
Change-Id: I21b36b5f4738e912ee6409b045c00198ef016c42
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:38 +08:00
Cai YiWei
126a959455 media: rockchip: isp: capture buf queue add to list tail
Change-Id: I21e030408ca936bd6f567536a6c12c9be3caebf5
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:37 +08:00
Cai YiWei
c95ad09232 media: rockchip: ispp: change fec data state if params buf no use
Change-Id: I278d7ec35a39b2ce18af6553cdca33892ec1382b
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:36 +08:00
Cai YiWei
155e064aa9 media: rockchip: isp/ispp to version v1.5.2
Change-Id: I75d545c76ca4e59392211db9dbafd379141bbf19
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:35 +08:00
Cai YiWei
3c8b7fb6a5 media: rockchip: isp: adjust rdbk times with mulit dev for isp2.0
Change-Id: I0d15991a0f17ce0498435a296d8b997e30f6fc38
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:35 +08:00
Cai YiWei
f4445a70c0 media: rockchip: ispp: add uvnr sd32 self en control
Change-Id: I57c0ed94b7916a9ea2a17c0ab761bad3d0af27a4
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:34 +08:00
Cai YiWei
80bbd6e06d media: rockchip: isp: support multi dev for isp21
Change-Id: I5973f952d0b744448025496c29a1c6b4c5316db3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:33 +08:00
Cai YiWei
d5e4c5b58b media: rockchip: isp: make sure 3dlut no continuous read twice
if 3dlut enable and 3DLUT_UPDATE = 1,
will start read lut at following case:
1. isp force update
2. frame end
2->1 shouldn't for 3dlut.

Change-Id: I82d03836035bc06e25839fe4d90dba7cd36c2e1a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:32 +08:00
Cai YiWei
88842979a2 media: rockchip: ispp: check SHARP_CORE_CTRL after update
Change-Id: Iad0d7b2c1e9a0f1222d5055656b598ce542b6d54
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 16:37:31 +08:00
Sandy Huang
f95443e4c8 drm/panel: panel-simple: Don't init gpio value at probe
When enable display on loader, init gpio would change
gpio status, that would make screen flash.

Change-Id: I4b69a8d3d83c5bef09014c2134abaee6522a7046
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-08-31 15:25:26 +08:00
Frank Wang
392cd16600 arm64: dts: rockchip: rk3588s: add usbdp phy device node
This adds USBDP combo PHY related nodes for RK3588S SoCs.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I838233adebc584a60f36cad76c01a9d1a075e8f3
2021-08-31 15:04:13 +08:00
Yifeng Zhao
3530c21737 arm64: dts: rockchip: add sata for rk3588
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I0b6a83bca3ce1809a5004e6ac1b34eed0729b0c8
2021-08-31 14:50:00 +08:00
Yifeng Zhao
39481cd6d3 arm64: dts: rockchip: add naneng combophy for rk3588
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Ie4b56fb1a018d1ab0c9d4ee0cccaebde7703eaad
2021-08-31 14:46:34 +08:00
Sugar Zhang
67d041d478 arm64: dts: rockchip: rk3588: Fixup i2s/spdif nodes
This patch move device nodes which belong to rk3588 into
rk3588.dtsi.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ie02c44bf955496b6c73a9ecdf9290c97e61cbcd4
2021-08-31 14:08:00 +08:00
Jianqun Xu
eca1fb4744 arm64: dts: rockchip: rk3399: modify gpu node for ARM Midgard driver
Change-Id: I46ff1b61787172a5b4ba5b378e00c6de4cfa7f8d
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-31 11:29:17 +08:00
huangqiujun
7ed18b3da9 ANDROID: GKI: Update symbols to symbol list
Update symbols to symbol list externed by oem modules.

Leaf changes summary: 14 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 10 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 4 Added variables

10 Added functions:

  [A] 'function int __traceiter_android_vh_exclude_reserved_zone(void*, mm_struct*, vm_unmapped_area_info*)'
  [A] 'function int __traceiter_android_vh_exit_mm(void*, mm_struct*)'
  [A] 'function int __traceiter_android_vh_get_from_fragment_pool(void*, mm_struct*, vm_unmapped_area_info*, unsigned long int*)'
  [A] 'function int __traceiter_android_vh_include_reserved_zone(void*, mm_struct*, vm_unmapped_area_info*, unsigned long int*)'
  [A] 'function unsigned long int arch_mmap_rnd()'
  [A] 'function int ip_route_me_harder(net*, sock*, sk_buff*, unsigned int)'
  [A] 'function bool nf_ct_delete(nf_conn*, u32, int)'
  [A] 'function void tcp_parse_options(const net*, const sk_buff*, tcp_options_received*, int, tcp_fastopen_cookie*)'
  [A] 'function void unregister_net_sysctl_table(ctl_table_header*)'
  [A] 'function unsigned long int vm_unmapped_area(vm_unmapped_area_info*)'

4 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_exclude_reserved_zone'
  [A] 'tracepoint __tracepoint_android_vh_exit_mm'
  [A] 'tracepoint __tracepoint_android_vh_get_from_fragment_pool'
  [A] 'tracepoint __tracepoint_android_vh_include_reserved_zone'

Bug: 193384408

Change-Id: I894b9f459e1e8087d656af42470acef9f2839abc
Signed-off-by: huangqiujun <huangqiujun@oppo.com>
2021-08-30 12:33:56 +00:00
William Wu
a27395c5bf arm64: dts: rockchip: rk3588s: add usb controllers nodes
The rk3588s supports multiple USB controllers:
1.2 x USB2.0 HOST (EHCI&OHCI)
2.1 x USB3.0 OTG  (DWC3)
3.1 x USB3.0 HOST (xHCI)

This patch adds nodes for these USB controllers.
Note that the phys properties of USB controlles are not
added yet, and they will be added later.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Id16319990fc570ab2f71673463ffd70d5df3bfb8
2021-08-30 19:58:09 +08:00
Kever Yang
b684f15d8c arm64: dts: rockchip: add rktimer for rk3588
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: Iad6ecb6a21a4a7d97f7677e9e585523f210d6c3f
2021-08-30 16:00:10 +08:00
Ding Wei
e1e1eabccd arm64: dts: rockchip: rk3588s: Add mmu nodes for video codecs
Change-Id: Id6ac46d1772a29e20834f4e46d342b8a5ede6545
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-30 15:45:34 +08:00
Felix Zeng
1775a5f995 driver: rknpu: Add rknpu driver for rk356x, version: 0.5.0
Signed-off-by: Felix Zeng <felix.zeng@rock-chips.com>
Change-Id: Ia9c19e37024d085010ef4c86a420ed5a9c831915
2021-08-30 15:15:28 +08:00
Tao Huang
06c006f76a arm64: rockchip_gki.config: Enable CONFIG_ROCKCHIP_RKNPU
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I80da4a62eaea705955cadd4fa6faf4830be699ee
2021-08-30 15:15:28 +08:00
Felix Zeng
e72b8c6176 arm64: configs: rockchip_defconfig: Enable rknpu module
Signed-off-by: Felix Zeng <felix.zeng@rock-chips.com>
Change-Id: Ie86cfb931e46983875a4ee2adcf5760166bb38e8
2021-08-30 15:15:28 +08:00
Kuan-Ying Lee
70fb50176e UPSTREAM: kasan, slub: reset tag when printing address
The address still includes the tags when it is printed.  With hardware
tag-based kasan enabled, we will get a false positive KASAN issue when
we access metadata.

Reset the tag before we access the metadata.

Link: https://lkml.kernel.org/r/20210804090957.12393-3-Kuan-Ying.Lee@mediatek.com
Fixes: aa1ef4d7b3 ("kasan, mm: reset tags when accessing metadata")
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Reviewed-by: Marco Elver <elver@google.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chinwen Chang <chinwen.chang@mediatek.com>
Cc: Nicholas Tang <nicholas.tang@mediatek.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Bug: 197723947
(cherry picked from commit 340caf178d)
Change-Id: If721a44e7bb022fea317dfafb5252b13055eac7d
Signed-off-by: Yee Lee <yee.lee@mediatek.com>
2021-08-30 07:07:54 +00:00
Sugar Zhang
7052d7de3c arm64: dts: rockchip: rk3588s: Add i2s/pdm/spdifrx/spdiftx nodes
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ia967e33488241e509283bb4732d4651dbc069515
2021-08-30 15:04:38 +08:00
Kuan-Ying Lee
bd5c75ce7b UPSTREAM: kasan, kmemleak: reset tags when scanning block
Patch series "kasan, slub: reset tag when printing address", v3.

With hardware tag-based kasan enabled, we reset the tag when we access
metadata to avoid from false alarm.

This patch (of 2):

Kmemleak needs to scan kernel memory to check memory leak.  With hardware
tag-based kasan enabled, when it scans on the invalid slab and
dereference, the issue will occur as below.

Hardware tag-based KASAN doesn't use compiler instrumentation, we can not
use kasan_disable_current() to ignore tag check.

Based on the below report, there are 11 0xf7 granules, which amounts to
176 bytes, and the object is allocated from the kmalloc-256 cache.  So
when kmemleak accesses the last 256-176 bytes, it causes faults, as those
are marked with KASAN_KMALLOC_REDZONE == KASAN_TAG_INVALID == 0xfe.

Thus, we reset tags before accessing metadata to avoid from false positives.

  BUG: KASAN: out-of-bounds in scan_block+0x58/0x170
  Read at addr f7ff0000c0074eb0 by task kmemleak/138
  Pointer tag: [f7], memory tag: [fe]

  CPU: 7 PID: 138 Comm: kmemleak Not tainted 5.14.0-rc2-00001-g8cae8cd89f05-dirty #134
  Hardware name: linux,dummy-virt (DT)
  Call trace:
   dump_backtrace+0x0/0x1b0
   show_stack+0x1c/0x30
   dump_stack_lvl+0x68/0x84
   print_address_description+0x7c/0x2b4
   kasan_report+0x138/0x38c
   __do_kernel_fault+0x190/0x1c4
   do_tag_check_fault+0x78/0x90
   do_mem_abort+0x44/0xb4
   el1_abort+0x40/0x60
   el1h_64_sync_handler+0xb4/0xd0
   el1h_64_sync+0x78/0x7c
   scan_block+0x58/0x170
   scan_gray_list+0xdc/0x1a0
   kmemleak_scan+0x2ac/0x560
   kmemleak_scan_thread+0xb0/0xe0
   kthread+0x154/0x160
   ret_from_fork+0x10/0x18

  Allocated by task 0:
   kasan_save_stack+0x2c/0x60
   __kasan_kmalloc+0xec/0x104
   __kmalloc+0x224/0x3c4
   __register_sysctl_paths+0x200/0x290
   register_sysctl_table+0x2c/0x40
   sysctl_init+0x20/0x34
   proc_sys_init+0x3c/0x48
   proc_root_init+0x80/0x9c
   start_kernel+0x648/0x6a4
   __primary_switched+0xc0/0xc8

  Freed by task 0:
   kasan_save_stack+0x2c/0x60
   kasan_set_track+0x2c/0x40
   kasan_set_free_info+0x44/0x54
   ____kasan_slab_free.constprop.0+0x150/0x1b0
   __kasan_slab_free+0x14/0x20
   slab_free_freelist_hook+0xa4/0x1fc
   kfree+0x1e8/0x30c
   put_fs_context+0x124/0x220
   vfs_kern_mount.part.0+0x60/0xd4
   kern_mount+0x24/0x4c
   bdev_cache_init+0x70/0x9c
   vfs_caches_init+0xdc/0xf4
   start_kernel+0x638/0x6a4
   __primary_switched+0xc0/0xc8

  The buggy address belongs to the object at ffff0000c0074e00
   which belongs to the cache kmalloc-256 of size 256
  The buggy address is located 176 bytes inside of
   256-byte region [ffff0000c0074e00, ffff0000c0074f00)
  The buggy address belongs to the page:
  page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100074
  head:(____ptrval____) order:2 compound_mapcount:0 compound_pincount:0
  flags: 0xbfffc0000010200(slab|head|node=0|zone=2|lastcpupid=0xffff|kasantag=0x0)
  raw: 0bfffc0000010200 0000000000000000 dead000000000122 f5ff0000c0002300
  raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000
  page dumped because: kasan: bad access detected

  Memory state around the buggy address:
   ffff0000c0074c00: f0 f0 f0 f0 f0 f0 f0 f0 f0 fe fe fe fe fe fe fe
   ffff0000c0074d00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
  >ffff0000c0074e00: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 fe fe fe fe fe
                                                      ^
   ffff0000c0074f00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
   ffff0000c0075000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
  ==================================================================
  Disabling lock debugging due to kernel taint
  kmemleak: 181 new suspected memory leaks (see /sys/kernel/debug/kmemleak)

Link: https://lkml.kernel.org/r/20210804090957.12393-1-Kuan-Ying.Lee@mediatek.com
Link: https://lkml.kernel.org/r/20210804090957.12393-2-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Marco Elver <elver@google.com>
Cc: Nicholas Tang <nicholas.tang@mediatek.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Chinwen Chang <chinwen.chang@mediatek.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Bug: 197723947
(cherry picked from commit 6c7a00b843 )
Change-Id: I236560a20bafe78643a182fb4c82f0bd7d15ed87
Signed-off-by: Yee Lee <Yee.lee@mediatek.com>
2021-08-30 07:02:08 +00:00
Sandy Huang
ef7eb42f48 drm/rockchip: vop2: enable dither up when input rgb565
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I554924b979735e2377b1e9d06b22b2d9b35450a4
2021-08-30 14:51:56 +08:00
Andy Yan
b7fb6c5626 drm/rockchip: vop2: Use normalized zpos
Some linux app may be set zpos without any check.
For example mpv: change the zpos of overlay
plane from default value 2 to 1, but the primary
plane zpos is also 1.

Change-Id: I6015c171c6512dc7f10bed7c56933941c9d64a2e
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-08-30 14:51:56 +08:00
Sandy Huang
c6db7fb1dc drm/rockchip: vop2: add support cubic lut from loader
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I11d65477364dc9ff4fb34d038179d5702faeb484
2021-08-30 14:51:47 +08:00
Sandy Huang
5579c96182 drm/rockchip: vop2: add support 10bit yuv and srgb output
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Iee5aad90edff69c00884bc25cc7dc2169d3103d2
2021-08-30 11:07:21 +08:00
Sandy Huang
8b5885eee1 drm/rockchip: vop2: output error info when cluster use non afbc format
This is special feature at rk356x, the cluster layer only can support
afbc format and can't support linear format;

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ic8efc26c07a088c246969622fcf2973b00abd9c2
2021-08-30 11:07:16 +08:00
Andy Yan
c553334fe7 drm/rockchip: vop2: wait port_mux cfg done before configure new plane
We need two vsync cycle when move a window from
on vp to another: the port_mux take effect in
first vsync, than enable the window at second
vsync.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I87c1ac0803081ecb201d9218d40fdea89424fbd8
2021-08-30 11:07:11 +08:00
Andy Yan
d8d8a665cd drm/rockchip: vop2: Only register used vp to drm
A registered vp(crtc) need a primary plane, some
linux style display software(X11/weston) want more
overlay plane, so we don't register unused vp to
save some plane for overlay.

Change-Id: I66846af7364d1a20f38f35d65ed3fe34b7f280ab
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-08-30 11:07:06 +08:00
Todd Kjos
b683931b2a ANDROID: gki_defconfig: set DEFAULT_MMAP_MIN_ADDR=32768
Set CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 to conform with
existing CTS test (which had an issue that prevented
reliable detection of this setting).

Bug: 197914473
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I5a86a7b11d32adf8689657e4559c1d870a5562c4
2021-08-27 21:57:15 +00:00
Greg Kroah-Hartman
e0382dd2e5 Revert "virtio: Protect vqs list access"
This reverts commit 293180f593 which is
commit 0e566c8f0f upstream.

This breaks the Android kernel ABI, and this is not necessary for
Android devices, so revert it to preserve the ABI.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If5aa2baf988b89e504b3b345651352215f571bf8
2021-08-27 22:11:07 +02:00
Kuan-Ying Lee
c0cce1da8b UPSTREAM: kasan, slub: reset tag when printing address
The address still includes the tags when it is printed.  With hardware
tag-based kasan enabled, we will get a false positive KASAN issue when
we access metadata.

Reset the tag before we access the metadata.

Link: https://lkml.kernel.org/r/20210804090957.12393-3-Kuan-Ying.Lee@mediatek.com
Fixes: aa1ef4d7b3 ("kasan, mm: reset tags when accessing metadata")
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Reviewed-by: Marco Elver <elver@google.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chinwen Chang <chinwen.chang@mediatek.com>
Cc: Nicholas Tang <nicholas.tang@mediatek.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 340caf178d)
Bug: 187129171
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I18dcd88e9e638f9454f5aecf7f71e8aecb14f7cf
2021-08-27 12:26:10 -07:00
David Brazdil
3b6f980a85 UPSTREAM: KVM: arm64: Fix off-by-one in range_is_memory
Hyp checks whether an address range only covers RAM by checking the
start/endpoints against a list of memblock_region structs. However,
the endpoint here is exclusive but internally is treated as inclusive.
Fix the off-by-one error that caused valid address ranges to be
rejected.

Cc: Quentin Perret <qperret@google.com>
Fixes: 90134ac9ca ("KVM: arm64: Protect the .hyp sections from the host")
Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210728153232.1018911-2-dbrazdil@google.com
(cherry picked from commit facee1be76)
Bug: 187129171
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I44dbdbd9fde3c4a44e9af1ad317e0123d5472685
2021-08-27 12:26:10 -07:00