Downgrade some expected log messages from pr_warn() to pr_info().
Also remove "FIPS 140" from some log messages since the messages are
already prefixed with "fips140: " (the name of the module) which makes
it redundant.
Bug: 153614920
Bug: 188620248
Change-Id: I94055d7a5a86a770fcf38e958e7d7497b4bafdf0
Signed-off-by: Eric Biggers <ebiggers@google.com>
Avoid a compiler warning about there being no previous declaration for
fips140_init().
Bug: 153614920
Bug: 188620248
Change-Id: I8192c597d16ff6f43a0e9cb45a89969666b3875e
Signed-off-by: Eric Biggers <ebiggers@google.com>
This patch is for updating GKI allowed symbol list without adding any
new symbol. Next patch will introduce newly added symbols for Exynosauto
SoC GKI vendor modules.
Bug: 192805988
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Change-Id: I6afec1983c83c032d9bd34bb330faecfd0140bc4
Fixes the following W=1 kernel build warning(s):
drivers/scsi/ufs/ufshcd.c:6603: warning: Function parameter or member 'hba' not described in 'ufshcd_try_to_abort_task'
drivers/scsi/ufs/ufshcd.c:6603: warning: Function parameter or member 'tag' not described in 'ufshcd_try_to_abort_task'
drivers/scsi/ufs/ufshcd.c:6603: warning: Excess function parameter 'cmd' description in 'ufshcd_try_to_abort_task'
Link: https://lore.kernel.org/r/20201102142359.561122-12-lee.jones@linaro.org
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Santosh Yaraganavi <santosh.sy@samsung.com>
Cc: Vinayak Holikatti <h.vinayak@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit d23ec0b610 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)
Change-Id: I9540b80ceb7cd28629e86101b3b0b561762b6cde
Signed-off-by: Bart Van Assche <bvanassche@google.com>
debug_locks_off can be called in scenarios where the kernel doesn't
immediately panic. For instance, debug_locks_off is called with a
mismatched preempt_count or when registering an improper lockdep map
and fails the sanity check for lock-class key [1]. Both of these issues
were discovered in vendor kernel code and were fixed.
When console_verbose is enabled, we have found that kernel tends to be
unstable because it is spending much of its time printing to the serial
log, so the system may miss watchdog pats. We explicitly set our system
to reduce the loglevel in order to prevent such scenarios, however
lockdep can circumvent the commandline setting. Thus, when we ran into
the kernel bugs, we first ended up trying to debug why the kernel wasn't
able to respond to watchdog pets and why it was spending all of its time
flushing the console, which did not quickly lead us to the "real"
lock dependency issue.
Remove the console_verbose when turning off lock debugging. Other debug
facilities, such as KASAN, KFENCE, SPINLOCK_DEBUG, and DEBUG_OBJECTS
don't set console_verbose when issues are detected. Current other uses
for console_verbose are in situations where kernel is in a panic path.
[1]: kernel/locking/lockdep.c:lockdep_init_map_waits:4617
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Link: https://lore.kernel.org/lkml/20210623045559.15750-1-eberman@codeaurora.org/
Bug: 191903062
Change-Id: If33587c49d316155a1745c9e0ef1a9ce23410a2b
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Add symbols missing from qcom symbol list for 80211 configs.
All of these symbols were already added in commit 7d8c327a64
("ANDROID: ABI: gki_defconfig: Make cfg80211 and mac80211 modules"), but
now add them explicitly to abi_gki_aarch64_qcom symbol list.
Bug: 189918667
Change-Id: I3ada83f8bbdc0edc4b9778cccb0ff07f68ee2aac
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
android_rvh_sched_fork() and android_rvh_sched_fork_init()
already let us register probes during fork(), but those are
invoked *before* the new task is added to the tasklist, which
can lead to some undesired races when a module is trying to
initialize vendor-specific task_struct fields.
Export the task_newtask tracepoint to register probes to run
during fork() but *after* the task has been inserted into the
tasklist.
Bug: 192873984
Signed-off-by: Jing-Ting Wu <Jing-Ting.Wu@mediatek.com>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Change-Id: Ifef14819264385b5e955a5966b4e4f66d50da5e3
Fix warnings reported by kernelci due to incorrect indentatio:
kernel/smp.c:982:3: warning: this ‘if’ clause does not guard
Fixes: f0b280c395 ("ANDROID: cpuidle: Update cpuidle_uninstall_idle_handler()
to wakeup all online CPUs")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Ide771342558de321154696f9fe1272750a773853
Struct gic_chip_data definition is not visible to vendor modules
however its passed as parameter to trace_android_vh_gic_resume().
Move struct gic_chip_data definition to gic-v3 header so that vendor
hook can access member variables.
Bug: 192660047
Fixes: cb99d1b88c ("ANDROID: gic: change gic resume vendor hook para")
Change-Id: I4d1f4adb5b6cb932876650feacb69950d0d686bc
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
commit 5f89468e2f upstream.
in case of driver wants to sync part of ranges with offset,
swiotlb_tbl_sync_single() copies from orig_addr base to tlb_addr with
offset and ends up with data mismatch.
It was removed from
"swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single",
but said logic has to be added back in.
From Linus's email:
"That commit which the removed the offset calculation entirely, because the old
(unsigned long)tlb_addr & (IO_TLB_SIZE - 1)
was wrong, but instead of removing it, I think it should have just
fixed it to be
(tlb_addr - mem->start) & (IO_TLB_SIZE - 1);
instead. That way the slot offset always matches the slot index calculation."
(Unfortunatly that broke NVMe).
The use-case that drivers are hitting is as follow:
1. Get dma_addr_t from dma_map_single()
dma_addr_t tlb_addr = dma_map_single(dev, vaddr, vsize, DMA_TO_DEVICE);
|<---------------vsize------------->|
+-----------------------------------+
| | original buffer
+-----------------------------------+
vaddr
swiotlb_align_offset
|<----->|<---------------vsize------------->|
+-------+-----------------------------------+
| | | swiotlb buffer
+-------+-----------------------------------+
tlb_addr
2. Do something
3. Sync dma_addr_t through dma_sync_single_for_device(..)
dma_sync_single_for_device(dev, tlb_addr + offset, size, DMA_TO_DEVICE);
Error case.
Copy data to original buffer but it is from base addr (instead of
base addr + offset) in original buffer:
swiotlb_align_offset
|<----->|<- offset ->|<- size ->|
+-------+-----------------------------------+
| | |##########| | swiotlb buffer
+-------+-----------------------------------+
tlb_addr
|<- size ->|
+-----------------------------------+
|##########| | original buffer
+-----------------------------------+
vaddr
The fix is to copy the data to the original buffer and take into
account the offset, like so:
swiotlb_align_offset
|<----->|<- offset ->|<- size ->|
+-------+-----------------------------------+
| | |##########| | swiotlb buffer
+-------+-----------------------------------+
tlb_addr
|<- offset ->|<- size ->|
+-----------------------------------+
| |##########| | original buffer
+-----------------------------------+
vaddr
[One fix which was Linus's that made more sense to as it created a
symmetry would break NVMe. The reason for that is the:
unsigned int offset = (tlb_addr - mem->start) & (IO_TLB_SIZE - 1);
would come up with the proper offset, but it would lose the
alignment (which this patch contains).]
Bug: 192521392
Fixes: 16fc3cef33 ("swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single")
Signed-off-by: Bumyong Lee <bumyong.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reported-by: Dominique MARTINET <dominique.martinet@atmark-techno.com>
Reported-by: Horia Geantă <horia.geanta@nxp.com>
Tested-by: Horia Geantă <horia.geanta@nxp.com>
CC: stable@vger.kernel.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e6108147dd of
linux-5.10.47)
Change-Id: Ib03e81080ab029d37e6ff54a3e2cb526d3a30e10
int the commit: https://android-review.googlesource.com/c/kernel/common/+/1699406/
When we build our vendor driver, report two errors:
1) Symbol too long "trace_android_vh_get_unmapped_area_from_anti_fragment_pool"
2) Symbol too long "trace_android_vh_get_unmapped_area_include_reserved_zone"
So, I shorten the function names:
android_vh_get_unmapped_area_from_anti_fragment_pool --> android_vh_get_from_fragment_pool
android_vh_get_unmapped_area_include_reserved_zone --> android_vh_include_reserved_zone
Bug: 191439466
Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: Icee4faa24df4fe1fc29434cd205c4dea82b4fba5
Vendor hook may modify index to negative to force an early
exit from idle entry. Add support for the same.
Bug: 192436062
Change-Id: I82b822296d06b122e3f154b2c8af2128136023d5
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
wake_up_all_idle_cpus() will not wakeup paused CPUs since they are removed
from cpu_active_mask but paused CPUs can be in deep cpu idle and hence must
wakeup when uninstalling idle handler.
This change fixes this by introducing wake_up_all_online_idle_cpus() to
unconditionally wakeup all online idle CPUs and invoking same when uninstalling
cpu idle handler.
Bug: 192436062
Fixes: 683010f555 ("ANDROID: cpu/hotplug: add pause/resume_cpus interface")
Change-Id: I4afd4b7a17b87f9cc495e7009c9537888387f9ef
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
In change Iab3971cd0d78d669536b8eb0505c60caa3aafeee the
cfg80211 and mac80211 drivers were switched to modules, so we
need to add them as such to the hikey960_gki.fragment.
With this change, hikey960 boots and wifi comes up.
Bug: 189918667
Fixes: Iab3971cd0d78d669536b8eb0505c60caa3aafeee
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I8cd3dd3dc76852e270b7b4ba518323af92ff6dda
Remove CONFIG_CFG80211 and CONFIG_MAC80211 from gki_defconfig
to allow vendors to incorporate features that have landed upstream.
Also need to update symbol lists since the related 80211
symbols are no longer exported from the core kernel.
Bug: 189918667
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Iab3971cd0d78d669536b8eb0505c60caa3aafeee
This reverts commit bba0d8a87e.
CFG80211 changing to a module so these configs go into device-specific
defconfig fragments.
Bug: 189918667
Change-Id: Ie4b70407369da3c865541e4857c3ba18fec24587
This reverts commit 9132fbe545.
Reason for revert: mmap_count is no longer used for reporting dma-bufs
and introduces subtle bugs related to changing the vm_ops
Bug: 192459295
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Change-Id: Id07802e5a3e18918c5c46e31b73be4a594f7dc26
This reverts commit fca37c251a.
Reason for revert: mmap_count is no longer used for reporting dma-bufs and introduces subtle bugs related to changing the vm_ops
Bug: 192459295
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Change-Id: I52fb55e1048a151fae7641c9646a231d59b3224d
Add ABI padding to some of the data structures to accommodate
new eMMC features enablement later.
Bug: 192337957
Change-Id: Ica3f96ea004fb89e4b46ef9734864c655cdcd277
Signed-off-by: Sahitya Tummala <quic_stummala@quicinc.com>
This change adds the rproc_coredump() and rproc_coredump_cleanup()
APIs to the qcom symbol list.
Bug: 188764827
Change-Id: I32a56f5d3caabc61ed94f6de0d7daa29becb490d
Signed-off-by: Siddharth Gupta <quic_sidgup@quicinc.com>
Add the the symbols exported by the remoteproc vendor hook to the
qcom symbol list.
Change-Id: Iffd58aa5d367141de1c065488519b29fb802fd86
Signed-off-by: Siddharth Gupta <quic_sidgup@quicinc.com>
For vendor specific data in struct cfs_rq.
Bug: 188947181
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I7c322c6812829c19014426b5721cd1fb0c37a53f
We need to obtain the pid and tid information of the caller in the async binder transaction.
So we need to add the pid and tid information in the async binder transaction.
Bug: 190413570
Signed-off-by: zhang chuang <zhangchuang3@xiaomi.com>
Change-Id: If67c972aa53196d626ccfeb46b6b61e43ddc57ae
0day robot reported a 9.2% regression for will-it-scale mmap1 test
case[1], caused by commit 57efa1fe59 ("mm/gup: prevent gup_fast from
racing with COW during fork").
Further debug shows the regression is due to that commit changes the
offset of hot fields 'mmap_lock' inside structure 'mm_struct', thus some
cache alignment changes.
From the perf data, the contention for 'mmap_lock' is very severe and
takes around 95% cpu cycles, and it is a rw_semaphore
struct rw_semaphore {
atomic_long_t count; /* 8 bytes */
atomic_long_t owner; /* 8 bytes */
struct optimistic_spin_queue osq; /* spinner MCS lock */
...
Before commit 57efa1fe59 adds the 'write_protect_seq', it happens to
have a very optimal cache alignment layout, as Linus explained:
"and before the addition of the 'write_protect_seq' field, the
mmap_sem was at offset 120 in 'struct mm_struct'.
Which meant that count and owner were in two different cachelines,
and then when you have contention and spend time in
rwsem_down_write_slowpath(), this is probably *exactly* the kind
of layout you want.
Because first the rwsem_write_trylock() will do a cmpxchg on the
first cacheline (for the optimistic fast-path), and then in the
case of contention, rwsem_down_write_slowpath() will just access
the second cacheline.
Which is probably just optimal for a load that spends a lot of
time contended - new waiters touch that first cacheline, and then
they queue themselves up on the second cacheline."
After the commit, the rw_semaphore is at offset 128, which means the
'count' and 'owner' fields are now in the same cacheline, and causes
more cache bouncing.
Currently there are 3 "#ifdef CONFIG_XXX" before 'mmap_lock' which will
affect its offset:
CONFIG_MMU
CONFIG_MEMBARRIER
CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES
The layout above is on 64 bits system with 0day's default kernel config
(similar to RHEL-8.3's config), in which all these 3 options are 'y'.
And the layout can vary with different kernel configs.
Relayouting a structure is usually a double-edged sword, as sometimes it
can helps one case, but hurt other cases. For this case, one solution
is, as the newly added 'write_protect_seq' is a 4 bytes long seqcount_t
(when CONFIG_DEBUG_LOCK_ALLOC=n), placing it into an existing 4 bytes
hole in 'mm_struct' will not change other fields' alignment, while
restoring the regression.
Link: https://lore.kernel.org/lkml/20210525031636.GB7744@xsang-OptiPlex-9020/ [1]
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Feng Tang <feng.tang@intel.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bug: 161946584
(cherry picked from commit 2e3025434a)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9142789c5d57d167e5bb1f450d914bf2111894a2
As restricted hooks have been introduced, regular vendor hooks are no
longer necessary.
Bug: 187917024
Change-Id: Ia70e9dd1bd7373e19bdc82e90a2384201076bc0b
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
Enable CONFIG_BLK_CGROUP_IOCOST to help control IO resources.
Bug: 188749221
Change-Id: I611b3ff5929d0a998fa6241967887803636b7588
Signed-off-by: Yang Yang <yang.yang@vivo.com>
Add ANDROID_OEM_DATA for implement of oem gki
Bug: 188749221
Change-Id: I1feba2334aa34e3bc46eb9d0217118485405beb4
Signed-off-by: Yang Yang <yang.yang@vivo.com>
Add ANDROID_OEM_DATA for implement of oem gki
Bug: 188749221
Change-Id: Ide8378a898de01a34d8ca3c34472844cd4ffa71c
Signed-off-by: Yang Yang <yang.yang@vivo.com>
Add ANDROID_OEM_DATA for implement of oem gki
Bug: 188749221
Change-Id: I96b1c690fda172d0c490e944557a674a37620742
Signed-off-by: Yang Yang <yang.yang@vivo.com>
Need symbols for newly added CAN drivers
Bug: 190375772
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Ibaa1c0963e2e5efb0cf77e6661a683cb00f095d9
We can make use of this commit, to elaborate some more of the host
control mode logic, explaining what role play each and every variable.
While at it, allow those parameters to be configurable.
Bug: 183467926
Bug: 170940265
Bug: 183454255
Link: https://lore.kernel.org/lkml/20210607061401.58884-13-avri.altman@wdc.com/
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Change-Id: Ib05c6643c69504b8d9442b0024cfe1b0b687a4ce
in host control mode the host is the originator of map requests. To not
flood the device with map requests, use a simple throttling mechanism
that limits the number of inflight map requests.
Bug: 183467926
Bug: 170940265
Bug: 183454255
Link: https://lore.kernel.org/lkml/20210607061401.58884-10-avri.altman@wdc.com/
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Change-Id: I75a5ced3be60569adcd75befa17d8a6340c147fd
In order not to hang on to “cold” regions, we shall inactivate a
region that has no READ access for a predefined amount of time -
READ_TO_MS. For that purpose we shall monitor the active regions list,
polling it on every POLLING_INTERVAL_MS. On timeout expiry we shall add
the region to the "to-be-inactivated" list, unless it is clean and did
not exhaust its READ_TO_EXPIRIES - another parameter.
All this does not apply to pinned regions.
Bug: 183467926
Bug: 170940265
Bug: 183454255
Link: https://lore.kernel.org/lkml/20210607061401.58884-9-avri.altman@wdc.com/
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Change-Id: I2d2efbbc612ccec6ef7036cc1e1d31bd8bfd4174