Commit Graph

978246 Commits

Author SHA1 Message Date
Todd Kjos
14fbfc9c0e ANDROID: GKI: 5/21 KMI update
Set KMI_GENERATION=5 for 5/21 KMI update

Leaf changes summary: 3222 artifacts changed
Changed leaf types summary: 28 leaf types changed
Removed/Changed/Added functions summary: 2 Removed, 3129 Changed, 1 Added function
Removed/Changed/Added variables summary: 1 Removed, 60 Changed, 1 Added variable

2 Removed functions:

  [D] 'function int __traceiter_android_vh_gic_v3_set_affinity(void*, irq_data*, const cpumask*, u64*, bool, void*)'
  [D] 'function ssize_t kernel_read(file*, void*, size_t, loff_t*)'

1 Added function:

  [A] 'function int __traceiter_android_rvh_gic_v3_set_affinity(void*, irq_data*, const cpumask*, u64*, bool, void*)'

3129 functions with some sub-type change:

  [C] 'function void* PDE_DATA(const inode*)' at generic.c:799:1 has some sub-type changes:
    CRC (modversions) changed from 0x27c5b1f0 to 0xff685e4c

  [C] 'function void __ClearPageMovable(page*)' at compaction.c:138:1 has some sub-type changes:
    CRC (modversions) changed from 0x22571ed2 to 0xa8507b44

  [C] 'function void __SetPageMovable(page*, address_space*)' at compaction.c:130:1 has some sub-type changes:
    CRC (modversions) changed from 0x5f77584f to 0x3bb27a69

  ... 3126 omitted; 3129 symbols have only CRC changes

1 Removed variable:

  [D] 'tracepoint __tracepoint_android_vh_gic_v3_set_affinity'

1 Added variable:

  [A] 'tracepoint __tracepoint_android_rvh_gic_v3_set_affinity'

60 Changed variables:

  [C] 'pglist_data contig_page_data' was changed at memblock.c:96:1:
    size of symbol changed from 7296 to 5696
    CRC (modversions) changed from 0x4532035d to 0x173fa7a5
    type of variable changed:
      type size changed from 58368 to 45568 (in bits)
      there are data member changes:
        type 'zone[4]' of 'pglist_data::node_zones' changed:
          type name changed from 'zone[4]' to 'zone[3]'
          array type size changed from 51200 to 38400
          array type subrange 1 changed length from 4 to 3
          array element type 'struct zone' changed:
            type size hasn't changed
            there are data member changes:
              type 'long int[4]' of 'zone::lowmem_reserve' changed:
                type name changed from 'long int[4]' to 'long int[3]'
                array type size changed from 256 to 192
                array type subrange 1 changed length from 4 to 3
              11 ('pglist_data* zone_pgdat' .. 'int initialized') offsets changed (by -64 bits)
            3470 impacted interfaces
        'zonelist node_zonelists[1]' offset changed (by -128 bits)
        11 ('int nr_zones' .. 'int kswapd_order') offsets changed (by -12928 bits)
        type 'enum zone_type' of 'pglist_data::kswapd_highest_zoneidx' changed:
          type size hasn't changed
          1 enumerator deletion:
            'zone_type::ZONE_DMA' value '0'
          4 enumerator changes:
            'zone_type::ZONE_DMA32' from value '1' to '0' at mmzone.h:350:1
            'zone_type::ZONE_NORMAL' from value '2' to '1' at mmzone.h:350:1
            'zone_type::ZONE_MOVABLE' from value '3' to '2' at mmzone.h:350:1
            'zone_type::__MAX_NR_ZONES' from value '4' to '3' at mmzone.h:350:1
          3471 impacted interfaces
        and offset changed from 53664 to 40736 (in bits) (by -12928 bits)
        2 ('int kswapd_failures' .. 'int kcompactd_max_order') offsets changed (by -12928 bits)
        type 'enum zone_type' of 'pglist_data::kcompactd_highest_zoneidx' changed, as reported earlier
        and offset changed from 53760 to 40832 (in bits) (by -12928 bits)
        3 ('wait_queue_head_t kcompactd_wait' .. 'unsigned long int totalreserve_pages') offsets changed (by -12928 bits)
        8 ('zone_padding _pad1_' .. 'atomic_long_t vm_stat[38]') offsets changed (by -12800 bits)
      3470 impacted interfaces

  [C] 'task_struct init_task' was changed at init_task.c:64:1:
    CRC (modversions) changed from 0xff3c49af to 0x62435c95
    type of variable changed:
      type size hasn't changed
      1 data member deletion:
        'kunit* kunit_test', at offset 21184 (in bits) at sched.h:1255:1
      there are data member changes:
        19 ('unsigned long int trace' .. 'u64 android_kabi_reserved8') offsets changed (by -64 bits)
        type 'struct thread_struct' of 'task_struct::thread' changed:
          type size hasn't changed
          1 data member deletion:
            'u64 sctlr_tcf0', at offset 8576 (in bits) at processor.h:159:1
          1 data member insertion:
            'u64 sctlr_user', at offset 8640 (in bits) at processor.h:161:1
          there are data member changes:
            'u64 gcr_user_excl' offset changed (by -64 bits)
          3470 impacted interfaces
        and offset changed from 26880 to 26752 (in bits) (by -128 bits)
      3470 impacted interfaces

  [C] 'kmem_cache* kmalloc_caches[3][14]' was changed to 'kmem_cache* kmalloc_caches[2][14]' at slab_common.c:593:1:
    size of symbol changed from 336 to 224
    CRC (modversions) changed from 0x409fadd6 to 0x7eb5b122
    type of variable changed:
      type name changed from 'kmem_cache*[3][14]' to 'kmem_cache*[2][14]'
      array type size changed from 2688 to 1792
      array type subrange 1 changed length from 3 to 2

  [C] 'rq runqueues' was changed at core.c:49:1:
    size of symbol changed from 4160 to 4416
    CRC (modversions) changed from 0xa1b6d508 to 0xe2c232cf
    type of variable changed:
      type size changed from 33280 to 35328 (in bits)
      there are data member changes:
        'uclamp_rq uclamp[2]' size changed from 768 to 2688 (in bits) (by +1920 bits)
        'unsigned int uclamp_flags' offset changed (by +1920 bits)
        61 ('cfs_rq cfs' .. 'u64 android_kabi_reserved4') offsets changed (by +2048 bits)
      3470 impacted interfaces

  [C] 'static_key sched_feat_keys[22]' was changed to 'static_key sched_feat_keys[24]' at debug.c:80:1:
    size of symbol changed from 352 to 384
    CRC (modversions) changed from 0xcaebe5d2 to 0xef80ba0e
    type of variable changed:
      type name changed from 'static_key[22]' to 'static_key[24]'
      array type size changed from 2816 to 3072
      array type subrange 1 changed length from 22 to 24

  [C] 'const char* const sched_feat_names[22]' was changed to 'const char* const sched_feat_names[24]' at debug.c:51:1:
    size of symbol changed from 176 to 192
    CRC (modversions) changed from 0xaba74316 to 0x8ecc1cca
    type of variable changed:
      type name changed from 'const char* const[22]' to 'const char* const[24]'
      array type size changed from 1408 to 1536
      array type subrange 1 changed length from 22 to 24

  [C] 'vm_event_state vm_event_states' was changed at vmstat.c:108:1:
    size of symbol changed from 728 to 704
    CRC (modversions) changed from 0x62cac127 to 0xbe72514d
    type of variable changed:
      type size changed from 5824 to 5632 (in bits)
      there are data member changes:
        type 'unsigned long int[91]' of 'vm_event_state::event' changed:
          type name changed from 'unsigned long int[91]' to 'unsigned long int[88]'
          array type size changed from 5824 to 5632
          array type subrange 1 changed length from 91 to 88
      one impacted interface

  [C] 'bus_type amba_bustype' was changed at bus.c:215:1:
    CRC (modversions) changed from 0xabc9cec3 to 0x7ee45a16

  [C] 'neigh_table arp_tbl' was changed at arp.c:152:1:
    CRC (modversions) changed from 0xa28f8668 to 0xcf671bfd

  [C] 'const address_space_operations balloon_aops' was changed at balloon_compaction.c:253:1:
    CRC (modversions) changed from 0xb8eca1a2 to 0xab8331f2

  ... 50 omitted; 53 symbols have only CRC changes

'enum zone_type at mmzone.h:350:1' changed:
  enum type 'enum zone_type' changed at mmzone.h:350:1, as reported earlier
'struct amba_device at bus.h:64:1' changed (indirectly):
  type size hasn't changed
  there are data member changes:
    type 'struct device_dma_parameters' of 'amba_device::dma_parms' changed:
      type size hasn't changed
      1 data member insertion:
        'unsigned int min_align_mask', at offset 32 (in bits) at device.h:294:1
      3470 impacted interfaces
  4 impacted interfaces

'struct blk_mq_tags at blk-mq-tag.h:8:1' changed:
  type size changed from 1536 to 1600 (in bits)
  1 data member insertion:
    'spinlock_t lock', at offset 1536 (in bits) at blk-mq-tag.h:28:1
  3470 impacted interfaces

'struct device_dma_parameters at device.h:288:1' changed:
  details were reported earlier

'struct dma_async_tx_descriptor at dmaengine.h:603:1' changed:
  type size changed from 704 to 896 (in bits)
  3 data member insertions:
    'dma_async_tx_descriptor* next', at offset 704 (in bits) at dmaengine.h:617:1
    'dma_async_tx_descriptor* parent', at offset 768 (in bits) at dmaengine.h:618:1
    'spinlock_t lock', at offset 832 (in bits) at dmaengine.h:619:1
  32 impacted interfaces

'struct mmc_bus_ops at core.h:20:1' changed:
  type size changed from 704 to 768 (in bits)
  1 data member insertion:
    'typedef bool (mmc_host*)* cache_enabled', at offset 704 (in bits) at core.h:32:1
  83 impacted interfaces

'struct mmc_host at host.h:276:1' changed:
  type size hasn't changed
  1 data member deletion:
    'notifier_block pm_notify', at offset 6784 (in bits) at host.h:291:1
  1 data member insertion:
    'u64 android_oem_data1', at offset 13184 (in bits) at host.h:488:1
  there are data member changes:
    31 ('wakeup_source* ws' .. 'int detect_change') offsets changed (by -192 bits)
    type 'struct mmc_slot' of 'mmc_host::slot' changed:
      type size changed from 128 to 256 (in bits)
      1 data member insertion:
        'u64 android_oem_data1[2]', at offset 64 (in bits) at host.h:249:1
      there are data member changes:
        'void* handler_priv' offset changed (by +128 bits)
      83 impacted interfaces
    and offset changed from 9728 to 9536 (in bits) (by -192 bits)
    24 ('const mmc_bus_ops* bus_ops' .. 'bool hsq_enabled') offsets changed (by -64 bits)
  83 impacted interfaces

'struct mmc_slot at host.h:244:1' changed:
  details were reported earlier

'struct pci_dev at pci.h:310:1' changed (indirectly):
  type size hasn't changed
  there are data member changes:
    type 'struct device_dma_parameters' of 'pci_dev::dma_parms' changed, as reported earlier
  417 impacted interfaces

'struct pglist_data at mmzone.h:729:1' changed:
  details were reported earlier

'struct platform_device at platform_device.h:22:1' changed (indirectly):
  type size hasn't changed
  there are data member changes:
    type 'struct device_dma_parameters' of 'platform_device::dma_parms' changed, as reported earlier
  36 impacted interfaces

'struct queue_limits at blkdev.h:318:1' changed:
  type size changed from 960 to 896 (in bits)
  1 data member deletion:
    'unsigned int bio_max_bytes', at offset 0 (in bits) at blkdev.h:319:1
  there are data member changes:
    27 ('unsigned long int bounce_pfn' .. 'blk_zoned_model zoned') offsets changed (by -64 bits)
  3471 impacted interfaces

'struct request_queue at blkdev.h:398:1' changed (indirectly):
  type size changed from 15168 to 15104 (in bits)
  there are data member changes:
    type 'struct queue_limits' of 'request_queue::limits' changed, as reported earlier
    27 ('unsigned int required_elevator_features' .. 'u64 write_hints[5]') offsets changed (by -64 bits)
  3470 impacted interfaces

'struct rq at sched.h:914:1' changed (indirectly):
  details were reported earlier

'struct task_struct at sched.h:652:1' changed:
  details were reported earlier

'struct tcpm_port at tcpm.c:297:1' changed:
  type size changed from 98048 to 98944 (in bits)
  2 data member insertions:
    'hrtimer send_discover_timer', at offset 5376 (in bits) at tcpm.c:371:1
    'kthread_work send_discover_work', at offset 5952 (in bits) at tcpm.c:372:1
  there are data member changes:
    65 ('bool state_machine_running' .. 'u8* logbuffer[1024]') offsets changed (by +896 bits)
  17 impacted interfaces

'struct thread_struct at processor.h:131:1' changed:
  details were reported earlier

'struct track at slab.h:99:1' changed:
  type size changed from 1216 to 1280 (in bits)
  1 data member insertion:
    'u64 android_oem_data1', at offset 1216 (in bits) at slab.h:109:1
  one impacted interface

'struct uclamp_rq at sched.h:899:1' changed:
  type size changed from 384 to 1344 (in bits)
  there are data member changes:
    type 'uclamp_bucket[5]' of 'uclamp_rq::bucket' changed:
      type name changed from 'uclamp_bucket[5]' to 'uclamp_bucket[20]'
      array type size changed from 320 to 1280
      array type subrange 1 changed length from 5 to 20
  3470 impacted interfaces

'struct uclamp_se at sched.h:623:1' changed (indirectly):
  type size hasn't changed
  there are data member changes:
    2 ('unsigned int active' .. 'unsigned int user_defined') offsets changed (by +2 bits)
  3470 impacted interfaces

'struct ucsi_connector at ucsi.h:311:1' changed:
  type size changed from 6592 to 6720 (in bits)
  there are data member changes:
    type 'u32[4]' of 'ucsi_connector::src_pdos' changed:
      type name changed from 'u32[4]' to 'u32[7]'
      array type size changed from 128 to 224
      array type subrange 1 changed length from 4 to 7
    'int num_pdos' offset changed (by +96 bits)
    'usb_role_switch* usb_role_sw' offset changed (by +128 bits)
  7 impacted interfaces

'struct user_namespace at user_namespace.h:57:1' changed:
  type size changed from 4416 to 4480 (in bits)
  1 data member insertion:
    'bool parent_could_setfcap', at offset 2240 (in bits) at user_namespace.h:70:1
  there are data member changes:
    10 ('list_head keyring_name_list' .. 'u64 android_kabi_reserved2') offsets changed (by +64 bits)
  3470 impacted interfaces

'struct v4l2_ctrl_ref at v4l2-ctrls.h:317:1' changed:
  type size changed from 512 to 448 (in bits)
  1 data member deletion:
    'v4l2_ctrl_ref* req', at offset 384 (in bits) at v4l2-ctrls.h:324:1
  1 data member insertion:
    'bool valid_p_req', at offset 336 (in bits) at v4l2-ctrls.h:326:1
  there are data member changes:
    'v4l2_ctrl_ptr p_req' offset changed (by -64 bits)
  31 impacted interfaces

'struct virt_dma_desc at virt-dma.h:15:1' changed (indirectly):
  type size changed from 896 to 1088 (in bits)
  there are data member changes:
    type 'struct dma_async_tx_descriptor' of 'virt_dma_desc::tx' changed, as reported earlier
    2 ('dmaengine_result tx_result' .. 'list_head node') offsets changed (by +192 bits)
  3 impacted interfaces

'struct vm_event_state at vmstat.h:54:1' changed:
  details were reported earlier

'struct vm_struct at vmalloc.h:51:1' changed:
  type size changed from 512 to 576 (in bits)
  1 data member insertion:
    'u64 android_oem_data1', at offset 512 (in bits) at vmalloc.h:61:1
  3470 impacted interfaces

'struct zone at mmzone.h:431:1' changed:
  details were reported earlier

'struct zonelist at mmzone.h:704:1' changed:
  type size changed from 640 to 512 (in bits)
  there are data member changes:
    type 'zoneref[5]' of 'zonelist::_zonerefs' changed:
      type name changed from 'zoneref[5]' to 'zoneref[4]'
      array type size changed from 640 to 512
      array type subrange 1 changed length from 5 to 4
  3470 impacted interfaces

Bug: 188840887
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I734ae5ca74071150e0097dfa22c53296872b8af7
2021-05-21 13:17:10 -07:00
Ming Lei
3a173ef887 FROMGIT: blk-mq: clearing flush request reference in tags->rqs[]
Before we free request queue, clearing flush request reference in
tags->rqs[], so that potential UAF can be avoided.

Based on one patch written by David Jeffery.

Tested-by: John Garry <john.garry@huawei.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: David Jeffery <djeffery@redhat.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20210511152236.763464-5-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Change-Id: I631dbb5138e427246d2e717576fc44727daaa286
Bug: 188199752
(cherry picked from commit 51d4673e57d2613152fdb2ccfe917643472bb218 git://git.kernel.dk/linux-block/ for-5.14/block)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-05-21 13:17:10 -07:00
Ming Lei
72018550d7 FROMGIT: blk-mq: clear stale request in tags->rq[] before freeing one request pool
refcount_inc_not_zero() in bt_tags_iter() still may read one freed
request.

Fix the issue by the following approach:

1) hold a per-tags spinlock when reading ->rqs[tag] and calling
refcount_inc_not_zero in bt_tags_iter()

2) clearing stale request referred via ->rqs[tag] before freeing
request pool, the per-tags spinlock is held for clearing stale
->rq[tag]

So after we cleared stale requests, bt_tags_iter() won't observe
freed request any more, also the clearing will wait for pending
request reference.

The idea of clearing ->rqs[] is borrowed from John Garry's previous
patch and one recent David's patch.

Tested-by: John Garry <john.garry@huawei.com>
Reviewed-by: David Jeffery <djeffery@redhat.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20210511152236.763464-4-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Change-Id: I740ddf3b83ea04ce0349b1b8055ac8b9db1d0557
Bug: 188199752
(cherry picked from commit 33238eb62b7575350be110adff231f32584b20f7 git://git.kernel.dk/linux-block/ for-5.14/block)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-05-21 13:17:09 -07:00
Ming Lei
c944b0c934 FROMGIT: blk-mq: grab rq->refcount before calling ->fn in blk_mq_tagset_busy_iter
Grab rq->refcount before calling ->fn in blk_mq_tagset_busy_iter(), and
this way will prevent the request from being re-used when ->fn is
running. The approach is same as what we do during handling timeout.

Fix request use-after-free(UAF) related with completion race or queue
releasing:

- If one rq is referred before rq->q is frozen, then queue won't be
frozen before the request is released during iteration.

- If one rq is referred after rq->q is frozen, refcount_inc_not_zero()
will return false, and we won't iterate over this request.

However, still one request UAF not covered: refcount_inc_not_zero() may
read one freed request, and it will be handled in next patch.

Tested-by: John Garry <john.garry@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20210511152236.763464-3-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Change-Id: I3e092c0487989ddf389308dc0da325b90e0bf7d4
Bug: 188199752
(cherry picked from commit 91af4d7b8930d9fd8767aee826c3ff4c1eaeec02 git://git.kernel.dk/linux-block/ for-5.14/block)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-05-21 13:17:09 -07:00
Alexander Potapenko
0270bff881 Revert "ANDROID: GKI: Enable CONFIG_KUNIT"
This reverts commit 6d961aa91d.

Currently there are no tests depending on it, so let us reduce the API
surface.

Bug: 176228452
Bug: 186450428
Test: Treehugger
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I14d163f9b0fcc2d34984abdad424d49c8054a65f
2021-05-21 13:17:09 -07:00
Bart Van Assche
ad14489b58 BACKPORT: block: Remove queue_limits.bio_max_bytes
Remove this structure member since it is no longer used.

Cc: Changheun Lee <nanich.lee@samsung.com>
Cc: Jaegeuk Kim <jaegeuk@google.com>
Bug: 182716953
Change-Id: I01475bd875fd17c36d02203dc6de5293d7c8db38
(cherry picked from commit 35c820e715)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-05-21 13:17:09 -07:00
Alexander Potapenko
c141d9773b FROMGIT: kasan: use dump_stack_lvl(KERN_ERR) to print stacks
Most of the contents of KASAN reports are printed with pr_err(), so use a
consistent logging level to print the memory access stacks.

Link: https://lkml.kernel.org/r/20210506105405.3535023-2-glider@google.com
Signed-off-by: Alexander Potapenko <glider@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Prasad Sodagudi <psodagud@quicinc.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: he, bo <bo.he@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Bug: 186674719
Test: Treehugger
(cherry picked from commit bf5570ed0654a21000e5dad9243ea1ba30bfe208
 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I9a612c44291122aed2f1baab816f24c4128b78fe
2021-05-21 13:17:09 -07:00
Marco Elver
53efd89f41 FROMGIT: fix for "printk: introduce dump_stack_lvl()"
Add missing dump_stack_lvl() stub if CONFIG_PRINTK=n.

Link: https://lkml.kernel.org/r/YJ0KAM0hQev1AmWe@elver.google.com
Signed-off-by: Marco Elver <elver@google.com>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Bug: 186674719
Test: Treehugger
(cherry picked from commit 9c060e7a8a2b1853a5069809c7e9faecf6e7486b
 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: Iea3529d356f4cd6c657659620f3ba5c134316a47
2021-05-21 13:17:09 -07:00
Alexander Potapenko
359a038bbf FROMGIT: printk: introduce dump_stack_lvl()
dump_stack() is used for many different cases, which may require a log
level consistent with other kernel messages surrounding the dump_stack()
call.  Without that, certain systems that are configured to ignore the
default level messages will miss stack traces in critical error reports.

This patch introduces dump_stack_lvl() that behaves similarly to
dump_stack(), but accepts a custom log level.  The old dump_stack()
becomes equal to dump_stack_lvl(KERN_DEFAULT).

A somewhat similar patch has been proposed in 2012:
https://lore.kernel.org/lkml/1332493269.2359.9.camel@hebo/ , but wasn't
merged.

Link: https://lkml.kernel.org/r/20210506105405.3535023-1-glider@google.com
Signed-off-by: Alexander Potapenko <glider@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: he, bo <bo.he@intel.com>
Cc: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Cc: Prasad Sodagudi <psodagud@quicinc.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Bug: 186674719
Test: Treehugger
(cherry picked from commit e8c4bbbd160c8a29b606a8d7ef8dcdd75f2b7044
 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I6f5cc76cd50d446caf41c8a709c3bf6542fae6f8
2021-05-21 13:17:08 -07:00
Vincenzo Frascino
0aa48437bf UPSTREAM: arm64: mte: Remove unused mte_assign_mem_tag_range()
mte_assign_mem_tag_range() was added in commit 85f49cae4d
("arm64: mte: add in-kernel MTE helpers") in 5.11 but moved out of
mte.S by commit 2cb3427642 ("arm64: kasan: simplify and inline
MTE functions") in 5.12 and renamed to mte_set_mem_tag_range().
2cb3427642 did not delete the old function prototypes in mte.h.

Remove the unused prototype from mte.h.

Cc: Will Deacon <will@kernel.org>
Reported-by: Derrick McKee <derrick.mckee@gmail.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20210407133817.23053-1-vincenzo.frascino@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit df652a16a6)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: Ife80a4c928a8e50e5747575bc6df4a65b6ad72b1
2021-05-21 13:17:08 -07:00
Peter Collingbourne
63990c63c3 UPSTREAM: arm64: mte: make the per-task SCTLR_EL1 field usable elsewhere
In an upcoming change we are going to introduce per-task SCTLR_EL1
bits for PAC. Move the existing per-task SCTLR_EL1 field out of the
MTE-specific code so that we will be able to use it from both the
PAC and MTE code paths and make the task switching code more efficient.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Link: https://linux-review.googlesource.com/id/Ic65fac78a7926168fa68f9e8da591c9e04ff7278
Link: https://lore.kernel.org/r/13d725cb8e741950fb9d6e64b2cd9bd54ff7c3f9.1616123271.git.pcc@google.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 2f79d2fc39)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I1bc76851cd2cc801c9a289dbd589fd21f24eebdb
2021-05-21 13:17:08 -07:00
Liujie Xie
8bc6337823 ANDROID: vendor_hooks: add hooks for slab memory leak debugging
Add hooks and additional fields in vm_struct and track structs
to store and report additional information for slab memory leak
debugging.

Bug: 184928480

Change-Id: I6897a6a98d4eaaea492673cefd4111a7ba741940
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
2021-05-21 13:17:08 -07:00
Quentin Perret
70094f39c7 Revert "Revert "ANDROID: GKI: Change UCLAMP_BUCKETS_COUNT to 20""
This reverts commit 39111fc404.
The bug in uclamp has now been fixed, we can switch back to 20 buckets.

Bug: 186415778
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: I4b780e45398318e70cd1ce6e0dcebed45747bdf1
2021-05-21 13:17:08 -07:00
Suren Baghdasaryan
17f9730086 ANDROID: GKI: Disable CONFIG_ZONE_DMA on arm64
After 1a8e1cef76 "arm64: use both ZONE_DMA and ZONE_DMA32" ZONE_DMA
gets enabled by default. Disable this config to remove unused zone.

Bug: 183374329
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I0571a2a2b2c73e884b2e35c9b906465bf740da71
2021-05-21 13:17:08 -07:00
Neeraj Upadhyay
065b3eabbd ANDROID: abi_gki_aarch64_qcom: Add *gic_v3_set_affinity trace syms
Add __traceiter_android_rvh_gic_v3_set_affinity and
__tracepoint_android_rvh_gic_v3_set_affinity to qcom
symbol list.

Bug: 187161770
Change-Id: I272731772c52fdb07a1220f8b092a34c7750872a
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2021-05-21 13:17:07 -07:00
fengmingli
e80bcd4627 ANDROID: mmc: Add vendor hooks
Add vendor hooks to support vendor-specific exception handling features.

Bug: 185083720

Change-Id: I30381ed9835338308f2b03856f510a2982db6e6a
Signed-off-by: fengmingli <mingli.feng@vivo.com>
2021-05-21 13:17:07 -07:00
Neeraj Upadhyay
3bd9ad7eb4 ANDROID: gic-v3: Change GIC v3 vendor hook to restricted
Some of the irq migration paths call chip set affinity, after
current CPU is marked offline in cpu_online_mask. These
chip set affinity calls do not invoke vendor trace hooks.
So, convert gic_v3_set_affinity() vendor hook to a restricted
hook, to allow trace hook to be called from these irq migration
paths.

Bug: 187161770
Change-Id: I8f45536deb1ba1dc6be861ca4fc2b32306a5c50a
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2021-05-21 13:17:07 -07:00
Adrian-CJ Hung
0dc97b664f ANDROID: GKI: enable hidden configs for DMA
Add hidden configs to ASYNC_TX_ENABLE_CHANNEL_SWITCH so they are
enabled for loadable DMA modules built out-of-tree

Bug: 177807056
Signed-off-by: Adrian-CJ Hung <adrian-cj.hung@mediatek.com>
Change-Id: I36866ad4d93eab9a826928ac8f0dc8cac84c232c
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-05-21 13:17:07 -07:00
Greg Kroah-Hartman
6f3a72c462 ANDROID: GKI: remove kernel_read from abi symbol list
This accidentally got added as part of the "generic" system list and
should not be needed for any driver so remove it.

Bug: 157965270
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3020b73ba10e2cfc75d4a582a9263a12cc53e937
2021-05-21 13:17:07 -07:00
Greg Kroah-Hartman
51dc321c7d Revert "Revert "mmc: block: Issue a cache flush only when it's enabled""
This reverts commit 36c1596556.

Bring back the commit in 5.10.36 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id4a80652b7b702c620626606fdbdd6565584e27c
2021-05-21 13:17:07 -07:00
Greg Kroah-Hartman
e606ad4aae Revert "ANDROID: GKI: restore a part of "struct mmc_host""
This reverts commit a12132f848.

Bring back the commit in 5.10.36 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia3896de1eca422d424175a2105299e9e5a521a04
2021-05-21 13:17:06 -07:00
Greg Kroah-Hartman
71a3aa889d Revert "Revert "media: v4l2-ctrls: fix reference to freed memory""
This reverts commit 36b2c4814a.

Bring back the commit in 5.10.36 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iaeb28c53958540c1ab5888a0e0070759696e8bb3
2021-05-21 13:17:06 -07:00
Greg Kroah-Hartman
4cef9277ba Revert "Revert "sched,fair: Alternative sched_slice()""
This reverts commit 3d24408745.

Bring back the commit in 5.10.36 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iafa9c51e4cb9e42f4149c4e9889b822288a96ad2
2021-05-21 13:17:06 -07:00
Kyle Tso
63524ab60a FROMGIT: usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work
In current design, DISCOVER_IDENTITY is queued to VDM state machine
immediately in Ready states and never retries if it fails in the AMS.
Move the process to a delayed work so that when it fails for some
reasons (e.g. Sink Tx No Go), it can be retried by queueing the work
again. Also fix a problem that the vdm_state is not set to a proper
state if it is blocked by Collision Avoidance mechanism.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Kyle Tso <kyletso@google.com>
Link: https://lore.kernel.org/r/20210507062300.1945009-2-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c34e85fa69
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9a09756aabc01eb5cd981802c0f83e8939f9f1e8
2021-05-21 13:17:06 -07:00
Jack Pham
60b53937ab FROMGIT: usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4
commit 4dbc6a4ef0 ("usb: typec: ucsi: save power data objects
in PD mode") introduced retrieval of the PDOs when connected to a
PD-capable source. But only the first 4 PDOs are received since
that is the maximum number that can be fetched at a time given the
MESSAGE_IN length limitation (16 bytes). However, as per the PD spec
a connected source may advertise up to a maximum of 7 PDOs.

If such a source is connected it's possible the PPM could have
negotiated a power contract with one of the PDOs at index greater
than 4, and would be reflected in the request data object's (RDO)
object position field. This would result in an out-of-bounds access
when the rdo_index() is used to index into the src_pdos array in
ucsi_psy_get_voltage_now().

With the help of the UBSAN -fsanitize=array-bounds checker enabled
this exact issue is revealed when connecting to a PD source adapter
that advertise 5 PDOs and the PPM enters a contract having selected
the 5th one.

[  151.545106][   T70] Unexpected kernel BRK exception at EL1
[  151.545112][   T70] Internal error: BRK handler: f2005512 [#1] PREEMPT SMP
...
[  151.545499][   T70] pc : ucsi_psy_get_prop+0x208/0x20c
[  151.545507][   T70] lr : power_supply_show_property+0xc0/0x328
...
[  151.545542][   T70] Call trace:
[  151.545544][   T70]  ucsi_psy_get_prop+0x208/0x20c
[  151.545546][   T70]  power_supply_uevent+0x1a4/0x2f0
[  151.545550][   T70]  dev_uevent+0x200/0x384
[  151.545555][   T70]  kobject_uevent_env+0x1d4/0x7e8
[  151.545557][   T70]  power_supply_changed_work+0x174/0x31c
[  151.545562][   T70]  process_one_work+0x244/0x6f0
[  151.545564][   T70]  worker_thread+0x3e0/0xa64

We can resolve this by instead retrieving and storing up to the
maximum of 7 PDOs in the con->src_pdos array. This would involve
two calls to the GET_PDOS command.

Fixes: 992a60ed0d ("usb: typec: ucsi: register with power_supply class")
Fixes: 4dbc6a4ef0 ("usb: typec: ucsi: save power data objects in PD mode")
Cc: stable@vger.kernel.org
Reported-and-tested-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Link: https://lore.kernel.org/r/20210503074611.30973-1-jackp@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1f4642b72b
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I902d276d5d59abf3a8ff15bbccd25d48f5370ecc
2021-05-21 13:17:06 -07:00
Greg Kroah-Hartman
10823e5b1e Revert "Revert "nvme-pci: set min_align_mask""
This reverts commit abc5254824.

Bring back the commit in 5.10.35 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib6f6163ef625ac0bcbff1c1be4fdf00294743e7a
2021-05-21 13:17:06 -07:00
Greg Kroah-Hartman
c53986ee8b Revert "Revert "swiotlb: respect min_align_mask""
This reverts commit b4ae4430ab.

Bring back the commit in 5.10.35 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1dd3e49ebca722219c15faaa4f895d992530a3ed
2021-05-21 13:17:05 -07:00
Greg Kroah-Hartman
a4094253bf Revert "Revert "swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single""
This reverts commit 2201384121.

Bring back the commit in 5.10.35 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I14d47f0fc68b35b08323b26eb045b5cdda845cf0
2021-05-21 13:17:05 -07:00
Greg Kroah-Hartman
9bd37c7924 Revert "Revert "swiotlb: refactor swiotlb_tbl_map_single""
This reverts commit 0fb49e91d4.

Bring back the commit in 5.10.35 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7c52f223a6ca7b8900ccdfc529afe1c21b2b11ef
2021-05-21 13:17:05 -07:00
Greg Kroah-Hartman
8ebef45db5 Revert "Revert "swiotlb: clean up swiotlb_tbl_unmap_single""
This reverts commit 28a2f5f10f.

Bring back the commit in 5.10.35 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibebda0f5aeecc6ba2fe45902870b783e3e9cbb0f
2021-05-21 13:17:05 -07:00
Greg Kroah-Hartman
2893baee79 Revert "Revert "swiotlb: factor out a nr_slots helper""
This reverts commit cb27079661.

Bring back the commit in 5.10.35 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I14e92ad7064f5d3f4334d17bdb78444dff45cab3
2021-05-21 13:17:05 -07:00
Greg Kroah-Hartman
7b5e000065 Revert "Revert "swiotlb: factor out an io_tlb_offset helper""
This reverts commit 78957dcb2c.

Bring back the commit in 5.10.35 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3c4e4f15d932dfe10b4a406cda6a49948a130f58
2021-05-21 13:17:05 -07:00
Greg Kroah-Hartman
fb0759a0d9 Revert "Revert "swiotlb: add a IO_TLB_SIZE define""
This reverts commit 17ba7dfe20.

Bring back the commit in 5.10.35 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ied3e936060722b44f374cec6645bcdf5a1c1ba47
2021-05-21 13:17:04 -07:00
Greg Kroah-Hartman
20fa297001 Revert "Revert "driver core: add a min_align_mask field to struct device_dma_parameters""
This reverts commit 0ddd59c5da.

Bring back the commit in 5.10.35 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iec8941b9cb1766c585a9b0ddb5bf55051235d5e1
2021-05-21 13:17:04 -07:00
Greg Kroah-Hartman
4d55905007 Revert "Revert "capabilities: require CAP_SETFCAP to map uid 0""
This reverts commit d9d0c09e0a.

Bring back the commit in 5.10.35 that broke the kabi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1fcf27286f9c21fb87f9dd05b0f861b37350d780
2021-05-21 13:17:04 -07:00
Greg Kroah-Hartman
b73471e4e7 Revert "ANDROID: usb: typec: ucsi: Ensure bounds check when accessing src_pdos"
This reverts commit cd04f7fab9.

It will be fixed "properly" with an upstream patch later on in this
series, so revert it now so that it does not cause conflicts with the
upstream commit.

Bug: 186400956
Cc: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I111e570ce5e2447c639723430e86c98c040171b1
2021-05-21 13:17:04 -07:00
Lokesh Gidra
167612c1d4 ANDROID: Fix compilation error with huge_pmd_share()
There was an asterisk missing for one of the function parameters in the
upstreamed patch.

Fixes: 59caf93f36 ("BACKPORT: FROMGIT: hugetlb: pass vma into
huge_pte_alloc() and huge_pmd_share()")

Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Bug: 160737021
Bug: 169683130
Change-Id: I110563bc38e60a829fe7808f69dc0aa0f203a50e
2021-05-21 17:47:19 +00:00
Faiyaz Mohammed
f2f8d7326a UPSTREAM: mm: memblock: add more debug logs
It is useful to know the exact caller of memblock_phys_alloc_range() to
track early memory reservations during development.

Currently, when memblock debugging is enabled, the allocations done with
memblock_phys_alloc_range() are only reported at memblock_reserve():

[    0.000000] memblock_reserve: [0x000000023fc6b000-0x000000023fc6bfff] memblock_alloc_range_nid+0xc0/0x188

Add memblock_dbg() to memblock_phys_alloc_range() to get details about
its usage.

For example:

[    0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 early_pgtable_alloc+0x24/0x178
[    0.000000] memblock_reserve: [0x000000023fc6b000-0x000000023fc6bfff] memblock_alloc_range_nid+0xc0/0x188

Signed-off-by: Faiyaz Mohammed <faiyazm@codeaurora.org>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Bug: 187741816
(cherry picked from commit b5cf2d6c81
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git)

Change-Id: I7fb49411513a151f0c9dbb8774f489a59e776ac0
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2021-05-21 09:08:08 +05:30
Faiyaz Mohammed
a46e3fa139 UPSTREAM: mm: memblock: drop __init from memblock functions to make it inline
__init is used with inline due to which memblock wraper functions are
not getting inline.
for example:
[    0.000000] memblock_alloc_try_nid: 1490 bytes align=0x40 nid=-1 from=0x0000000000000000 max_addr=0x0000000000000000 memblock_alloc+0x20/0x2c
[    0.000000] memblock_reserve: [0x000000023f09a3c0-0x000000023f09a991] memblock_alloc_range_nid+0xc0/0x188

Dropping __init from memblock wrapper functions to make it inline and it
increase the debugability.
After:
[    0.000000] memblock_alloc_try_nid: 1490 bytes align=0x40 nid=-1 from=0x0000000000000000 max_addr=0x0000000000000000 start_kernel+0xa4/0x568
[    0.000000] memblock_reserve: [0x000000023f09a3c0-0x000000023f09a991] memblock_alloc_range_nid+0xc0/0x188

Signed-off-by: Faiyaz Mohammed <faiyazm@codeaurora.org>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Bug: 187741816
(cherry picked from commit 5bdba520c1
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git)

Change-Id: I6c09efbcbabd0f347b77efd03d862814a5409f22
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2021-05-21 09:05:32 +05:30
J. Avila
c8df669b7c ANDROID: modpost: Check for KBUILD_MIXED_TREE for Modules.symvers
When building with KBUILD_MIXED_TREE, Modules.symvers will not be built
since vmlinux.symvers won't be in the normal build outputs. Fix this by
checking for the mixed-build-prefix in the Modules.symvers target.

Fixes: d0736af811 ("kbuild: generate Module.symvers only when vmlinux exists")
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: Ic8dcc220cb7b93498629719aaccdb7b6fc38a6a1
2021-05-20 23:47:36 +00:00
Huang Yiwei
17b9c24b25 ANDROID: hung_task: Add vendor hook for hung task detect
Add vendor hook for hung task detect, so we can decide which
threads need to check, avoiding false alarms.

Bug: 188684133
Signed-off-by: Huang Yiwei <hyiwei@codeaurora.org>
Change-Id: I5d7dfeb071cbfda8121134c38a458202aaa3a8c6
2021-05-20 14:50:25 -07:00
Yang Yang
1b6f2f6e29 ANDROID: vendor_hooks: add hook to balance_dirty_pages()
Add vendor hook in order to track which process cause dirty page write
back pressure.

Bug: 188096764
Change-Id: I890299c97d7a8cf791f20d16d8d53b4615679b9e
Signed-off-by: Yang Yang <yang.yang@vivo.com>
2021-05-20 19:38:42 +00:00
xieliujie
dc5241048f ANDROID: vendor_hooks: Add hooks for reducing virtual address fragmentation
When running 32-bit apps for a long time, virtual address becomes fragmented which can lead to allocation failures when a large virtually-contiguous area is requested.
Add hooks to implement pools to cluster together small-sized virtual address mappings.
Add hooks to implement reserved virtual address zone with usage restrictions controlled by vendor hooks.
These hooks help in controlling virtual address space fragmentation.

Bug: 187259935

Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I48c057041f9c7b8c5ab0af305f0cd87a039d0447
2021-05-20 19:36:17 +00:00
Elliot Berman
f150653471 ANDROID: abi_gki_aarch64_qcom: Add aes_encrypt/aes_expandkey
Add aes_encrypt and aes_expandkey to support crypto use case.

Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

2 Added functions:

  [A] 'function void aes_encrypt(const crypto_aes_ctx*, u8*, const u8*)'
  [A] 'function int aes_expandkey(crypto_aes_ctx*, const u8*, unsigned int)'

Bug: 188392181
Change-Id: I96961089eef3ab8729dde0a418134181f7cd4200
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2021-05-20 18:57:07 +00:00
Guangming Cao
15acc8fac6 ANDROID: iommu: Add vendor hook for iova allocation and free tracking
Add vendor hook for iommu_dma_alloc_iova and iommu_dma_free_iova
to allow vendor enhancement.

Bug: 187861158

Change-Id: I2ebe8b24318bd5292edc66a94d7109332d478212
Signed-off-by: Guangming Cao <Guangming.Cao@mediatek.com>
2021-05-20 16:47:46 +00:00
Isaac J. Manjarres
9b6836900e ANDROID: iommu/io-pgtable-arm: Fix unmapping loop in __arm_lpae_unmap()
When unmapping multiple entries, __arm_lpae_unmap() should unmap
one entry at a time and perform TLB maintenance as required for that
entry.

However, the existing logic clears all N entries starting
at a particular point in the page table, and moves on to the
next entry, and clears N entries again, which is not correct.

Ensure that only one entry is cleared and handled at a time,
as was originally intended.

Bug: 178537788
Reported-by: John Stultz <john.stultz@linaro.org>
Fixes: 3c75179a31 ("ANDROID: iommu/io-pgtable-arm: Free underlying page tables for large mappings")
Change-Id: I814418ed0782c1e51316f191fdad939028b75731
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2021-05-20 16:45:26 +00:00
Jone Chou
bb0eadd830 ANDROID: kernel: Fix debug_kinfo warning message
Fix warning message as CONFIG_DEBUG_VIRTUAL=y

Bug: 188614550
Signed-off-by: Jone Chou <jonechou@google.com>
Change-Id: I14098e6ed3363ae18fa30d4072fc06cc03664c9f
2021-05-20 15:48:27 +00:00
Greg Kroah-Hartman
c34cd7750e Revert "mm: fix struct page layout on 32-bit systems"
This reverts commit cfddf6a685 as it
breaks the kernel abi at the moment.  It will be restored at a later
point in time.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic4dd11b89bcfd8ded25e4cb39f16967b22f5fa88
2021-05-20 15:35:26 +02:00
Greg Kroah-Hartman
4940c943b4 Revert "usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4"
This reverts commit e5366bea02 as it
breaks the kernel abi at the moment.  It will be restored at a later
point in time.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>

Change-Id: I1a91bb1044c7006c9fa9f49639ac364af1c7510f
2021-05-20 15:35:26 +02:00
Greg Kroah-Hartman
59870a78d4 Revert "kyber: fix out of bounds access when preempted"
This reverts commit 54dbe2d2c1 as it
breaks the kernel abi at the moment.  It will be restored at a later
point in time.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ida737ad962db2dc0ece0bd35ccb71e0db8e76fa2
2021-05-20 15:35:26 +02:00