Commit Graph

1055118 Commits

Author SHA1 Message Date
Steve Muckle
23ef56f65c Revert "ANDROID: Make file-backed vma teardown synchronous"
This reverts commit fe25fc5375.

Reason for revert: test regressions
Bug: 232427425
Bug: 232421416
Change-Id: If7006fe6c3f1a55361099ef24927d4bc7c821b9c
Signed-off-by: Steve Muckle <smuckle@google.com>
2022-05-13 15:42:24 +00:00
Wei-Chung Hsu
d1d3f4a801 ANDROID: GCE: To build kernel image for gce cloud android.
command: BUILD_CONFIG=common/build.config.gce.x86_64 build/build.sh -j32

Bug: 195791462
Test: presubmit
Change-Id: I59560d9c32d1d08d9e03e7275b4f49df8486710b
Signed-off-by: Wei-Chung Hsu <weihsu@google.com>
2022-05-13 15:02:53 +00:00
Visweswara Tanuku
0c427d1154 FROMLIST: serial: qcom_geni_serial: Disable MMIO tracing for geni serial
Disable MMIO tracing for geni serial driver to prevent excessive
logging. Any access over serial console would involve a lot of
TX and RX register accesses (and few others), so these MMIO
read/write trace events in these drivers cause a lot of unwanted
noise because of the high frequency of such operations and it is
not very useful tracing these events for such drivers.
Given we want to enable these trace events on development devices
(maybe not production devices) where performance also really matters
so that we don't regress other components by wasting CPU cycles and
memory collecting these traces, it makes more sense to disable these
traces from such drivers.

Also another reason to disable these traces would be to prevent
recursive tracing when we display the trace buffer containing
these MMIO trace events since writing onto serial console would
further record MMIO traces.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>

Bug: 229834709
Link: https://lore.kernel.org/lkml/282f2d8fb795e8b1961693ed4184b8136c3520db.1651663123.git.quic_saipraka@quicinc.com/
Change-Id: Ifac104dceae688b83b15e6a6fd0a0c55eb7b43e5
Signed-off-by: Visweswara Tanuku <quic_vtanuku@quicinc.com>
2022-05-13 15:01:13 +00:00
chunhui.li
a04009eea6 ANDROID: kernel: fix debug_kinfo set twice crash issue
If write string to /sys/module/debug_kinfo/parameters/build_info
twice, kernel will crash. fix by removing vunmap in build_info_set.

Bug: 213120696
Signed-off-by: Chunhui Li <chunhui.li@mediatek.com>
Change-Id: I683859067a31068de0006be8490efa4b0107044f
(cherry picked from commit bdc772adbd)
2022-05-13 16:57:46 +08:00
Dillon Min
12a5d3ae52 UPSTREAM: media: v4l2-ctrls: Add RGB color effects control
Add V4L2_COLORFX_SET_RGB color effects control, V4L2_CID_COLORFX_RGB
for RGB color setting.

with two mirror changes:
- change 0xFFFFFF to 0xffffff
- fix comments 2^24 to 2^24 - 1

[hverkuil: dropped spaces around + with V4L2_CID_BASE for consistency]

Bug: 232332132
(cherry picked from commit ef9f18a9e3)
Signed-off-by: Dillon Min <dillon.minfei@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Change-Id: I68151757540cff896ff5a727412e1ed9aa95d9da
2022-05-12 15:34:49 +00:00
Rahul Sharma
53cb94b104 ANDROID: abi_gki_aarch64_qcom: Update qcom abi symbol list
Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

3 Added functions:

  [A] 'function drm_bridge* devm_drm_panel_bridge_add(device*, drm_panel*)'
  [A] 'function bool drm_edid_is_valid(edid*)'
  [A] 'function s32 i2c_smbus_read_i2c_block_data(const i2c_client*, u8, u8, u8*)'

Bug: 231996603
Change-Id: Ic41befec6dfc2460ea1ba13bfef7c394c86b09c1
Signed-off-by: Rahul Sharma <quic_rahsha@quicinc.com>
Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>
2022-05-12 15:15:23 +00:00
fengmingli
5f20a6414e ANDROID: usb: export tracepoint for dwc3_complete_trb
Export dwc3_complete_trb tracepoint so that
vendor modules can use it.

Bug: 189130101

Change-Id: I1efeaf2a29267ee647fda83d5f18b7a5fae16b96
Signed-off-by: fengmingli <mingli.feng@vivo.com>
(cherry picked from commit e3e4ee0e9f)
2022-05-12 06:21:31 +00:00
Shaleen Agrawal
aec40de3d7 ANDROID: cputime: seprate irq entry and exit tracehooks
Currently the code has single hook for tracking irqs. However
modules need to deduce start and end of the irq.

Create separate hooks for irq start and end since the
cputime has already figured it out.

Bug: 231341763
Change-Id: Ie0dd503b283d83f69d01171ebd1cd6127c3bafd0
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
Signed-off-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
2022-05-12 10:02:42 +05:30
Will McVicker
3eebd9f7e4 ANDROID: ABI: Update pixel symbol list and ABI xml
Leaf changes summary: 9 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 7 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 2 Added variables

7 Added functions:

  [A] 'function void __drm_printfn_debug(drm_printer*, va_format*)'
  [A] 'function unsigned int __kfifo_out_peek(__kfifo*, void*, unsigned int)'
  [A] 'function int __traceiter_android_vh_sysrq_crash(void*, void*)'
  [A] 'function void ktime_get_snapshot(system_time_snapshot*)'
  [A] 'function void pps_event(pps_device*, pps_event_time*, int, void*)'
  [A] 'function pps_device* pps_register_source(pps_source_info*, int)'
  [A] 'function void pps_unregister_source(pps_device*)'

2 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_sysrq_crash'
  [A] 'int console_set_on_cmdline'

Bug: 226206537
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: I6468e76f0d287416bab5ad7958a952f97b1a56df
2022-05-11 21:36:36 +00:00
Mayank Rana
614e8febec ANDROID: abi_gki_aarch64_qcom: Update symbol list
CONFIG_USB_EHSET_TEST_FIXTURE enables ehset misc class driver
which is needed for running USB IF electrical compliance. Below
is seen compilation error when enabling this config to compile
as module:

MODPOST modules-only.symvers
ERROR: modpost: "usb_control_msg_recv" [drivers/usb/misc/ehset.ko] undefined!
ERROR: modpost: "usb_control_msg_send" [drivers/usb/misc/ehset.ko] undefined

Fix above compilation with add required symbols.
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 int usb_control_msg_recv(usb_device*, __u8, __u8,
__u8, __u16, __u16, void*, __u16, int, gfp_t)'
[A] 'function int usb_control_msg_send(usb_device*, __u8, __u8,
__u8, __u16, __u16, void*, __u16, int, gfp_t)'

Bug: 232128297
Change-Id: If15df15fc3f315447b53fe04b56f70267afd14c0
Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
2022-05-11 21:34:56 +00:00
Suren Baghdasaryan
fe25fc5375 ANDROID: Make file-backed vma teardown synchronous
When a file-backed vma is being released, the userspace can have an
expectation that the vma and the file it's pinning will be released
synchronously. This does not happen when SPF is enabled because vma
and associated file are released asynchronously after RCU grace
period. This is done to prevent pagefault handler from stepping on
a deleted object. Fix this issue by synchronously waiting for RCU
grace period during file-backed vma tear-down.

Fixes: 48e35d053f "FROMLIST: mm: rcu safe vma->vm_file freeing"
Bug: 231394031
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I9f672d5bd947763c7d180a8c1b1f964600d407f3
2022-05-11 17:08:16 +00:00
Vivek Aknurwar
cc81da9a8e ANDROID: abi_gki_aarch64_qcom: Add icc_sync_state
icc_sync_state symbol is required for interconnect providers so they can
make use of framework icc_sync_state. Add it to the symbol list.

Bug: 231996551
Change-Id: I5b79601f8d8b7993efe9741e2a7be54fd33883ec
Signed-off-by: Vivek Aknurwar <quic_viveka@quicinc.com>
Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-05-11 16:09:15 +00:00
Jian Gong
f7684ebb37 ANDROID: ABI: Update symbols to unisoc whitelist for the 6th
Update whitelist for the symbols used by the unisoc device and
update the ABI representation accordingly.

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 int __traceiter_android_vh_psci_cpu_suspend(void*, u32, bool*)'
  [A] 'function int __traceiter_android_vh_psci_tos_resident_on(void*, int, bool*)'

Bug: 2321959946
Change-Id: Icd7d5336516a9678c438699f869d6c060534445d
Signed-off-by: Jian Gong <Jian.Gong@unisoc.com>
2022-05-11 15:39:08 +00:00
Chun-Hung Wu
2c13c0def9 ANDROID: Update symbol list for mtk
Leaf changes summary: 12 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 11 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

11 Added functions:

  [A] 'function int __traceiter_xhci_urb_giveback(void*, urb*)'
  [A] 'function int _raw_spin_trylock_bh(raw_spinlock_t*)'
  [A] 'function void clk_unregister_gate(clk*)'
  [A] 'function void clkdev_add(clk_lookup*)'
  [A] 'function void clkdev_drop(clk_lookup*)'
  [A] 'function void frame_vector_to_pfns(frame_vector*)'
  [A] 'function void* gen_pool_dma_zalloc(gen_pool*, size_t, dma_addr_t*)'
  [A] 'function void gen_pool_for_each_chunk(gen_pool*, void (gen_pool*, gen_pool_chunk*, void*)*, void*)'
  [A] 'function int snd_soc_add_component(snd_soc_component*, snd_soc_dai_driver*, int)'
  [A] 'function int snd_soc_component_initialize(snd_soc_component*, const snd_soc_component_driver*, device*)'
  [A] 'function regmap* syscon_regmap_lookup_by_phandle_optional(device_node*, const char*)'

1 Added variable:

  [A] 'tracepoint __tracepoint_xhci_urb_giveback'

Bug: 228415386
Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
Change-Id: I1917e8f4048c53cd80fed3b1588165766bbf0ad4
2022-05-11 15:37:47 +00:00
Elliot Berman
1e927b098a ANDROID: abi_gki_aarch64_qcom: Update symbol list.
Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function unsigned int cfg80211_vendor_cmd_get_sender(wiphy*)'

Bug: 211744078
Change-Id: Iae1315253a7f72c6c7977e47fe14e6cf311d7734
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-11 15:34:55 +00:00
Petr Mladek
a327e05923 UPSTREAM: printk: ringbuffer: Improve prb_next_seq() performance
prb_next_seq() always iterates from the first known sequence number.
In the worst case, it might loop 8k times for 256kB buffer,
15k times for 512kB buffer, and 64k times for 2MB buffer.

It was reported that polling and reading using syslog interface
might occupy 50% of CPU.

Speedup the search by storing @id of the last finalized descriptor.

The loop is still needed because the @id is stored and read in the best
effort way. An atomic variable is used to keep the @id consistent.
But the stores and reads are not serialized against each other.
The descriptor could get reused in the meantime. The related sequence
number will be used only when it is still valid.

An invalid value should be read _only_ when there is a flood of messages
and the ringbuffer is rapidly reused. The performance is the least
problem in this case.

Bug: 216238044
(cherry picked from commit ef244b4dc53e520d4570b2610436aba0593ce6f55)
Reported-by: Chunlei Wang <chunlei.wang@mediatek.com>
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/1642770388-17327-1-git-send-email-quic_mojha@quicinc.com
Link: https://lore.kernel.org/lkml/YXlddJxLh77DKfIO@alley/T/#m43062e8b2a17f8dbc8c6ccdb8851fb0dbaabbb14
Signed-off-by: Prasad Sodagudi <quic_psodagud@quicinc.com>

Change-Id: Ie6b1276eca791a891e42d5635ca1f116ae7cadef
Signed-off-by: Prasad Sodagudi <quic_psodagud@quicinc.com>
2022-05-10 23:41:39 +00:00
Prasad Sodagudi
d551647f3b ANDROID: firmware_loader: Add support for customer firmware paths
Currently firmware_class.patch commandline can take a single path for
loading firmwares on custom paths. SoC vendors and oems can have
firmwares in multiple file system paths. So add support for paassing
multiple paths through command line for firmware loader.

For example - firmware_class.path="/vendor,/vendor/firmware_mnt,
/oem/firmware". firmware_class.path can take upto 10 file system
paths with ',' separation.

Bug: 202192667
Change-Id: I31d1470d7dd0255c7aefd856f3c129bdb4b7f2e8
Signed-off-by: Prasad Sodagudi <quic_psodagud@quicinc.com>
2022-05-10 23:39:30 +00:00
Mukesh Ojha
d7024276b3 FROMLIST: remoteproc: Use unbounded workqueue for recovery work
There could be a scenario where there is too much load on a core
(n number of tasks which is affined) or in a case when multiple
rproc subsystem is going for a recovery and they queued recovery
work to one core so even though subsystem are independent there
recovery will be delayed if one of the subsystem recovery work
is taking more time in completing.

If we make this queue unbounded, the recovery work could be picked
on any cpu. This patch try to address this.

Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Bug: 228429683
Change-Id: If18b39db6c0861989a6a3b36d9efde5f488b9b73
Link: https://lore.kernel.org/lkml/1649313998-1086-1-git-send-email-quic_mojha@quicinc.com/
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
(cherry picked from commit 9608dc38a0)
2022-05-10 22:03:09 +00:00
Elliot Berman
f69ae9910d ANDROID: kbuild: mod: Move $(obj) prefix inside awk
When compiling modules with a large number of object files,

  echo $(addprefix $(obj)/, /* the member .o's of module */)

may result in an a command line which is too long. To help alleviate
this problem, echo the members intermediate objects and add $(obj)/
prefix within AWK itself.

An equivalent of this patch will land in this larger series refactoring
LTO: https://lore.kernel.org/linux-kbuild/20220424190811.1678416-1-masahiroy@kernel.org/

Bug: 175420575
Change-Id: I02f1ea49d1a8aa29b76c69cadcb5e84dd2ae4aa3
Link: https://lore.kernel.org/all/CAK7LNAStLCBCur3QnfMnBrOUkixYbJK+C6TZVKYcGX9R3M=ANQ@mail.gmail.com/
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:47:42 +00:00
Elliot Berman
b72ece4853 FROMGIT: kbuild: read *.mod to get objects passed to $(LD) or $(AR)
ld and ar support @file, which command-line options are read from.

Now that *.mod lists the member objects in the correct order, without
duplication, it is ready to be passed to ld and ar.

By using the @file syntax, people will not be worried about the pitfall
described in the NOTE.

Bug: 175420575
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
(cherry picked from commit 9170b27757d21460755254045bad4933cb631776
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
[eberman: Fix conflicts with commit 557054d]
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Change-Id: Id5bbd99ce940dc5eb40e2f9e75182a50a2eeff47
2022-05-10 21:47:36 +00:00
Masahiro Yamada
2c3a1d577c FROMGIT: kbuild: make *.mod not depend on *.o
The dependency

    $(obj)/%.mod: $(obj)/%$(mod-prelink-ext).o

... exists because *.mod files previously contained undefined symbols,
which are computed from *.o files when CONFIG_TRIM_UNUSED_KSYMS=y.

Now that the undefined symbols are put into separate *.usyms files,
there is no reason to make *.mod depend on *.o files.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Bug: 175420575
(cherry picked from commit 21b526ad634448369bbadc2f112ed2c716805e63
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
Change-Id: I7f0e7872ccb54467a33c951d0551fe49be9a36fd
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:47:28 +00:00
Masahiro Yamada
3fd0696927 FROMGIT: kbuild: get rid of duplication in *.mod files
It is allowed to add the same objects multiple times to obj-y / obj-m:

  obj-y += foo.o foo.o foo.o
  obj-m += bar.o bar.o bar.o

It is also allowed to add the same objects multiple times to a composite
module:

  obj-m += foo.o
  foo-y := foo1.o foo2.o foo2.o foo1.o

This flexibility is useful because the same object might be selected by
different CONFIG options, like this:

  obj-m               += foo.o
  foo-y               := foo1.o
  foo-$(CONFIG_FOO_X) += foo2.o
  foo-$(CONFIG_FOO_Y) += foo2.o

The duplicated objects are omitted at link time. It works naturally in
Makefiles because GNU Make removes duplication in $^ without changing
the order.

It is working well, almost...

A small flaw I notice is, *.mod contains duplication in such a case.

This is probably not a big deal. As far as I know, the only small
problem is scripts/mod/sumversion.c parses the same file multiple
times.

I am fixing this because I plan to reuse *.mod for other purposes,
where the duplication can be problematic.

The code change is quite simple. We already use awk to drop duplicated
lines in modules.order (see cmd_modules_order in the same file).
I copied the code, but changed RS to use spaces as record separators.

I also changed the file format to list one object per line.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Bug: 175420575
(cherry picked from commit 62d88fd6ef3e52c355ec82e1aef530e72cf690e5
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
Change-Id: Icd83764f7064c7abf4f8bcf9cf784c8c25c52192
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:47:22 +00:00
Masahiro Yamada
0e5851bf31 FROMGIT: kbuild: split the second line of *.mod into *.usyms
The *.mod files have two lines; the first line lists the member objects
of the module, and the second line, if CONFIG_TRIM_UNUSED_KSYMS=y, lists
the undefined symbols.

Currently, we generate *.mod after constructing composite modules,
otherwise, we cannot compute the second line. No prerequisite is
required to print the first line.

They are orthogonal. Splitting them into separate commands will ease
further cleanups.

This commit splits the list of undefined symbols out to *.usyms files.

Previously, the list of undefined symbols ended up with a very long
line, but now it has one symbol per line.

Use sed like we did before commit 7d32358be8 ("kbuild: avoid split
lines in .mod files").

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>

Bug: 175420575
(cherry picked from commit 2f6b64906adf99b4c5ea9356df793766d290cfb4
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
Change-Id: Ic801d2bf085aff6e50d15d196c43da4df3aa88c8
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:47:00 +00:00
Masahiro Yamada
fe25d38e6a FROMGIT: kbuild: reuse real-search to simplify cmd_mod
The first command in cmd_mod is similar to the real-search macro.
Reuse it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

Bug: 175420575
(cherry picked from commit e90ac718fd861b3329b7a981dca016871b283f01
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
Change-Id: Ibcc1a9e29f6c8a1be268f48da473f429e7590749
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:46:54 +00:00
Masahiro Yamada
64f77a8297 FROMGIT: kbuild: make multi_depend work with targets in subdirectory
Precisely speaking, when you get the stem of the path, you should use
$(patsubst $(obj)/%,%,...) instead of $(notdir ...).

I do not see this usecase, but if you create a composite object in a
subdirectory, the Makefile should look like this:

   obj-$(CONFIG_FOO) += dir/foo.o
   dir/foo-objs      := dir/foo1.o dir/foo2.o

The member objects should be assigned to dir/foo-objs instead of
foo-objs.

This syntax is more consistent with commit 54b8ae66ae ("kbuild:
change *FLAGS_<basetarget>.o to take the path relative to $(obj)").

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

Bug: 175420575
(cherry picked from commit 1fe9c5794b2b57b33c84ffaa0eb56254f310ed54
  https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)

Change-Id: I541fb600d05ae9be847718c869e0b95c0b540ff9
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:46:48 +00:00
Masahiro Yamada
12b13aeab2 FROMGIT: kbuild: reuse suffix-search to refactor multi_depend
The complicated part of multi_depend is the same as suffix-search.

Reuse it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

Bug: 175420575
(cherry picked from commit db6836b669fb7c4a214e967e3985db05d85f2a24
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
Change-Id: I7966897a0151a08d003f53d20adaf3fb40028442
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:46:40 +00:00
Prasad Sodagudi
ff8dd4797e ANDROID: abi_gki_aarch64_qcom: Update symbol list
Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

3 Added functions:

  [A] 'function void snd_timer_interrupt(snd_timer*, unsigned long int)'
  [A] 'function const char* v4l2_ctrl_get_name(u32)'
  [A] 'function int v4l2_s_ctrl(v4l2_fh*, v4l2_ctrl_handler*, v4l2_control*)'

Bug: 211744078
Change-Id: I569d0c369dfddf0bb92acfcb83587e537b7ab10e
Signed-off-by: Prasad Sodagudi <quic_psodagud@quicinc.com>
2022-05-10 17:36:11 +00:00
Jian Gong
0897375509 ANDROID: ABI: Update symbols to unisoc whitelist for the 5th
Update whitelist for the symbols used by the unisoc device and
update the ABI representation accordingly

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

5 Added functions:

  [A] 'function int __traceiter_android_vh_printk_caller(void*, char*, size_t, u32, int*)'
  [A] 'function int __traceiter_android_vh_printk_caller_id(void*, u32*)'
  [A] 'function int __traceiter_android_vh_printk_ext_header(void*, char*, size_t, u32, int*)'
  [A] 'function int send_sig_info(int, kernel_siginfo*, task_struct*)'
  [A] 'function unsigned int stack_trace_save_tsk(task_struct*, unsigned long int*, unsigned int, unsigned int)'

4 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_printk_caller'
  [A] 'tracepoint __tracepoint_android_vh_printk_caller_id'
  [A] 'tracepoint __tracepoint_android_vh_printk_ext_header'
  [A] 'nodemask_t node_states[6]'

Bug: 231911933
Change-Id: I12fbabceb411537fb2c4c223f015011bb44781e4
Signed-off-by: Jian Gong <Jian.Gong@unisoc.com>
2022-05-10 16:25:31 +00:00
Wenchao Chen
fe03278e3d ANDROID: ABI: Update symbols to unisoc whitelist for the 1st
Update whitelist for the symbols used by the unisoc device and
update the ABI representation accordingly

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

1 Added function:

  [A] 'function int __traceiter_android_vh_mmc_check_status(void*, const blk_mq_queue_data*, int*)'

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_mmc_check_status'

Bug: 232032448
Change-Id: Ib365b35bc308b6aad6066000018902a62b488934
Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
2022-05-10 16:24:14 +00:00
Paul Zhang
da01931c1c BACKPORT: FROMLIST: cfg80211: parse RNR IE about MLD params for MBSSID feature
In order to reconstruct frame for MBSSID feature, per the description of
the Reduced Neighbor Report(RNR) element about MLD parameters subfield in
section 9.4.2.170 of Draft P802.11be_D1.4, the RNR IE is modified:
1\ If the reported AP is affiliated with the same MLD of the reporting AP,
the TBTT information is skipped;
2\ If the reported AP is affiliated with the same MLD of the nontransmitted
BSSID, the TBTT information is copied and the MLD ID is changed to 0.

Signed-off-by: Paul Zhang <quic_paulz@quicinc.com>

Bug: 231937090
Link: https://lore.kernel.org/linux-wireless/1649335871-9173-1-git-send-email-quic_paulz@quicinc.com
Change-Id: I2bae85b813a2351a62d2788f0e76f13407d11645
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-05-10 15:27:08 +00:00
Rajkumar Subbiah
186398845e ANDROID: abi_gki_aarch64_qcom: Update qcom abi symbol list
Function changes summary: 0 Removed, 0 Changed, 1 Added function
Variable changes summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function void devm_extcon_dev_unregister(device*, extcon_dev*)'

Bug: 231322691
Change-Id: Icb2525ad690dfc391e5a36141375d298052dae8a
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-05-09 23:59:45 +00:00
Lina Wang
60453867b1 FROMGIT: net: fix wrong network header length
When clatd starts with ebpf offloaing, and NETIF_F_GRO_FRAGLIST is enable,
several skbs are gathered in skb_shinfo(skb)->frag_list. The first skb's
ipv6 header will be changed to ipv4 after bpf_skb_proto_6_to_4,
network_header\transport_header\mac_header have been updated as ipv4 acts,
but other skbs in frag_list didnot update anything, just ipv6 packets.

udp_queue_rcv_skb will call skb_segment_list to traverse other skbs in
frag_list and make sure right udp payload is delivered to user space.
Unfortunately, other skbs in frag_list who are still ipv6 packets are
updated like the first skb and will have wrong transport header length.

e.g.before bpf_skb_proto_6_to_4,the first skb and other skbs in frag_list
has the same network_header(24)& transport_header(64), after
bpf_skb_proto_6_to_4, ipv6 protocol has been changed to ipv4, the first
skb's network_header is 44,transport_header is 64, other skbs in frag_list
didnot change.After skb_segment_list, the other skbs in frag_list has
different network_header(24) and transport_header(44), so there will be 20
bytes different from original,that is difference between ipv6 header and
ipv4 header. Just change transport_header to be the same with original.

Actually, there are two solutions to fix it, one is traversing all skbs
and changing every skb header in bpf_skb_proto_6_to_4, the other is
modifying frag_list skb's header in skb_segment_list. Considering
efficiency, adopt the second one--- when the first skb and other skbs in
frag_list has different network_header length, restore them to make sure
right udp payload is delivered to user space.

Signed-off-by: Lina Wang <lina.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit cf3ab8d4a7 https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git master)
Bug: 218157620
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I36f2f329ec1a56bb0742141a7fa482cafa183ad3
2022-05-09 23:38:29 +00:00
Lecopzer Chen
00f91c320a ANDROID: Update mtktv symbol list 3rd
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 pid_t pid_vnr(pid*)'
  [A] 'function int tty_port_install(tty_port*, tty_driver*, tty_struct*)'

Bug: 231929175
Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Change-Id: I0a98aeb86a41edde8bcded4773cfdbe110a63d0b
2022-05-09 23:05:17 +00:00
Marc Zyngier
d5afdad236 ANDROID: arm: Mark the recheduling IPI as raw interrupt
Flag the rescheduling IPI as 'raw', making sure such interrupt
skips both tick management  and irqtime accounting.

Bug: 191808738
Link: https://lore.kernel.org/lkml/20201124141449.572446-5-maz@kernel.org/
Change-Id: Ia9c2b989621eef6f49a1c30a08302a448ae286e6
Signed-off-by: Marc Zyngier <maz@kernel.org>
[minor port to 5.10]
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
[use irq_set_status_flags instead of __irq_modify_status]
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2022-05-09 22:34:20 +00:00
Marc Zyngier
b1d7d73520 ANDROID: arm64: Mark the recheduling IPI as raw interrupt
Flag the rescheduling IPI as 'raw', making sure such interrupt
skips both tick management  and irqtime accounting.

Bug: 191808738
Link: https://lore.kernel.org/lkml/20201124141449.572446-4-maz@kernel.org/
Change-Id: Ibeda817de7618a98d457d09a6fa7e54f867b72f0
Signed-off-by: Marc Zyngier <maz@kernel.org>
[minor port to 5.10]
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
[use irq_set_status_flags instead of __irq_modify_status]
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2022-05-09 22:34:08 +00:00
Marc Zyngier
a879ad2ff0 ANDROID: genirq: Allow an interrupt to be marked as 'raw'
Some interrupts (such as the rescheduling IPI) rely upon not going through
the irq_enter()/irq_exit() calls. To distinguish such interrupts, add
a new IRQ flag that allows the low-level handling code to sidestep the
enter()/exit() calls.

Only the architecture code is expected to use this. It will do the wrong
thing on normal interrupts. Note that this is a band-aid until we can
move to some more correct infrastructure (such as kernel/entry/common.c).

Bug: 191808738
Link: https://lore.kernel.org/lkml/20201124141449.572446-3-maz@kernel.org/
Change-Id: I0609a8b689219ba9e769c8b9f7fcf1e77a0ff1ca
Signed-off-by: Marc Zyngier <maz@kernel.org>
[minor port to 5.10]
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
[minor port to 5.15]
Signed-off-by: Abhijeet Dharmapurikar <quic_adharmap@quicinc.com>
2022-05-09 22:34:00 +00:00
duwenchao
785d595536 ANDROID: vendor_hooks: Add hooks for ufs scheduler
Add hooks to support oem's ufs scheduler feature.

Bug: 183085044
Signed-off-by: duwenchao <duwenchao@xiaomi.com>
Change-Id: I09bf9cba33412c81e4da83292772c0e95cf32022
(cherry picked from commit 00185a421a)
2022-05-09 20:41:44 +00:00
Visweswara Tanuku
158f4939e2 FROMLIST: soc: qcom: geni: Disable MMIO tracing for GENI SE
Disable MMIO tracing for GENI SE driver to prevent excessive
logging. Any access over serial console would involve a lot of
TX and RX register accesses (and few others), so these MMIO
read/write trace events in these drivers cause a lot of unwanted
noise because of the high frequency of such operations and it is
not very useful tracing these events for such drivers.
Given we want to enable these trace events on development devices
(maybe not production devices) where performance also really
matters so that we don't regress other components by wasting CPU
cycles and memory collecting these traces, it makes more sense to
disable these  traces from such drivers.

Also another reason to disable these traces would be to prevent
recursive tracing when we display the trace buffer containing
these MMIO trace events since writing onto serial console would
further record MMIO traces.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>

Bug: 231908716
Link: https://lore.kernel.org/lkml/e4e2522c6626e8ecdd3a3ce6d0ac85aba41fae38.1651663123.git.quic_saipraka@quicinc.com/
Change-Id: I35e0fbdcaf63402ee9765b50396be79ee6bb5c6e
Signed-off-by: Visweswara Tanuku <quic_vtanuku@quicinc.com>
2022-05-09 20:39:53 +00:00
Xuewen Yan
b2249adf8f ANDROID: ABI: Update symbols to unisoc whitelist for the 4st
Update whitelist for the symbols used by the unisoc device and
update the ABI representation accordingly

Leaf changes summary: 36 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 27 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 9 Added variables

27 Added functions:

  [A] 'function int __traceiter_android_rvh_account_irq(void*, task_struct*, int, s64)'
  [A] 'function int __traceiter_android_rvh_after_dequeue_task(void*, rq*, task_struct*, int)'
  [A] 'function int __traceiter_android_rvh_build_perf_domains(void*, bool*)'
  [A] 'function int __traceiter_android_rvh_cpu_cgroup_attach(void*, cgroup_taskset*)'
  [A] 'function int __traceiter_android_rvh_effective_cpu_util(void*, int, unsigned long int, unsigned long int, int, task_struct*, unsigned long int*)'
  [A] 'function int __traceiter_android_rvh_find_busiest_queue(void*, int, sched_group*, cpumask*, rq**, int*)'
  [A] 'function int __traceiter_android_rvh_migrate_queued_task(void*, rq*, rq_flags*, task_struct*, int, int*)'
  [A] 'function int __traceiter_android_rvh_sched_cpu_dying(void*, int)'
  [A] 'function int __traceiter_android_rvh_sched_cpu_starting(void*, int)'
  [A] 'function int __traceiter_android_rvh_sched_exec(void*, bool*)'
  [A] 'function int __traceiter_android_rvh_select_task_rq_dl(void*, task_struct*, int, int, int, int*)'
  [A] 'function int __traceiter_android_rvh_try_to_wake_up(void*, task_struct*)'
  [A] 'function int __traceiter_android_rvh_try_to_wake_up_success(void*, task_struct*)'
  [A] 'function int __traceiter_android_rvh_update_misfit_status(void*, task_struct*, rq*, bool*)'
  [A] 'function int __traceiter_android_rvh_wake_up_new_task(void*, task_struct*)'
  [A] 'function int __traceiter_android_vh_cpufreq_fast_switch(void*, cpufreq_policy*, unsigned int*, unsigned int)'
  [A] 'function int __traceiter_android_vh_cpufreq_resolve_freq(void*, cpufreq_policy*, unsigned int*, unsigned int)'
  [A] 'function int __traceiter_android_vh_cpufreq_target(void*, cpufreq_policy*, unsigned int*, unsigned int)'
  [A] 'function int __traceiter_android_vh_dump_throttled_rt_tasks(void*, int, u64, ktime_t, u64, s64)'
  [A] 'function int __traceiter_android_vh_enable_thermal_power_throttle(void*, bool*, bool*)'
  [A] 'function int __traceiter_android_vh_get_thermal_zone_device(void*, thermal_zone_device*)'
  [A] 'function int __traceiter_android_vh_modify_thermal_request_freq(void*, cpufreq_policy*, unsigned long int*)'
  [A] 'function int __traceiter_android_vh_modify_thermal_target_freq(void*, cpufreq_policy*, unsigned int*)'
  [A] 'function int __traceiter_android_vh_thermal_power_cap(void*, u32*)'
  [A] 'function int __traceiter_android_vh_thermal_register(void*, cpufreq_policy*)'
  [A] 'function int __traceiter_android_vh_thermal_unregister(void*, cpufreq_policy*)'
  [A] 'function int __traceiter_android_vh_update_topology_flags_workfn(void*, void*)'

9 Added variables:

  [A] 'tracepoint __tracepoint_android_rvh_select_task_rq_dl'
  [A] 'tracepoint __tracepoint_android_vh_cpufreq_fast_switch'
  [A] 'tracepoint __tracepoint_android_vh_cpufreq_resolve_freq'
  [A] 'tracepoint __tracepoint_android_vh_cpufreq_target'
  [A] 'tracepoint __tracepoint_android_vh_dump_throttled_rt_tasks'
  [A] 'tracepoint __tracepoint_android_vh_enable_thermal_power_throttle'
  [A] 'tracepoint __tracepoint_android_vh_modify_thermal_request_freq'
  [A] 'tracepoint __tracepoint_android_vh_modify_thermal_target_freq'
  [A] 'tracepoint __tracepoint_android_vh_thermal_power_cap'

Bug: 231529176
Change-Id: I71c63723e7a6356e6ccfba567b970734796ac466
Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
2022-05-09 17:53:09 +00:00
Gokul krishna Krishnakumar
b7a5dd5623 ANDROID: abi_gki_aarch64_qcom: Update qcom abi symbol list
Functions changes summary: 0 Removed, 0 Changed, 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

Bug: 211744078
Change-Id: I0d698dccb934839404f2fa711ef36800ae96cfc1
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2022-05-06 16:55:46 +00:00
Elliot Berman
e105a6752d ANDROID: abi_gki_aarch64_qcom: Update symbol list
Leaf changes summary: 78 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 77 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

77 Added functions:

  [A] 'function void __drm_atomic_helper_connector_reset(drm_connector*, drm_connector_state*)'
  [A] 'function void __skb_get_hash(sk_buff*)'
  [A] 'function sk_buff* __skb_gso_segment(sk_buff*, netdev_features_t, bool)'
  [A] 'function int _raw_spin_trylock_bh(raw_spinlock_t*)'
  [A] 'function backlight_device* backlight_device_get_by_type(backlight_type)'
  [A] 'function int backlight_device_set_brightness(backlight_device*, unsigned long int)'
  [A] 'function void cfg80211_gtk_rekey_notify(net_device*, const u8*, const u8*, gfp_t)'
  [A] 'function void cfg80211_stop_iface(wiphy*, wireless_dev*, gfp_t)'
  [A] 'function void cfg80211_update_owe_info_event(net_device*, cfg80211_update_owe_info*, gfp_t)'
  [A] 'function int close_fd(unsigned int)'
  [A] 'function crypto_async_request* crypto_dequeue_request(crypto_queue*)'
  [A] 'function int crypto_enqueue_request(crypto_queue*, crypto_async_request*)'
  [A] 'function void crypto_init_queue(crypto_queue*, unsigned int)'
  [A] 'function void crypto_unregister_ahash(ahash_alg*)'
  [A] 'function void debugfs_create_x64(const char*, umode_t, dentry*, u64*)'
  [A] 'function void devm_device_remove_group(device*, const attribute_group*)'
  [A] 'function void devm_regmap_del_irq_chip(device*, int, regmap_irq_chip_data*)'
  [A] 'function void dma_resv_fini(dma_resv*)'
  [A] 'function void dma_resv_init(dma_resv*)'
  [A] 'function void drm_bridge_chain_disable(drm_bridge*)'
  [A] 'function void drm_bridge_chain_post_disable(drm_bridge*)'
  [A] 'function void drm_bridge_chain_pre_enable(drm_bridge*)'
  [A] 'function int drm_client_init(drm_device*, drm_client_dev*, const char*, const drm_client_funcs*)'
  [A] 'function int drm_client_modeset_commit_locked(drm_client_dev*)'
  [A] 'function void drm_client_register(drm_client_dev*)'
  [A] 'function void drm_crtc_vblank_reset(drm_crtc*)'
  [A] 'function int drm_dp_atomic_find_vcpi_slots(drm_atomic_state*, drm_dp_mst_topology_mgr*, drm_dp_mst_port*, int, int)'
  [A] 'function int drm_dp_atomic_release_vcpi_slots(drm_atomic_state*, drm_dp_mst_topology_mgr*, drm_dp_mst_port*)'
  [A] 'function edid* drm_dp_mst_get_edid(drm_connector*, drm_dp_mst_topology_mgr*, drm_dp_mst_port*)'
  [A] 'function void drm_dp_mst_get_port_malloc(drm_dp_mst_port*)'
  [A] 'function void drm_dp_mst_put_port_malloc(drm_dp_mst_port*)'
  [A] 'function void drm_dp_mst_topology_mgr_destroy(drm_dp_mst_topology_mgr*)'
  [A] 'function int drm_dp_send_power_updown_phy(drm_dp_mst_topology_mgr*, drm_dp_mst_port*, bool)'
  [A] 'function int drm_event_reserve_init_locked(drm_device*, drm_file*, drm_pending_event*, drm_event*)'
  [A] 'function int drm_mode_convert_umode(drm_device*, drm_display_mode*, const drm_mode_modeinfo*)'
  [A] 'function int drm_mode_create_dp_colorspace_property(drm_connector*)'
  [A] 'function int drm_object_property_set_value(drm_mode_object*, drm_property*, uint64_t)'
  [A] 'function unsigned long int get_unmapped_area(file*, unsigned long int, unsigned long int, unsigned long int, unsigned long int)'
  [A] 'function void getboottime64(timespec64*)'
  [A] 'function void gpio_free_array(const gpio*, size_t)'
  [A] 'function void gro_cells_destroy(gro_cells*)'
  [A] 'function int gro_cells_init(gro_cells*, net_device*)'
  [A] 'function int gro_cells_receive(gro_cells*, sk_buff*)'
  [A] 'function void interval_tree_insert(interval_tree_node*, rb_root_cached*)'
  [A] 'function interval_tree_node* interval_tree_iter_first(rb_root_cached*, unsigned long int, unsigned long int)'
  [A] 'function interval_tree_node* interval_tree_iter_next(interval_tree_node*, unsigned long int, unsigned long int)'
  [A] 'function void interval_tree_remove(interval_tree_node*, rb_root_cached*)'
  [A] 'function __sum16 ip_compute_csum(void*, int)'
  [A] 'function int kstrtos8_from_user(const char*, size_t, unsigned int, s8*)'
  [A] 'function void led_trigger_event(led_trigger*, led_brightness)'
  [A] 'function bool llist_add_batch(llist_node*, llist_node*, llist_head*)'
  [A] 'function llist_node* llist_reverse_order(llist_node*)'
  [A] 'function int memblock_free(phys_addr_t, phys_addr_t)'
  [A] 'function int mipi_dsi_dcs_set_tear_off(mipi_dsi_device*)'
  [A] 'function int neigh_resolve_output(neighbour*, sk_buff*)'
  [A] 'function int param_get_ullong(char*, const kernel_param*)'
  [A] 'function int pci_dev_present(const pci_device_id*)'
  [A] 'function int platform_msi_domain_alloc_irqs(device*, unsigned int, irq_write_msi_msg_t)'
  [A] 'function void platform_msi_domain_free_irqs(device*)'
  [A] 'function int pm_generic_resume(device*)'
  [A] 'function int pm_generic_suspend(device*)'
  [A] 'function u64 pm_runtime_autosuspend_expiration(device*)'
  [A] 'function rb_node* rb_last(const rb_root*)'
  [A] 'function int register_netevent_notifier(notifier_block*)'
  [A] 'function int register_qdisc(Qdisc_ops*)'
  [A] 'function int regulatory_set_wiphy_regd(wiphy*, ieee80211_regdomain*)'
  [A] 'function int request_any_context_irq(unsigned int, irq_handler_t, unsigned long int, const char*, void*)'
  [A] 'function int rtnl_trylock()'
  [A] 'function int rtnl_unicast(sk_buff*, net*, u32)'
  [A] 'function int skb_append_pagefrags(sk_buff*, page*, int, size_t)'
  [A] 'function snd_info_entry* snd_info_create_module_entry(module*, const char*, snd_info_entry*)'
  [A] 'function int snd_soc_info_multi_ext(snd_kcontrol*, snd_ctl_elem_info*)'
  [A] 'function char* strchrnul(const char*, int)'
  [A] 'function void trace_array_put(trace_array*)'
  [A] 'function int unregister_netevent_notifier(notifier_block*)'
  [A] 'function int unregister_qdisc(Qdisc_ops*)'
  [A] 'function int v4l2_fh_release(file*)'

1 Added variable:

  [A] 'const ipv6_stub* ipv6_stub'

Bug: 227656251
Bug: 211744078
Change-Id: I19faa5cc025fdd9fdcb5e898ec718c28eb461062
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-06 16:55:37 +00:00
Elliot Berman
951ac571e4 ANDROID: abi_gki_aarch64_qcom: Sort symbol list
Sort symbol list according to:

  LC_LANG=c sort android/abi_gki_aarch64_qcom

Bug: 211744078
Change-Id: Ia87594f6f1fa9cee975c044c5bf65a40f271b9cf
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-06 16:55:30 +00:00
surong.pang
f37c75cc46 ANDROID: ABI: Update symbols to unisoc whitelist for the 28st
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 tty_driver_kref_put(tty_driver*)'
  [A] 'function void tty_wakeup(tty_struct*)'

Bug: 230697196
Change-Id: I1ed79ac7dd302383b3e894edc214c7873a5ab59b
Signed-off-by: Surong Pang <surong.pang@unisoc.com>
2022-05-06 16:53:08 +00:00
Fuad Tabba
e2e042c0c4 ANDROID: KVM: arm64: Fix for do not allow memslot changes after first VM run under pKVM
Move the check for protected VMs up to ensure that we don't miss
a KVM_MR_DELETE.

Bug: 231684412
Change-Id: Ia5cecc13232e8c430f2a1747a3cebd7e7bd5e348
Signed-off-by: Fuad Tabba <tabba@google.com>
2022-05-06 11:53:08 +00:00
Fuad Tabba
92a6dd3865 ANDROID: KVM: arm64: pkvm: Ensure that TLBs and I-cache are private to each vcpu
If a different vcpu from the same vm is loaded on the same
physical CPU, we must flush the CPU context.

This patch ensures that by tracking the vcpu that was last loaded
on this CPU, and flushes if that changes. This could lead to
over-invalidation, which could affect performance but not
correctness.

Bug: 228810735
Signed-off-by: Fuad Tabba <tabba@google.com>
Change-Id: Ic623d98bfe3156591640f6b7908fb836456c2bd0
2022-05-05 10:51:13 +00:00
Todd Kjos
5de988a7af ANDROID: GKI: 5/4/2022 KMI update
Set KMI_GENERATION=5 for 5/4 KMI update
Leaf changes summary: 4717 artifacts changed (1 filtered out)
Changed leaf types summary: 377 (1 filtered out) leaf types changed
Removed/Changed/Added functions summary: 1 Removed, 4270 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 68 Changed, 1 Added variable

1 Removed function:

  [D] 'function int pfn_valid(unsigned long int)'

4270 functions with some sub-type change:

  [C] 'function int __traceiter_android_rvh_after_enqueue_task(void*, rq*, task_struct*)' at sched.h:321:1 has some sub-type changes:
    CRC (modversions) changed from 0xa43e5e73 to 0x39adf44b
    parameter 4 of type 'int' was added

  [C] 'function block_device* I_BDEV(inode*)' at bdev.c:42:1 has some sub-type changes:
    CRC (modversions) changed from 0xc064ebfb to 0x9d45579c

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

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

  ... 4266 omitted; 4269 symbols have only CRC changes

1 Added variable:

  [A] 'mem_section** mem_section'

68 Changed variables:

  [C] 'bus_type amba_bustype' was changed at bus.c:313:1:
    size of symbol changed from 176 to 208
    CRC (modversions) changed from 0x1059aefa to 0x8ecdac8f
    type of variable changed:
      type size changed from 1408 to 1664 (in bits)
      4 data member insertions:
        'u64 android_kabi_reserved1', at offset 1408 (in bits) at bus.h:116:1
        'u64 android_kabi_reserved2', at offset 1472 (in bits) at bus.h:117:1
        'u64 android_kabi_reserved3', at offset 1536 (in bits) at bus.h:118:1
        'u64 android_kabi_reserved4', at offset 1600 (in bits) at bus.h:119:1
      4649 impacted interfaces

  [C] 'neigh_table arp_tbl' was changed at arp.c:152:1:
    size of symbol changed from 488 to 536
    CRC (modversions) changed from 0x321ac83d to 0x8cf461b2
    type of variable changed:
      type size changed from 3904 to 4288 (in bits)
      1 data member insertion:
        'u64 android_kabi_reserved1', at offset 4224 (in bits) at neighbour.h:236:1
      there are data member changes:
        type 'struct neigh_parms' of 'neigh_table::parms' changed:
          type size changed from 1152 to 1216 (in bits)
          1 data member insertion:
            'u64 android_kabi_reserved1', at offset 1152 (in bits) at neighbour.h:88:1
          4649 impacted interfaces
        6 ('list_head parms_list' .. 'unsigned long int last_flush') offsets changed (by +64 bits)
        type 'struct delayed_work' of 'neigh_table::gc_work' changed:
          type size changed from 704 to 960 (in bits)
          2 data member insertions:
            'u64 android_kabi_reserved1', at offset 832 (in bits) at workqueue.h:121:1
            'u64 android_kabi_reserved2', at offset 896 (in bits) at workqueue.h:122:1
          there are data member changes:
            type 'struct work_struct' of 'delayed_work::work' changed:
              type size changed from 256 to 384 (in bits)
              2 data member insertions:
                'u64 android_kabi_reserved1', at offset 256 (in bits) at workqueue.h:105:1
                'u64 android_kabi_reserved2', at offset 320 (in bits) at workqueue.h:106:1
              4663 impacted interfaces
            3 ('timer_list timer' .. 'int cpu') offsets changed (by +128 bits)
          4649 impacted interfaces
        and offset changed from 2176 to 2240 (in bits) (by +64 bits)
        10 ('timer_list proxy_timer' .. 'pneigh_entry** phash_buckets') offsets changed (by +320 bits)
      4649 impacted interfaces

  [C] 'const address_space_operations balloon_aops' was changed at balloon_compaction.c:253:1:
    size of symbol changed from 176 to 208
    CRC (modversions) changed from 0xce92e8cd to 0x30f2c100
    type of variable changed:

  [C] 'bus_type cpu_subsys' was changed at cpu.c:128:1:
    size of symbol changed from 176 to 208
    CRC (modversions) changed from 0x6dc9dbb0 to 0x1a7625e3
    type 'struct bus_type' changed at bus.h:82:1, as reported earlier

  [C] 'bio_set fs_bio_set' was changed at bio.c:66:1:
    size of symbol changed from 248 to 296
    CRC (modversions) changed from 0xc115b177 to 0x8266552
    type of variable changed:
      type size changed from 1984 to 2368 (in bits)
      4 data member insertions:
        'u64 android_kabi_reserved1', at offset 2112 (in bits) at bio.h:695:1
        'u64 android_kabi_reserved2', at offset 2176 (in bits) at bio.h:696:1
        'u64 android_kabi_reserved3', at offset 2240 (in bits) at bio.h:697:1
        'u64 android_kabi_reserved4', at offset 2304 (in bits) at bio.h:698:1
      there are data member changes:
        type 'struct work_struct' of 'bio_set::rescue_work' changed, as reported earlier
        2 ('workqueue_struct* rescue_workqueue' .. 'hlist_node cpuhp_dead') offsets changed (by +128 bits)
      4649 impacted interfaces

  [C] 'const file_operations generic_ro_fops' was changed at read_write.c:28:1:
    size of symbol changed from 256 to 288
    CRC (modversions) changed from 0x5cdc8899 to 0xe677c726
    type of variable changed:

  [C] 'bus_type i2c_bus_type' was changed at i2c-core-base.c:675:1:
    size of symbol changed from 176 to 208
    CRC (modversions) changed from 0xc94b3acf to 0x867a7a98
    type 'struct bus_type' changed at bus.h:82:1, as reported earlier

  [C] 'net init_net' was changed at net_namespace.c:47:1:
    size of symbol changed from 3648 to 3712
    CRC (modversions) changed from 0x6844c3c8 to 0x2790bfc0
    type of variable changed:
      type size changed from 29184 to 29696 (in bits)
      there are data member changes:
        type 'struct netns_ipv4' of 'net::ipv4' changed:
          type size hasn't changed
          2 data member insertions:
            'unsigned long int* sysctl_local_unbindable_ports', at offset 4480 (in bits) at ipv4.h:202:1
            'u64 android_kabi_reserved1', at offset 4992 (in bits) at ipv4.h:229:1
          there are data member changes:
            7 ('int sysctl_ip_prot_sock' .. 'siphash_key_t ip_id_key') offsets changed (by +64 bits)
          4649 impacted interfaces
        type 'struct netns_ipv6' of 'net::ipv6' changed:
          type size hasn't changed
          1 data member insertion:
            'u64 android_kabi_reserved1', at offset 5440 (in bits) at ipv6.h:120:1
          there are data member changes:
            type 'struct netns_sysctl_ipv6' of 'netns_ipv6::sysctl' changed:
              type size changed from 1472 to 1536 (in bits)
              1 data member insertion:
                'u64 android_kabi_reserved1', at offset 1472 (in bits) at ipv6.h:59:1
              4649 impacted interfaces
            35 ('ipv6_devconf* devconf_all' .. 'ioam6_pernet_data* ioam6_data') offsets changed (by +64 bits)
          4649 impacted interfaces
        type 'struct netns_nf' of 'net::nf' changed:
          type size changed from 1856 to 1920 (in bits)
          1 data member insertion:
            'u64 android_kabi_reserved1', at offset 1856 (in bits) at netfilter.h:38:1
          4649 impacted interfaces
        4 ('netns_ct ct' .. 'netns_bpf bpf') offsets changed (by +64 bits)
        type 'struct netns_xfrm' of 'net::xfrm' changed:
          type size changed from 6656 to 7168 (in bits)
          1 data member insertion:
            'u64 android_kabi_reserved1', at offset 7040 (in bits) at xfrm.h:91:1
          there are data member changes:
            type 'struct work_struct' of 'netns_xfrm::state_hash_work' changed, as reported earlier
            6 ('list_head policy_all' .. 'unsigned int policy_count[6]') offsets changed (by +128 bits)
            type 'struct work_struct' of 'netns_xfrm::policy_hash_work' changed, as reported earlier
            and offset changed from 1728 to 1856 (in bits) (by +128 bits)
            type 'struct xfrm_policy_hthresh' of 'netns_xfrm::policy_hthresh' changed:
              type size changed from 384 to 512 (in bits)
              there are data member changes:
                type 'struct work_struct' of 'xfrm_policy_hthresh::work' changed, as reported earlier
                5 ('seqlock_t lock' .. 'u8 rbits6') offsets changed (by +128 bits)
              4649 impacted interfaces
            and offset changed from 1984 to 2240 (in bits) (by +256 bits)
            9 ('list_head inexact_bins' .. 'ctl_table_header* sysctl_hdr') offsets changed (by +384 bits)
            7 ('dst_ops xfrm4_dst_ops' .. 'mutex xfrm_cfg_mutex') offsets changed (by +512 bits)
          4649 impacted interfaces
        'u64 net_cookie' offset changed (by +512 bits)
        type 'struct netns_can' of 'net::can' changed:
          type size changed from 1280 to 1344 (in bits)
          1 data member insertion:
            'u64 android_kabi_reserved1', at offset 1280 (in bits) at can.h:40:1
          4649 impacted interfaces
        and offset changed from 27200 to 27712 (in bits) (by +512 bits)
        2 ('netns_xdp xdp' .. 'sock* diag_nlsk') offsets changed (by +576 bits)
      4649 impacted interfaces

  [C] 'user_namespace init_user_ns' was changed at user.c:27:1:
    size of symbol changed from 608 to 624
    CRC (modversions) changed from 0xf849d43d to 0x6ceacfc9
    type of variable changed:
      type size changed from 4864 to 4992 (in bits)
      there are data member changes:
        type 'struct work_struct' of 'user_namespace::work' changed, as reported earlier
        4 ('ctl_table_set set' .. 'long int ucount_max[14]') offsets changed (by +128 bits)
      4649 impacted interfaces

  [C] 'neigh_table nd_tbl' was changed at ndisc.c:109:1:
    size of symbol changed from 488 to 536
    CRC (modversions) changed from 0x713bbb22 to 0x86f4247c
    type 'struct neigh_table' changed at neighbour.h:194:1, as reported earlier

  [C] 'bus_type pci_bus_type' was changed at pci-driver.c:1613:1:
    size of symbol changed from 176 to 208
    CRC (modversions) changed from 0x6d6357a5 to 0x453f4cb9
    type 'struct bus_type' changed at bus.h:82:1, as reported earlier

  [C] 'device platform_bus' was changed at platform.c:40:1:
    size of symbol changed from 760 to 856
    CRC (modversions) changed from 0xf8dec0bf to 0x114ef4af
    type of variable changed:
      type size changed from 6080 to 6848 (in bits)
      8 data member insertions:
        'u64 android_kabi_reserved1', at offset 6336 (in bits) at device.h:579:1
        'u64 android_kabi_reserved2', at offset 6400 (in bits) at device.h:580:1
        'u64 android_kabi_reserved3', at offset 6464 (in bits) at device.h:581:1
        'u64 android_kabi_reserved4', at offset 6528 (in bits) at device.h:582:1
        'u64 android_kabi_reserved5', at offset 6592 (in bits) at device.h:583:1
        'u64 android_kabi_reserved6', at offset 6656 (in bits) at device.h:584:1
        'u64 android_kabi_reserved7', at offset 6720 (in bits) at device.h:585:1
        'u64 android_kabi_reserved8', at offset 6784 (in bits) at device.h:586:1
      there are data member changes:
        type 'struct dev_pm_info' of 'device::power' changed:
          type size changed from 2432 to 2688 (in bits)
          2 data member insertions:
            'u64 android_kabi_reserved1', at offset 2560 (in bits) at pm.h:629:1
            'u64 android_kabi_reserved2', at offset 2624 (in bits) at pm.h:630:1
          there are data member changes:
            type 'struct work_struct' of 'dev_pm_info::work' changed, as reported earlier
            28 ('wait_queue_head_t wait_queue' .. 'dev_pm_qos* qos') offsets changed (by +128 bits)
          4649 impacted interfaces
        35 ('dev_pm_domain* pm_domain' .. 'bool dma_coherent') offsets changed (by +256 bits)
      4649 impacted interfaces

  [C] 'bus_type platform_bus_type' was changed at platform.c:1474:1:
    size of symbol changed from 176 to 208
    CRC (modversions) changed from 0xed0b62e0 to 0x93b4b1a5
    type 'struct bus_type' changed at bus.h:82:1, as reported earlier

  [C] 'task_group root_task_group' was changed at core.c:9446:1:
    size of symbol changed from 448 to 512
    CRC (modversions) changed from 0xed7cd4c4 to 0x7f0f8ca8
    type of variable changed:
      type size changed from 3584 to 4096 (in bits)
      there are data member changes:
        type 'struct cgroup_subsys_state' of 'task_group::css' changed:
          type size changed from 1600 to 1856 (in bits)
          there are data member changes:
            type 'struct work_struct' of 'cgroup_subsys_state::destroy_work' changed, as reported earlier
            type 'struct rcu_work' of 'cgroup_subsys_state::destroy_rwork' changed:
              type size changed from 448 to 576 (in bits)
              there are data member changes:
                type 'struct work_struct' of 'rcu_work::work' changed, as reported earlier
                2 ('callback_head rcu' .. 'workqueue_struct* wq') offsets changed (by +128 bits)
              4649 impacted interfaces
            and offset changed from 1088 to 1216 (in bits) (by +128 bits)
            'cgroup_subsys_state* parent' offset changed (by +256 bits)
          4649 impacted interfaces
        4 ('sched_entity** se' .. 'int idle') offsets changed (by +256 bits)
        12 ('atomic_long_t load_avg' .. 'u64 android_vendor_data1[4]') offsets changed (by +512 bits)
      4649 impacted interfaces

  [C] 'const dev_pm_ops snd_soc_pm_ops' was changed at soc-core.c:2174:1:
    size of symbol changed from 184 to 192
    CRC (modversions) changed from 0x5a4f39d to 0x43cd1640
    type of variable changed:

  [C] 'bus_type spi_bus_type' was changed at spi.c:431:1:
    size of symbol changed from 176 to 208
    CRC (modversions) changed from 0x645042d to 0xb2a41981
    type 'struct bus_type' changed at bus.h:82:1, as reported earlier

  [C] 'const dev_pm_ops usb_hcd_pci_pm_ops' was changed at hcd-pci.c:614:1:
    size of symbol changed from 184 to 192
    CRC (modversions) changed from 0xf94724c3 to 0xe7e95580
    type of variable changed:

  [C] 'const clk_ops clk_divider_ops' was changed at clk-divider.c:522:1:
    CRC (modversions) changed from 0x6c2689a6 to 0x1def79e2

  [C] 'const clk_ops clk_fixed_factor_ops' was changed at clk-fixed-factor.c:60:1:
    CRC (modversions) changed from 0xd4657fe5 to 0xc28588c1

  [C] 'const clk_ops clk_fixed_rate_ops' was changed at clk-fixed-rate.c:46:1:
    CRC (modversions) changed from 0x380d4e92 to 0xb99af056

  ... 48 omitted; 51 symbols have only CRC changes

Bug: 231314356
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Ib6a63a0877688bfffdc84963d8178e9878347b64
2022-05-04 16:01:09 -07:00
Carlos Llamas
ab93eee303 ANDROID: GKI: add mem_section to pixel's symbol list
We switched to the generic version of pfn_valid() after backporting
upstream commit 3de360c3fd ("arm64/mm: drop HAVE_ARCH_PFN_VALID").
However, the generic version uses mem_section array which needs to be
added to the symbol list.

This fixes the following build error:
ERROR: modpost: "mem_section" [../gs/google-modules/soc-modules/drivers/iommu/samsung_iommu.ko] undefined!

Generated via:
$ KMI_SYMBOL_LIST_STRICT_MODE=0 TRIM_NONLISTED_KMI=0 ./build_slider.sh
$ build/abi/extract_symbols \
  --additions-only --skip-module-grouping --symbol-list \
  common/android/abi_gki_aarch64_pixel out/android13-5.15/dist

Bug: 231461582
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I49bf4211d3fd8b3c0de17ed6e194e5a8f63a27f5
2022-05-04 13:39:15 -07:00
Maciej Żenczykowski
23a0beaf3c ANDROID: net: introduce ip_local_unbindable_ports sysctl
and associated inet_is_local_unbindable_port() helper function:
use it to make explicitly binding to an unbindable port return
-EPERM 'Operation not permitted'.

Autobind doesn't honour this new sysctl since:
  (a) you can simply set both if that's the behaviour you desire
  (b) there could be a use for preventing explicit while allowing auto
  (c) it's faster in the relatively critical path of doing port selection
      during connect() to only check one bitmap instead of both

Various ports may have special use cases which are not suitable for
use by general userspace applications. Currently, ports specified in
ip_local_reserved_ports sysctl will not be returned only in case of
automatic port assignment, but nothing prevents you from explicitly
binding to them - even from an entirely unprivileged process.

In certain cases it is desirable to prevent the host from assigning the
ports even in case of explicit binds, even from superuser processes.

Example use cases might be:
 - a port being stolen by the nic for remote serial console, remote
   power management or some other sort of debugging functionality
   (crash collection, gdb, direct access to some other microcontroller
   on the nic or motherboard, remote management of the nic itself).
 - a transparent proxy where packets are being redirected: in case
   a socket matches this connection, packets from this application
   would be incorrectly sent to one of the endpoints.

Initially I wanted to solve this problem via the simple one line:

static inline bool inet_port_requires_bind_service(struct net *net, unsigned short port) {
-       return port < net->ipv4.sysctl_ip_prot_sock;
+       return port < net->ipv4.sysctl_ip_prot_sock || inet_is_local_reserved_port(net, port);
}

However, this doesn't work for two reasons:
  (a) it changes userspace visible behaviour of the existing local
      reserved ports sysctl, and there appears to be enough documentation
      on the internet talking about setting it to make this a bad idea
  (b) it doesn't prevent privileged apps from using these ports,
      CAP_BIND_SERVICE is relatively likely to be available to, for example,
      a recursive DNS server so it can listed on port 53, which also needs
      to do src port randomization for outgoing queries due to security
      reasons (and it thus does manual port binding).

If we *know* that certain ports are simply unusable, then it's better
nothing even gets the opportunity to try to use them.  This way we at
least get a quick failure, instead of some sort of timeout (or possibly
even corruption of the data stream of the non-kernel based use case).

Test:
  vm:~# cat /proc/sys/net/ipv4/ip_local_unbindable_ports

  vm:~# python -c 'import socket; s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM, 0); s.bind(("::", 3967))'
  vm:~# python -c 'import socket; s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM, 0); s.bind(("::", 3967))'
  vm:~# echo 3967 > /proc/sys/net/ipv4/ip_local_unbindable_ports
  vm:~# cat /proc/sys/net/ipv4/ip_local_unbindable_ports
  3967
  vm:~# python -c 'import socket; s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM, 0); s.bind(("::", 3967))'
  socket.error: (1, 'Operation not permitted')
  vm:~# python -c 'import socket; s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM, 0); s.bind(("::", 3967))'
  socket.error: (1, 'Operation not permitted')

Cc: Sean Tranchetti <stranche@codeaurora.org>
Cc: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Linux SCTP <linux-sctp@vger.kernel.org>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Bug: 140404597
Change-Id: Ie96207bea90ae1345adf7b45724d0caf4d6e52c2
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
(cherry picked from commit 8a4b8ea595)
2022-05-04 13:39:15 -07:00
Shaleen Agrawal
7045a3408d ANDROID: sched: Add flags parameter to enq/deq after tracehooks
Currently, the enqueue and dequeue tracehooks pass in the flags
parameter, however, the after tracehooks that follow do not.

Bug: 226570047
Change-Id: I51cb50054562893271e5d3efd7c6bd028977622d
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
2022-05-04 13:39:14 -07:00
Georgi Djakov
99ee6f76f4 ANDROID: GKI: Remove pfn_valid symbol
We are switching to the generic pfn_valid function and the
arm64-specific one is being removed.

ERROR: Differences between ksymtab and symbol list detected!
Symbols missing from ksymtab:
 - pfn_valid

Bug: 228454859
Change-Id: I8cc2d19aa2cb6e7639b2d1b08d0c67fc9c7c948e
Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
2022-05-04 13:39:14 -07:00