Commit graph

1159626 commits

Author SHA1 Message Date
Giuliano Procida
ec795e4eaa ANDROID: arm64: vdso32: support user-supplied flags
This introduces a new environment variable, KCPPFLAGS_COMPAT.

One use-case is to ensure -ffile-prefix-map is passed to the arm32
compiler to normalise compilation directory and make the ELF build ID
reproducible.

Bug: 345452375
Change-Id: I6ae1df58172f4dadeac1dbbee2e3241b704a9256
Signed-off-by: Giuliano Procida <gprocida@google.com>
2024-06-10 16:22:50 +00:00
Pierre Couillaud
ac9706483e ANDROID: GKI: Add initial symbol list for bcmstb
Add initial symbol list for the bcmstb target that represents
the Broadcom Set Top Box SoCs.

INFO: 32 function symbol(s) added
  'u32 brcmstb_get_family_id()'
  'u32 brcmstb_get_product_id()'
  'int clk_hw_register_clkdev(struct clk_hw*, const char*, const char*)'
  'int device_get_ethdev_address(struct device*, struct net_device*)'
  'int ehci_resume(struct usb_hcd*, bool)'
  'int ehci_suspend(struct usb_hcd*, bool)'
  'int fixed_phy_set_link_update(struct phy_device*, int(*)(struct net_device*, struct fixed_phy_status*))'
  'int generic_access_phys(struct vm_area_struct*, unsigned long, void*, int, int)'
  'struct gpio_desc* gpiochip_request_own_desc(struct gpio_chip*, unsigned int, const char*, enum gpio_lookup_flags, enum gpiod_flags)'
  'void irq_gc_mask_disable_reg(struct irq_data*)'
  'void irq_gc_noop(struct irq_data*)'
  'void irq_gc_unmask_enable_reg(struct irq_data*)'
  'void netdev_crit(const struct net_device*, const char*, ...)'
  'bool of_device_is_big_endian(const struct device_node*)'
  'struct net_device* of_find_net_device_by_node(struct device_node*)'
  'int of_get_ethdev_address(struct device_node*, struct net_device*)'
  'const char* pci_speed_string(enum pci_bus_speed)'
  'struct phy_device* phy_attach(struct net_device*, const char*, phy_interface_t)'
  'int phy_resume(struct phy_device*)'
  'void phy_start_machine(struct phy_device*)'
  'bool phy_validate_pause(struct phy_device*, struct ethtool_pauseparam*)'
  'pgprot_t phys_mem_access_prot(struct file*, unsigned long, unsigned long, pgprot_t)'
  'const char* pinctrl_dev_get_devname(struct pinctrl_dev*)'
  'void recalc_sigpending()'
  'int restore_online_page_callback(online_page_callback_t)'
  'u16 sdhci_calc_clk(struct sdhci_host*, unsigned int, unsigned int*)'
  'int sdhci_pltfm_resume(struct device*)'
  'int sdhci_pltfm_suspend(struct device*)'
  'int serial8250_handle_irq(struct uart_port*, unsigned int)'
  'int set_online_page_callback(online_page_callback_t)'
  'int spi_split_transfers_maxsize(struct spi_controller*, struct spi_message*, size_t, gfp_t)'
  'void vm_unmap_aliases()'

4 variable symbol(s) added
  'unsigned long empty_zero_page[512]'
  'const unsigned char pcie_link_speed[16]'
  'unsigned long phy_basic_features[2]'
  'unsigned long phy_gbit_features[2]'

Bug: 343006993
Change-Id: Ia094cd3f5444ea60b273415990bceb7a523cfee8
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 17:19:37 +00:00
Danesh Petigara
b164ce27fa ANDROID: gki_defconfig: Enable Broadcom STB SoCs
Enable configs required for Broadcom Set Top Box SoCs.

Also explicitly disable the Broadcom Set Top Box SoC
drivers that we wish to build as loadable modules.

Bug: 343006993
Change-Id: Ia3e542d0eeb519539aba2990fb4eb4eb2970a867
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 09:06:09 -07:00
Jorge Ramirez-Ortiz
d385f8f23f UPSTREAM: mmc: core: Do not force a retune before RPMB switch
Requesting a retune before switching to the RPMB partition has been
observed to cause CRC errors on the RPMB reads (-EILSEQ).

Since RPMB reads can not be retried, the clients would be directly
affected by the errors.

This commit disables the retune request prior to switching to the RPMB
partition: mmc_retune_pause() no longer triggers a retune before the
pause period begins.

This was verified with the sdhci-of-arasan driver (ZynqMP) configured
for HS200 using two separate eMMC cards (DG4064 and 064GB2). In both
cases, the error was easy to reproduce triggering every few tenths of
reads.

With this commit, systems that were utilizing OP-TEE to access RPMB
variables will experience an enhanced performance. Specifically, when
OP-TEE is configured to employ RPMB as a secure storage solution, it not
only writes the data but also the secure filesystem within the
partition. As a result, retrieving any variable involves multiple RPMB
reads, typically around five.

For context, on ZynqMP, each retune request consumed approximately
8ms. Consequently, reading any RPMB variable used to take at the very
minimum 40ms.

After droping the need to retune before switching to the RPMB partition,
this is no longer the case.

Change-Id: I2320a38436b05b435ac528c6656b621a1e2eaeb7
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Acked-by: Avri Altman <avri.altman@wdc.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20240103112911.2954632-1-jorge@foundries.io
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 67380251e8bbd3302c64fea07f95c31971b91c22)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 09:06:09 -07:00
Ilkka Koskinen
5c4b00b73e UPSTREAM: arm64/arm: arm_pmuv3: perf: Don't truncate 64-bit registers
The driver used to truncate several 64-bit registers such as PMCEID[n]
registers used to describe whether architectural and microarchitectural
events in range 0x4000-0x401f exist. Due to discarding the bits, the
driver made the events invisible, even if they existed.

Moreover, PMCCFILTR and PMCR registers have additional bits in the upper
32 bits. This patch makes them available although they aren't currently
used. Finally, functions handling PMXEVCNTR and PMXEVTYPER registers are
removed as they not being used at all.

Fixes: df29ddf4f04b ("arm64: perf: Abstract system register accesses away")
Reported-by: Carl Worth <carl@os.amperecomputing.com>
Change-Id: Ic2ec717caa2fdda2456c560a82490e374565eb2d
Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Acked-by: Will Deacon <will@kernel.org>
Closes: https://lore.kernel.org/..
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20231102183012.1251410-1-ilkka@os.amperecomputing.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 403edfa436286b21f5ffe6856ae5b36396e8966c)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 09:06:09 -07:00
Florian Fainelli
ad62d386c8 BACKPORT: net: phy: Allow drivers to always call into ->suspend()
A few PHY drivers are currently attempting to not suspend the PHY when
Wake-on-LAN is enabled, however that code is not currently executing at
all due to an early check in phy_suspend().

This prevents PHY drivers from making an appropriate decisions and put
the hardware into a low power state if desired.

In order to allow the PHY drivers to opt into getting their ->suspend
routine to be called, add a PHY_ALWAYS_CALL_SUSPEND bit which can be
set. A boolean that tracks whether the PHY or the attached MAC has
Wake-on-LAN enabled is also provided for convenience.

If phydev::wol_enabled then the PHY shall not prevent its own
Wake-on-LAN detection logic from working and shall not prevent the
Ethernet MAC from receiving packets for matching.

Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Change-Id: I9077fe16d2515b60a2cb58753e6914be95a6923a
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit a7e3448086d580abadccff399316c6eb5ecdedbf)
[danesh: Moved phydev->wol_enabled to avoid KMI-break]
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 09:05:51 -07:00
Geert Uytterhoeven
7c09ddbf94 UPSTREAM: ARM: perf: Mark all accessor functions inline
When just including <asm/arm_pmuv3.h>:

    arch/arm/include/asm/arm_pmuv3.h:110:13: error: ‘write_pmevtypern’ defined but not used [-Werror=unused-function]
      110 | static void write_pmevtypern(int n, unsigned long val)
	  |             ^~~~~~~~~~~~~~~~
    arch/arm/include/asm/arm_pmuv3.h:103:13: error: ‘write_pmevcntrn’ defined but not used [-Werror=unused-function]
      103 | static void write_pmevcntrn(int n, unsigned long val)
	  |             ^~~~~~~~~~~~~~~
    arch/arm/include/asm/arm_pmuv3.h:95:22: error: ‘read_pmevcntrn’ defined but not used [-Werror=unused-function]
       95 | static unsigned long read_pmevcntrn(int n)
	  |                      ^~~~~~~~~~~~~~

Fix this by adding the missing "inline" keywords to the three accessor
functions that lack them.

Fixes: 009d6dc87a56 ("ARM: perf: Allow the use of the PMUv3 driver on 32bit ARM")
Change-Id: I0877fa9d337a59857c8480a219515e2c641cfc55
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/3a7d9bc7470aa2d85696ee9765c74f8c03fb5454.1683561482.git.geert+renesas@glider.be
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 68e3f61eb9f58798e28b18152cd38cb269eebc34)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 04:37:56 -07:00
Geert Uytterhoeven
f5e0452e91 UPSTREAM: arm64: perf: Mark all accessor functions inline
When just including <asm/arm_pmuv3.h>:

    arch/arm64/include/asm/arm_pmuv3.h:31:13: error: ‘write_pmevtypern’ defined but not used [-Werror=unused-function]
       31 | static void write_pmevtypern(int n, unsigned long val)
	  |             ^~~~~~~~~~~~~~~~
    arch/arm64/include/asm/arm_pmuv3.h:24:13: error: ‘write_pmevcntrn’ defined but not used [-Werror=unused-function]
       24 | static void write_pmevcntrn(int n, unsigned long val)
	  |             ^~~~~~~~~~~~~~~
    arch/arm64/include/asm/arm_pmuv3.h:16:22: error: ‘read_pmevcntrn’ defined but not used [-Werror=unused-function]
       16 | static unsigned long read_pmevcntrn(int n)
	  |                      ^~~~~~~~~~~~~~

Fix this by adding the missing "inline" keywords to the three accessor
functions that lack them.

Fixes: df29ddf4f04b ("arm64: perf: Abstract system register accesses away")
Change-Id: I36e1360fc3b187b5e68619386ae9c142a9dda3c6
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/d53a19043c0c3bd25f6c203e73a2fb08a9661824.1683561482.git.geert+renesas@glider.be
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 3bc879e355da4ff925e9d82278a829547d9d54bf)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 04:37:56 -07:00
Marc Zyngier
6d7eea37f7 UPSTREAM: perf/core: Drop __weak attribute from arch_perf_update_userpage() prototype
Reiji reports that the arm64 implementation of arch_perf_update_userpage()
is now ignored and replaced by the dummy stub in core code.
This seems to happen since the PMUv3 driver was moved to driver/perf.

As it turns out, dropping the __weak attribute from the *prototype*
of the function solves the problem. You're right, this doesn't seem
to make much sense. And yet... It appears that both symbols get
flagged as weak, and that the first one to appear in the link order
wins:

$ nm drivers/perf/arm_pmuv3.o|grep arch_perf_update_userpage
0000000000001db0 W arch_perf_update_userpage

Dropping the attribute from the prototype restores the expected
behaviour, and arm64 is able to enjoy arch_perf_update_userpage()
again.

Fixes: 7755cec63ade ("arm64: perf: Move PMUv3 driver to drivers/perf")
Fixes: f1ec3a517b ("kernel/events: Add a missing prototype for arch_perf_update_userpage()")
Reported-by: Reiji Watanabe <reijiw@google.com>
Change-Id: I497041999776e66ac77c3fccdd09ce47aae544e9
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Reiji Watanabe <reijiw@google.com>
Link: https://lkml.kernel.org/r/20230616114831.3186980-1-maz@kernel.org
(cherry picked from commit b50f26a44887f3f71ff5457135ee1d5f1d542d7d)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 04:37:56 -07:00
Marc Zyngier
bf3022d3c3 UPSTREAM: ARM: perf: Allow the use of the PMUv3 driver on 32bit ARM
The only thing stopping the PMUv3 driver from compiling on 32bit
is the lack of defined system registers names and the handful of
required helpers.

This is easily solved by providing the sysreg accessors and updating
the Kconfig entry.

Change-Id: I3f7f46feaeac69bb7d20c86b013e4a3091fb4bce
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Co-developed-by: Zaid Al-Bassam <zalbassam@google.com>
Signed-off-by: Zaid Al-Bassam <zalbassam@google.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20230317195027.3746949-8-zalbassam@google.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 009d6dc87a568db62290b8dc0a517b612217b6da)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 04:37:56 -07:00
Marc Zyngier
393be9f6d0 UPSTREAM: ARM: Make CONFIG_CPU_V7 valid for 32bit ARMv8 implementations
ARMv8 is a superset of ARMv7, and all the ARMv8 features are
discoverable with a set of ID registers. It means that we can
use CPU_V7 to guard ARMv8 features at compile time.

This commit simply amends the CPU_V7 configuration symbol comment
to reflect that CPU_V7 also covers ARMv8.

Change-Id: Ibfa141b7fcf77619cea6f95d562b8ddf959187a3
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Zaid Al-Bassam <zalbassam@google.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20230317195027.3746949-7-zalbassam@google.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 252309adc81f529d42c8c90a4965866ec82cb6ad)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 04:37:56 -07:00
Zaid Al-Bassam
9d0a91c993 UPSTREAM: perf: pmuv3: Change GENMASK to GENMASK_ULL
GENMASK macro uses "unsigned long" (32-bit wide on arm and 64-bit
on arm64), This causes build issues when enabling PMUv3 on arm as
it tries to access bits > 31. This patch switches the GENMASK to
GENMASK_ULL, which uses "unsigned long long" (64-bit on both arm
and arm64).

Change-Id: I44e30f5326202a4e691bf70ce15ac5c946cca19a
Signed-off-by: Zaid Al-Bassam <zalbassam@google.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20230317195027.3746949-6-zalbassam@google.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit b3a070869f39be4fad9ea4d99f2c8fab1fb7eead)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 04:37:56 -07:00
Zaid Al-Bassam
ab26945ffd UPSTREAM: perf: pmuv3: Move inclusion of kvm_host.h to the arch-specific helper
KVM host support is available only on arm64.

By moving the inclusion of kvm_host.h to an arm64-specific file,
the 32bit architecture will be able to implement dummy helpers.

Change-Id: I219958c7d95fa89b3fadcfaa73eec7392717a534
Signed-off-by: Zaid Al-Bassam <zalbassam@google.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20230317195027.3746949-5-zalbassam@google.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 11fba29a8a1f2fca08f301426b15c62d8a0b8040)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 04:37:56 -07:00
Zaid Al-Bassam
3e7e6fa4da UPSTREAM: perf: pmuv3: Abstract PMU version checks
The current PMU version definitions are available for arm64 only,
As we want to add PMUv3 support to arm (32-bit), abstracts
these definitions by using arch-specific helpers.

Change-Id: I4d487c354c5b1384d2e8c95d097c0d3864907787
Signed-off-by: Zaid Al-Bassam <zalbassam@google.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20230317195027.3746949-4-zalbassam@google.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 711432770f78e5a9ae235a1a55decfb71993c958)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 04:37:56 -07:00
Marc Zyngier
55cfecdaaa UPSTREAM: arm64: perf: Abstract system register accesses away
As we want to enable 32bit support, we need to distanciate the
PMUv3 driver from the AArch64 system register names.

This patch moves all system register accesses to an architecture
specific include file, allowing the 32bit counterpart to be
slotted in at a later time.

Change-Id: Ib5c22a45d2b0ed844ee7d03cb7a7fa855230fcca
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Co-developed-by: Zaid Al-Bassam <zalbassam@google.com>
Signed-off-by: Zaid Al-Bassam <zalbassam@google.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20230317195027.3746949-3-zalbassam@google.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit df29ddf4f04b00cf60669686dc7f534c3ed7c433)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 04:37:55 -07:00
Marc Zyngier
278e973f01 UPSTREAM: arm64: perf: Move PMUv3 driver to drivers/perf
Having the ARM PMUv3 driver sitting in arch/arm64/kernel is getting
in the way of being able to use perf on ARMv8 cores running a 32bit
kernel, such as 32bit KVM guests.

This patch moves it into drivers/perf/arm_pmuv3.c, with an include
file in include/linux/perf/arm_pmuv3.h. The only thing left in
arch/arm64 is some mundane perf stuff.

Change-Id: I1928ceb684a107ef991401175458f2ea6c711826
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Zaid Al-Bassam <zalbassam@google.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20230317195027.3746949-2-zalbassam@google.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 7755cec63adeecea3cbbf4032047812c37cf7cc3)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 04:37:55 -07:00
Anshuman Khandual
222a79a1bb UPSTREAM: arm64/perf: Replace PMU version number '0' with ID_AA64DFR0_EL1_PMUVer_NI
__armv8pmu_probe_pmu() returns if detected PMU is either not implemented or
implementation defined. Extracted ID_AA64DFR0_EL1_PMUVer value, when PMU is
not implemented is '0' which can be replaced with ID_AA64DFR0_EL1_PMUVer_NI
defined as '0b0000'.

Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-perf-users@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Change-Id: I1d3b7e35313b967b19fb4370fde4ad3392f28db2
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20221128025449.39085-1-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit cc91b9481605b1f62f947857231050c747ceda16)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
2024-06-07 04:37:55 -07:00
Wei Liu
62a4d78dda ANDROID: GKI: Update oplus symbol list
17 function symbol(s) added
  'void __netif_schedule(struct Qdisc*)'
  'void __qdisc_calculate_pkt_len(struct sk_buff*, const struct qdisc_size_table*)'
  'void gnet_stats_add_queue(struct gnet_stats_queue*, const struct gnet_stats_queue*, const struct gnet_stats_queue*)'
  'int gnet_stats_copy_basic(struct gnet_dump*, struct gnet_stats_basic_sync*, struct gnet_stats_basic_sync*, bool)'
  'int gnet_stats_copy_queue(struct gnet_dump*, struct gnet_stats_queue*, struct gnet_stats_queue*, __u32)'
  'void psched_ratecfg_precompute(struct psched_ratecfg*, const struct tc_ratespec*, u64)'
  'struct Qdisc* qdisc_create_dflt(struct netdev_queue*, const struct Qdisc_ops*, unsigned int, struct netlink_ext_ack*)'
  'void qdisc_hash_add(struct Qdisc*, bool)'
  'void qdisc_put(struct Qdisc*)'
  'void qdisc_reset(struct Qdisc*)'
  'void qdisc_tree_reduce_backlog(struct Qdisc*, int, int)'
  'void qdisc_watchdog_cancel(struct qdisc_watchdog*)'
  'void qdisc_watchdog_init(struct qdisc_watchdog*, struct Qdisc*)'
  'void qdisc_watchdog_schedule_range_ns(struct qdisc_watchdog*, u64, u64)'
  'int tcf_block_get(struct tcf_block**, struct tcf_proto**, struct Qdisc*, struct netlink_ext_ack*)'
  'void tcf_block_put(struct tcf_block*)'
  'int tcf_classify(struct sk_buff*, const struct tcf_block*, const struct tcf_proto*, struct tcf_result*, bool)'

2 variable symbol(s) added
  'struct Qdisc noop_qdisc'
  'struct Qdisc_ops pfifo_qdisc_ops'

Bug: 344702684
Change-Id: I42fa44b9e95c24b0ef3347f837561e79913878b9
Signed-off-by: Wei Liu <liuwei.a@oppo.com>
2024-06-06 17:22:56 +00:00
Qais Yousef
bfacfd198e UPSTREAM: block/blk-mq: Don't complete locally if capacities are different
The logic in blk_mq_complete_need_ipi() assumes SMP systems where all
CPUs have equal compute capacities and only LLC cache can make
a different on perceived performance. But this assumption falls apart on
HMP systems where LLC is shared, but the CPUs have different capacities.
Staying local then can have a big performance impact if the IO request
was done from a CPU with higher capacity but the interrupt is serviced
on a lower capacity CPU.

Use the new cpus_equal_capacity() function to check if we need to send
an IPI.

Without the patch I see the BLOCK softirq always running on little cores
(where the hardirq is serviced). With it I can see it running on all
cores.

This was noticed after the topology change [1] where now on a big.LITTLE
we truly get that the LLC is shared between all cores where as in the
past it was being misrepresented for historical reasons. The logic
exposed a missing dependency on capacities for such systems where there
can be a big performance difference between the CPUs.

This of course introduced a noticeable change in behavior depending on
how the topology is presented. Leading to regressions in some workloads
as the performance of the BLOCK softirq on littles can be noticeably
worse on some platforms.

Worth noting that we could have checked for capacities being greater
than or equal instead for equality. This will lead to favouring higher
performance always. But opted for equality instead to match the
performance of the requester without making an assumption that can lead
to power trade-offs which these systems tend to be sensitive about. If
the requester would like to run faster, it's better to rely on the
scheduler to give the IO requester via some facility to run on a faster
core; and then if the interrupt triggered on a CPU with different
capacity we'll make sure to match the performance the requester is
supposed to run at.

[1] https://lpc.events/event/16/contributions/1342/attachments/962/1883/LPC-2022-Android-MC-Phantom-Domains.pdf

Bug: 341551538
Signed-off-by: Qais Yousef <qyousef@layalina.io>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240223155749.2958009-3-qyousef@layalina.io
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit af550e4c968294398fc76b075f12d51c76caf753)
Signed-off-by: Qais Yousef <qyousef@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:d01dc1c7d020f49f31194254a89694bd23ad3dd5)
Merged-In: Iefed6a19b9d25102642e264118431f5e12e23fea
Change-Id: Iefed6a19b9d25102642e264118431f5e12e23fea
2024-06-06 15:43:07 +00:00
Qais Yousef
cf4893eb95 BACKPORT: sched: Add a new function to compare if two cpus have the same capacity
The new helper function is needed to help blk-mq check if it needs to
dispatch the softirq on another CPU to match the performance level the
IO requester is running at. This is important on HMP systems where not
all CPUs have the same compute capacity.

Bug: 341551538
Signed-off-by: Qais Yousef <qyousef@layalina.io>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240223155749.2958009-2-qyousef@layalina.io
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit b361c9027b4e4159e7bcca4eb64fd26507c19994)
[Trivial clash due to some code shuffling between versions]
Signed-off-by: Qais Yousef <qyousef@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:ee8168e00c6e4fb04bea953bacb61ff017a39f63)
Merged-In: I58f3f3e3560f4800b5c73b3c85bbfdf628e9764e
Change-Id: I58f3f3e3560f4800b5c73b3c85bbfdf628e9764e
2024-06-06 15:43:07 +00:00
Bian Jin chen
e4622d460e ANDROID: GKI: Update rockchip symbols for rndis_host.
3 function symbol(s) added
  'void usbnet_cdc_unbind(struct usbnet*, struct usb_interface*)'
  'int usbnet_cdc_zte_rx_fixup(struct usbnet*, struct sk_buff*)'
  'int usbnet_generic_cdc_bind(struct usbnet*, struct usb_interface*)'

Bug: 300024866
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Change-Id: Ibd1798bc17f99767507eec2fb8ca7e1608e16488
2024-06-05 22:14:49 +00:00
Bian Jin chen
f601b06a7e ANDROID: GKI: Update rockchip symbols for snd multi dais.
2 function symbol(s) added
  'void snd_pcm_stream_lock_irq(struct snd_pcm_substream*)'
  'void snd_pcm_stream_unlock_irq(struct snd_pcm_substream*)'

Bug: 300024866
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Change-Id: Ic35b2fc03132b0fb7edd5df3e4393109d7b47302
2024-06-05 22:14:49 +00:00
Wesley Cheng
986fffb590 UPSTREAM: usb: gadget: f_fs: Fix race between aio_cancel() and AIO request complete
FFS based applications can utilize the aio_cancel() callback to dequeue
pending USB requests submitted to the UDC.  There is a scenario where the
FFS application issues an AIO cancel call, while the UDC is handling a
soft disconnect.  For a DWC3 based implementation, the callstack looks
like the following:

    DWC3 Gadget                               FFS Application
dwc3_gadget_soft_disconnect()              ...
  --> dwc3_stop_active_transfers()
    --> dwc3_gadget_giveback(-ESHUTDOWN)
      --> ffs_epfile_async_io_complete()   ffs_aio_cancel()
        --> usb_ep_free_request()            --> usb_ep_dequeue()

There is currently no locking implemented between the AIO completion
handler and AIO cancel, so the issue occurs if the completion routine is
running in parallel to an AIO cancel call coming from the FFS application.
As the completion call frees the USB request (io_data->req) the FFS
application is also referencing it for the usb_ep_dequeue() call.  This can
lead to accessing a stale/hanging pointer.

commit b566d38857fc ("usb: gadget: f_fs: use io_data->status consistently")
relocated the usb_ep_free_request() into ffs_epfile_async_io_complete().
However, in order to properly implement locking to mitigate this issue, the
spinlock can't be added to ffs_epfile_async_io_complete(), as
usb_ep_dequeue() (if successfully dequeuing a USB request) will call the
function driver's completion handler in the same context.  Hence, leading
into a deadlock.

Fix this issue by moving the usb_ep_free_request() back to
ffs_user_copy_worker(), and ensuring that it explicitly sets io_data->req
to NULL after freeing it within the ffs->eps_lock.  This resolves the race
condition above, as the ffs_aio_cancel() routine will not continue
attempting to dequeue a request that has already been freed, or the
ffs_user_copy_work() not freeing the USB request until the AIO cancel is
done referencing it.

This fix depends on
  commit b566d38857fc ("usb: gadget: f_fs: use io_data->status
  consistently")

Fixes: 2e4c7553cd ("usb: gadget: f_fs: add aio support")
Cc: stable <stable@kernel.org>	# b566d38857fc ("usb: gadget: f_fs: use io_data->status consistently")
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20240409014059.6740-1-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 334976932
(cherry picked from commit 24729b307eefcd7c476065cd7351c1a018082c19)
Change-Id: I56f6b9d24c239e73edff94e1f9f33ab41a9bd37b
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
2024-06-05 14:41:37 +05:30
John Keeping
163070bc79 UPSTREAM: usb: gadget: f_fs: use io_data->status consistently
Commit fb1f16d74e ("usb: gadget: f_fs: change ep->status safe in
ffs_epfile_io()") added a new ffs_io_data::status field to fix lifetime
issues in synchronous requests.

While there are no similar lifetime issues for asynchronous requests
(the separate ep member in ffs_io_data avoids them) using the status
field means the USB request can be freed earlier and that there is more
consistency between the synchronous and asynchronous I/O paths.

Cc: Linyu Yuan <quic_linyyuan@quicinc.com>
Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Link: https://lore.kernel.org/r/20221124170430.3998755-1-john@metanate.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 334976932
(cherry picked from commit b566d38857fcb6777f25b674b90a831eec0817a2)
Change-Id: I8cd4d95ff6ec694adac3881da80eff23f6c679d4
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
2024-06-05 14:38:56 +05:30
Yifan Hong
3c19f7015e ANDROID: set rewrite_absolute_paths_in_config for GKI aarch64.
For GKI targets with kmi_symbol_list set,
also set rewrite_absolute_paths_in_config to True
so that CONFIG_UNUSED_KSYMS_WHITELIST is not an
absolute path any more, increasing reproducibility
on different machines.

This is made possible with c6427490ab
"Revert^2 "BACKPORT: FROMGIT: module: allow UNUSED_KSYMS_WHITELIST to be relative against objtree.""
so that Kbuild recognizes relative paths by searching
$(objtree) first.

This does not change x86 builds because it
doesn't have kmi_symbol_list set.

This change does not affect device builds like
db845c, rockpi and fips140. Adding the attribute
to these targets would be okay, but it is not
covered by this change.

Bug: 333769605
Bug: 342390208
Change-Id: I844c251979bae5277474837eaa055f1346b0afa2
Signed-off-by: Yifan Hong <elsk@google.com>
2024-06-05 00:27:00 +00:00
Xin Deng
9fcc2459ef UPSTREAM: wifi: cfg80211: Clear mlo_links info when STA disconnects
wdev->valid_links is not cleared when upper layer disconnect from a
wdev->AP MLD. It has been observed that this would prevent offchannel
operations like remain-on-channel which would be needed for user space
operations with Public Action frame.
Clear the wdev->valid_links when STA disconnects.

Signed-off-by: Xin Deng <quic_deng@quicinc.com>
Link: https://msgid.link/20240426092501.8592-1-quic_deng@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 344476904
Change-Id: Ie84dda35e26d2792ed39f50d0c3f959682730d89
(cherry picked from commit 9f6d4b8d149af8dc3f9a1e3000168b99ca576390)
Signed-off-by: Xin Deng <quic_deng@quicinc.com>
2024-06-04 21:21:53 +00:00
Udipto Goswami
e2c5ee3d15 ANDROID: ABI: Add usb_gadget_connect & usb_gadget_disconnect symbol
Add the usb gadget connect/disconnect symbols to ABI to be used by
vendor driver:

usb_gadget_connect
usb_gadget_disconnect

Bug: 344835325
Change-Id: I506d142ed863e6ce0d21b7a0e31c1721f6bdba93
Signed-off-by: Udipto Goswami <quic_ugoswami@quicinc.com>
2024-06-04 17:42:51 +00:00
Seiya Wang
c5abb61725 ANDROID: GKI: Update symbol list for mtk
10 function symbol(s) added
  'struct fwnode_handle* fwnode_get_next_available_child_node(const struct fwnode_handle*, struct fwnode_handle*)'
  'int genphy_c45_aneg_done(struct phy_device*)'
  'int genphy_c45_pma_read_abilities(struct phy_device*)'
  'int genphy_c45_read_lpa(struct phy_device*)'
  'int genphy_read_master_slave(struct phy_device*)'
  'unsigned int linear_range_get_max_value(const struct linear_range*)'
  'int linear_range_get_selector_high(const struct linear_range*, unsigned int, unsigned int*, bool*)'
  'int phy_get_c45_ids(struct phy_device*)'
  'int regulator_get_bypass_regmap(struct regulator_dev*, bool*)'
  'int regulator_set_bypass_regmap(struct regulator_dev*, bool)'

Bug: 344729193
Change-Id: I2c3a565d9693baa19224cc4d0dd633ae14b2a38e
Signed-off-by: Seiya Wang <seiya.wang@mediatek.com>
2024-06-04 11:01:49 +00:00
Jason Gunthorpe
c36abc6d42 BACKPORT: iommu: Have __iommu_probe_device() check for already probed devices
This is a step toward making __iommu_probe_device() self contained.

It should, under proper locking, check if the device is already associated
with an iommu driver and resolve parallel probes. All but one of the
callers open code this test using two different means, but they all
rely on dev->iommu_group.

Currently the bus_iommu_probe()/probe_iommu_group() and
probe_acpi_namespace_devices() rejects already probed devices with an
unlocked read of dev->iommu_group. The OF and ACPI "replay" functions use
device_iommu_mapped() which is the same read without the pointless
refcount.

Move this test into __iommu_probe_device() and put it under the
iommu_probe_device_lock. The store to dev->iommu_group is in
iommu_group_add_device() which is also called under this lock for iommu
driver devices, making it properly locked.

The only path that didn't have this check is the hotplug path triggered by
BUS_NOTIFY_ADD_DEVICE. The only way to get dev->iommu_group assigned
outside the probe path is via iommu_group_add_device(). Today the only
caller is VFIO no-iommu which never associates with an iommu driver. Thus
adding this additional check is safe.

Bug: 337990354
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/1-v3-328044aa278c+45e49-iommu_probe_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
(cherry picked from commit 6eb4da8cf54537992fc9843be8b2af4f83f717e0)
Change-Id: I079ee5467e96367a5e1aa2ae5f0d5f6837df597c
[quic_nprakash: Resolved conflicts in drivers/iommu/iommu.c]
Signed-off-by: Nikhil V <quic_nprakash@quicinc.com>
2024-06-03 17:16:48 +00:00
Greg Kroah-Hartman
a7462d7032 ANDROID: ABI fixup for abi break in struct dst_ops
In commit 92f1655aa2b2 ("net: fix __dst_negative_advice() race") the
struct dst_ops callback negative_advice is callback changes function
parameters.  But as this pointer is part of a structure that is tracked
in the ABI checker, the tool triggers when this is changed.

However, the callback pointer is internal to the networking stack, so
changing the function type is safe, so needing to preserve this is not
required.  To do so, switch the function pointer type back to the old
one so that the checking tools pass, AND then do a hard cast of the
function pointer to the new type when assigning and calling the
function.

[6.1.y backport note, work around --Werror=cast-function-type issue by
 abusing void * for function pointer types, despite its best effort, C
 still let's us shoot our foot off if we really want to!]

Bug: 343727534
Fixes: 92f1655aa2b2 ("net: fix __dst_negative_advice() race")
Change-Id: I48d4ab4bbd29f8edc8fbd7923828b7f78a23e12e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-06-03 09:08:52 +00:00
Eric Dumazet
bd2bcb81d4 BACKPORT: net: fix __dst_negative_advice() race
__dst_negative_advice() does not enforce proper RCU rules when
sk->dst_cache must be cleared, leading to possible UAF.

RCU rules are that we must first clear sk->sk_dst_cache,
then call dst_release(old_dst).

Note that sk_dst_reset(sk) is implementing this protocol correctly,
while __dst_negative_advice() uses the wrong order.

Given that ip6_negative_advice() has special logic
against RTF_CACHE, this means each of the three ->negative_advice()
existing methods must perform the sk_dst_reset() themselves.

Note the check against NULL dst is centralized in
__dst_negative_advice(), there is no need to duplicate
it in various callbacks.

Many thanks to Clement Lecigne for tracking this issue.

This old bug became visible after the blamed commit, using UDP sockets.

Bug: 343727534
Fixes: a87cb3e48e ("net: Facility to report route quality of connected sockets")
Reported-by: Clement Lecigne <clecigne@google.com>
Diagnosed-by: Clement Lecigne <clecigne@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tom Herbert <tom@herbertland.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240528114353.1794151-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 92f1655aa2b2294d0b49925f3b875a634bd3b59e)
[Lee: Trivial/unrelated conflict - no change to the patch]
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I293734dca1b81fcb712e1de294f51e96a405f7e4
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-06-03 09:08:52 +00:00
Will McVicker
997e6b3f6a Revert "crypto: api - Disallow identical driver names"
This reverts commit 680eb0a993 which is
commit 27016f75f5ed47e2d8e0ca75a8ff1f40bc1a5e27 upstream.

This breaks for devices that use the downstream fips140 module.

Bug: 335718233
Bug: 335830134
Signed-off-by: Will McVicker <willmcvicker@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:0cf5cecba66e91b69268fd87ded20e755bee1938)
Merged-In: Ie465403c40fe75fee5934ea160b86a4c77ef8f17
Change-Id: Ie465403c40fe75fee5934ea160b86a4c77ef8f17
2024-06-03 08:48:20 +00:00
Roy Luo
74c507aab1 UPSTREAM: USB: gadget: core: create sysfs link between udc and gadget
udc device and gadget device are tightly coupled, yet there's no good
way to corelate the two. Add a sysfs link in udc that points to the
corresponding gadget device.
An example use case: userspace configures a f_midi configfs driver and
bind the udc device, then it tries to locate the corresponding midi
device, which is a child device of the gadget device. The gadget device
that's associated to the udc device has to be identified in order to
index the midi device. Having a sysfs link would make things much
easier.

Signed-off-by: Roy Luo <royluo@google.com>
Link: https://lore.kernel.org/r/20240307030922.3573161-1-royluo@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 333778731
Change-Id: I9e3f782543eba5e026a65031aaae754daafb69ab
(cherry picked from commit 0ef40f399aa2be8c04aee9b7430705612c104ce5)
Signed-off-by: Roy Luo <royluo@google.com>
2024-05-31 20:45:19 +00:00
Carlos Llamas
92704e00b5 ANDROID: GKI: add tegra20-cpufreq.ko to rockpi4 build
Enabling configs for Tegra SoCs required this module to be included in
the rockpi4 builds. This change fixes the following build issue:

ERROR: The following kernel modules are built but not copied. Add these lines to the module_outs attribute of @@//common:rockpi4_no_kgdb:
    "drivers/cpufreq/tegra20-cpufreq.ko",

Bug: 335325897
Change-Id: I898000725287f34956cb977b3b02685f189cd5a0
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-05-31 05:17:35 +00:00
Carlos Llamas
8498700531 ANDROID: GKI: update symbol list for db845c
Enabling configs for Tegra SoCs required these symbols to be included.
This change fixes the following build issues:

  ERROR: modpost: "devm_tegra_memory_controller_get" [drivers/iommu/arm/arm-smmu/arm_smmu.ko] undefined!
  ERROR: modpost: "tegra_mc_probe_device" [drivers/iommu/arm/arm-smmu/arm_smmu.ko] undefined!

Also update the STG file accordingly:
2 function symbol(s) added
  'struct tegra_mc* devm_tegra_memory_controller_get(struct device*)'
  'int tegra_mc_probe_device(struct tegra_mc*, struct device*)'

Bug: 335325897
Change-Id: Ie357116189e074f1dc0e572553b2264abc910bd3
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-05-31 05:17:13 +00:00
Ahmad Chaudhry
1e4532a4a3 ANDROID: Build some tegra configs as vendor module
Build some configs that are tristate and selected by
CONFIG_ARCH_TEGRA as vendor modules rather than built-in.

Bug: 335325897
Change-Id: I7ce4cf975fcbc834bc5fc3c90317d9d81162185a
Signed-off-by: Ahmad Chaudhry <ahmadc@nvidia.com>
2024-05-31 04:40:23 +00:00
Ahmad Chaudhry
974a6f430e ANDROID: gki_defconfig: Enable Tegra SoCs
Enable configs required for Tegra SoCs.

Bug: 335325897
Change-Id: I74fd9e1b16810ca417f656ed681e01dff8a4efc9
Signed-off-by: Ahmad Chaudhry <ahmadc@nvidia.com>
2024-05-31 04:40:23 +00:00
Rick Yiu
6b75fd4835 ANDROID: Update the ABI symbol list
To use cpumask_parse_user in vendor code, it will call
bitmap_parse_user.

Adding the following symbols:
  - bitmap_parse_user

Bug: 248621289
Change-Id: I4b24d8b1fba71af7b55c7444963a003d50f6d93c
Signed-off-by: Rick Yiu <rickyiu@google.com>
2024-05-30 20:43:36 +00:00
Yifan Hong
c6427490ab Revert^2 "BACKPORT: FROMGIT: module: allow UNUSED_KSYMS_WHITELIST ..."
This reverts commit 3f13972470.

Reason for revert: relanding change that should be safe to go in on its own. Below is the original commit message.

BACKPORT: FROMGIT: module: allow UNUSED_KSYMS_WHITELIST to be relative against objtree.

If UNUSED_KSYMS_WHITELIST is a file generated
before Kbuild runs, and the source tree is in
a read-only filesystem, the developer must put
the file somewhere and specify an absolute
path to UNUSED_KSYMS_WHITELIST. This worked,
but if IKCONFIG=y, an absolute path is embedded
into .config and eventually into vmlinux, causing
the build to be less reproducible when building
on a different machine.

This patch makes the handling of
UNUSED_KSYMS_WHITELIST to be similar to
MODULE_SIG_KEY.

First, check if UNUSED_KSYMS_WHITELIST is an
absolute path, just as before this patch. If so,
use the path as is.

If it is a relative path, use wildcard to check
the existence of the file below objtree first.
If it does not exist, fall back to the original
behavior of adding $(srctree)/ before the value.

After this patch, the developer can put the generated
file in objtree, then use a relative path against
objtree in .config, eradicating any absolute paths
that may be evaluated differently on different machines.

Signed-off-by: Yifan Hong <elsk@google.com>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>

(cherry picked from commit a2e3c811938b4902725e259c03b2d6c539613992
 https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git modules-next)
Bug: 333769605

Change-Id: I442bbe5a68fc895619b84b4749f1e97cb88088ea
[elsk: apply change to gen_autoksyms.sh instead because
 CONFIG_UNUSED_KSYMS_WHITELIST is parsed there. Revert change
 to Makefile.modpost.]
Bug: 342390208
Signed-off-by: Yifan Hong <elsk@google.com>
2024-05-30 19:08:29 +00:00
Greg Kroah-Hartman
87a4e67740 Merge tag 'android14-6.1.78_r00' into branch android14-6.1
This brings the android14-6.1 branch up to date with the 6.1.78 LTS
release.  Included in here are the following commits:

* 4b97573495 Revert "hrtimer: Report offline hrtimer enqueue"
*   0e5af42a0a Merge 6.1.78 into android14-6.1-lts
|\
| * 8b4118fabd Linux 6.1.78
| * 1296c110c5 netfilter: nft_set_rbtree: skip end interval element from gc
| * d89a80e482 net: stmmac: xgmac: fix a typo of register name in DPP safety handling
| * 7b430fb924 ALSA: usb-audio: Sort quirk table entries
| * 06040fadbf net: stmmac: xgmac: use #define for string constants
| * 499e6e9f07 clocksource: Skip watchdog check for large watchdog intervals
| * 492e0aba08 block: treat poll queue enter similarly to timeouts
| * cf3d57ad6f f2fs: add helper to check compression level
| * 9f74b3d718 RDMA/irdma: Fix support for 64k pages
| * 4675661672 vhost: use kzalloc() instead of kmalloc() followed by memset()
| * d8712c6c6a Revert "ASoC: amd: Add new dmi entries for acp5x platform"
| * fbd77ce1d1 io_uring/net: fix sr->len for IORING_OP_RECV with MSG_WAITALL and buffers
| * 08249dc3d9 Input: atkbd - skip ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID
| * 315075ac73 Input: i8042 - fix strange behavior of touchpad on Clevo NS70PU
| * a94d303bea hrtimer: Report offline hrtimer enqueue
| * 8b380ad970 usb: host: xhci-plat: Add support for XHCI_SG_TRB_CACHE_SIZE_QUIRK
| * f2cf6db285 usb: dwc3: host: Set XHCI_SG_TRB_CACHE_SIZE_QUIRK
| * 041cb58f54 USB: serial: cp210x: add ID for IMST iM871A-USB
| * 36ef5b7b4f USB: serial: option: add Fibocom FM101-GL variant
| * 234099ab7f USB: serial: qcserial: add new usb-id for Dell Wireless DW5826e
| * 39fbca505f ALSA: usb-audio: add quirk for RODE NT-USB+
| * 2552f6b1bd ALSA: usb-audio: Add a quirk for Yamaha YIT-W12TX transmitter
| * b8259a5023 ALSA: usb-audio: Add delay quirk for MOTU M Series 2nd revision
| * 82761993d4 mtd: parsers: ofpart: add workaround for #size-cells 0
| * b478e414cf fs: dlm: don't put dlm_local_addrs on heap
| * e5dc63f01e blk-iocost: Fix an UBSAN shift-out-of-bounds warning
| * 1ebd75cefa scsi: core: Move scsi_host_busy() out of host lock if it is for per-command
| * ec1bedd797 fs/ntfs3: Fix an NULL dereference bug
| * a442ff5405 netfilter: nft_set_pipapo: remove scratch_aligned pointer
| * fac3478d5b netfilter: nft_set_pipapo: add helper to release pcpu scratch area
| * 3eaab7d565 netfilter: nft_set_pipapo: store index in scratch maps
| * 181dade251 netfilter: nft_ct: reject direction for ct id
| * efdd665ce1 drm/amd/display: Implement bounds check for stream encoder creation in DCN301
| * a060da3235 netfilter: nft_compat: restrict match/target protocol to u16
| * 8762bcc927 netfilter: nft_compat: reject unused compat flag
| * e79ef7966e netfilter: nft_compat: narrow down revision to unsigned 8-bits
| * 69d66d493b selftests: cmsg_ipv6: repeat the exact packet
| * 4e2c4846b2 ppp_async: limit MRU to 64K
| * e0e09186d8 af_unix: Call kfree_skb() for dead unix_(sk)->oob_skb in GC.
| * 3d3a5b31b4 tipc: Check the bearer type before calling tipc_udp_nl_bearer_add()
| * cf6b97e183 rxrpc: Fix response to PING RESPONSE ACKs to a dead call
| * 05a4d0e166 drm/i915/gvt: Fix uninitialized variable in handle_mmio()
| * 5453875221 inet: read sk->sk_family once in inet_recv_error()
| * 3fa78ee0e3 hwmon: (coretemp) Fix bogus core_id to attr name mapping
| * 9bce694192 hwmon: (coretemp) Fix out-of-bounds memory access
| * a3156be201 hwmon: (aspeed-pwm-tacho) mutex for tach reading
| * 4065746686 octeontx2-pf: Fix a memleak otx2_sq_init
| * cbf2e16602 atm: idt77252: fix a memleak in open_card_ubr0
| * e37cde7a57 tunnels: fix out of bounds access when building IPv6 PMTU error
| * 90fe47743a selftests: net: avoid just another constant wait
| * 7f484179c5 selftests: net: cut more slack for gro fwd tests.
| * 466ceebe48 net: atlantic: Fix DMA mapping for PTP hwts ring
| * 0193e0660c netdevsim: avoid potential loop in nsim_dev_trap_report_work()
| * bcabbf8ab5 wifi: mac80211: fix waiting for beacons logic
| * e42ff0844f net: stmmac: xgmac: fix handling of DPP safety error for DMA channels
| * fb8bfc6ea3 drm/msm/dpu: check for valid hw_pp in dpu_encoder_helper_phys_cleanup
| * 42939a1ea6 drm/msm/dp: return correct Colorimetry for DP_TEST_DYNAMIC_RANGE_CEA case
| * d2b7e247f3 drm/msms/dp: fixed link clock divider bits be over written in BPC unknown case
| * cbc53148cc cifs: failure to add channel on iface should bump up weight
| * 0430bfcd46 phy: ti: phy-omap-usb2: Fix NULL pointer dereference for SRP
| * 296fb308f4 dmaengine: fix is_slave_direction() return false when DMA_DEV_TO_DEV
| * ed3bb52a05 phy: renesas: rcar-gen3-usb2: Fix returning wrong error code
| * 25ab4d72eb dmaengine: fsl-qdma: Fix a memory leak related to the queue command DMA
| * 13535ae766 dmaengine: fsl-qdma: Fix a memory leak related to the status queue DMA
| * 908939b8e8 dmaengine: ti: k3-udma: Report short packet errors
| * a1d7ca71ba dmaengine: fsl-dpaa2-qdma: Fix the size of dma pools
| * 78327acd4c ext4: regenerate buddy after block freeing failed if under fc replay
* | 19c319d14d Revert "drm/mipi-dsi: Fix detach call without attach"
* | 20b90d46a0 Merge 6.1.77 into android14-6.1-lts
|\|
| * f1bb70486c Linux 6.1.77
| * d78690bb5d drm/amdgpu: Fix missing error code in 'gmc_v6/7/8/9_0_hw_init()'
| * f086c50a98 ASoC: codecs: wsa883x: fix PA volume control
| * ac86261fa8 ASoC: codecs: lpass-wsa-macro: fix compander volume hack
| * 2386ee6cba bonding: remove print in bond_verify_device_path
| * e1edd8e6c0 gve: Fix use-after-free vulnerability
| * 9e584ea101 LoongArch/smp: Call rcutree_report_cpu_starting() at tlb_init()
| * 98c392a91a drm/msm/dsi: Enable runtime PM
| * befdb0a8a1 Revert "drm/amd/display: Disable PSR-SU on Parade 0803 TCON again"
| * dc904345e3 mm, kmsan: fix infinite recursion due to RCU critical section
| * c5a12dfbfa arm64: irq: set the correct node for shadow call stack
| * ddd367ebc4 selftests: bonding: Check initial state
| * 7ebe20e632 selftests: team: Add missing config options
| * aaa8f76845 net: sysfs: Fix /sys/class/net/<iface> path
| * bea0fbf857 selftests: net: fix available tunnels detection
| * a2104f4387 af_unix: fix lockdep positive in sk_diag_dump_icons()
| * fde3d47efe net: ipv4: fix a memleak in ip_setup_cork
| * 0f501dae16 netfilter: nft_ct: sanitize layer 3 and 4 protocol number in custom expectations
| * 9ff981cd65 netfilter: nf_log: replace BUG_ON by WARN_ON_ONCE when putting logger
| * 67f0ca0a4c netfilter: nf_tables: restrict tunnel object to NFPROTO_NETDEV
| * 8a51dbf7b7 netfilter: conntrack: correct window scaling with retransmitted SYN
| * cd091ca44c selftests: net: add missing config for GENEVE
| * 04a553d8ac bridge: mcast: fix disabled snooping after long uptime
| * 9c333d9891 llc: call sock_orphan() at release time
| * c59ed6592f ipv6: Ensure natural alignment of const ipv6 loopback and router addresses
| * 2f3d9829f7 net: dsa: qca8k: fix illegal usage of GPIO
| * 1e4c227805 ixgbe: Fix an error handling path in ixgbe_read_iosf_sb_reg_x550()
| * 3b84b7000c ixgbe: Refactor overtemp event handling
| * 9c8eafc5e9 ixgbe: Refactor returning internal error codes
| * b383d4ea27 tcp: add sanity checks to rx zerocopy
| * 046260ce7c net: lan966x: Fix port configuration when using SGMII interface
| * d2f1b7fe74 ipmr: fix kernel panic when forwarding mcast packets
| * 03dc5b73af ipv4: raw: add drop reasons
| * d54e4da98b ip6_tunnel: make sure to pull inner header in __ip6_tnl_rcv()
| * 262caadfa9 selftests: net: give more time for GRO aggregation
| * 53e94ec530 HID: hidraw: fix a problem of memory leak in hidraw_release()
| * db6338f459 scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler
| * 81e92f0c97 regulator: ti-abb: don't use devm_platform_ioremap_resource_byname for shared interrupt register
| * 7eb86ddaf1 scsi: isci: Fix an error code problem in isci_io_request_build()
| * 206dcd2624 drm: using mul_u32_u32() requires linux/math64.h
| * a2f30104fe wifi: cfg80211: fix RCU dereference in __cfg80211_bss_update
| * 071d98d5ee perf: Fix the nr_addr_filters fix
| * 8eea7e1d69 drm/amdkfd: Fix 'node' NULL check in 'svm_range_get_range_boundaries()'
| * 7513f0906c drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()'
| * af8e292615 drm/amdgpu: Fix with right return code '-EIO' in 'amdgpu_gmc_vram_checking()'
| * d282ea0703 drm/amd/powerplay: Fix kzalloc parameter 'ATOM_Tonga_PPM_Table' in 'get_platform_power_management_table()'
| * 3fbfeb8536 ceph: fix invalid pointer access if get_quota_realm return ERR_PTR
| * 7f2649c942 ceph: fix deadlock or deadcode of misusing dget()
| * 692ead237d ceph: reinitialize mds feature bit even when session in open
| * 1d9c777d3e blk-mq: fix IO hang from sbitmap wakeup race
| * 1f7a018857 virtio_net: Fix "‘%d’ directive writing between 1 and 11 bytes into a region of size 10" warnings
| * b602f098f7 drm/amdkfd: Fix lock dependency warning with srcu
| * 8b25d39716 drm/amdkfd: Fix lock dependency warning
| * 49a7b708da libsubcmd: Fix memory leak in uniq()
| * 2c1164ad92 misc: lis3lv02d_i2c: Add missing setting of the reg_ctrl callback
| * 91f1977487 9p: Fix initialisation of netfs_inode for 9p
| * fc557b76dc PCI/AER: Decode Requester ID when no error info found
| * 83c895561a PCI: Fix 64GT/s effective data rate calculation
| * 521f28eedd spmi: mediatek: Fix UAF on device remove
| * 089ebfab24 fs/kernfs/dir: obey S_ISGID
| * c13bcbdb84 tty: allow TIOCSLCKTRMIOS with CAP_CHECKPOINT_RESTORE
| * d8d7ffefc0 selftests/sgx: Fix linker script asserts
| * fa3f6cd20d usb: hub: Add quirk to decrease IN-ep poll interval for Microchip USB491x hub
| * 9cdf5ddb06 usb: hub: Replace hardcoded quirk value with BIT() macro
| * 4c8ca96124 perf cs-etm: Bump minimum OpenCSD version to ensure a bugfix is present
| * 1d83c85922 PCI: switchtec: Fix stdev_release() crash after surprise hot remove
| * 5e0160dab1 PCI: Only override AMD USB controller if required
| * 26b8a35fef mailbox: arm_mhuv2: Fix a bug for mhuv2_sender_interrupt
| * 6e8c0eda6c mfd: ti_am335x_tscadc: Fix TI SoC dependencies
| * 52e7f05549 xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import
| * e827364bc1 i3c: master: cdns: Update maximum prescaler value for i2c clock
| * 4f7dad73df um: time-travel: fix time corruption
| * d8512cc8ac um: net: Fix return type of uml_net_start_xmit()
| * d8264ce2f8 um: Don't use vfprintf() for os_info()
| * a95e52af36 um: Fix naming clash between UML and scheduler
| * 7d1c4e5809 leds: trigger: panic: Don't register panic notifier if creating the trigger failed
| * 2cb659ef0a ALSA: hda/conexant: Fix headset auto detect fail in cx8070 and SN6140
| * 05a0900bd7 drm/amdkfd: Fix iterator used outside loop in 'kfd_add_peer_prop()'
| * 34bb1b97c3 drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()'
| * 66d38977e2 drm/amdgpu: Fix '*fw' from request_firmware() not released in 'amdgpu_ucode_request()'
| * da08dbb647 drm/amdgpu: Let KFD sync with VM fences
| * adae24c5b3 drm/amdgpu: Fix ecc irq enable/disable unpaired
| * aade0a0760 clk: imx: clk-imx8qxp: fix LVDS bypass, pixel and phy clocks
| * 7294b1bbaa drm/amd/display: make flip_timestamp_in_us a 64-bit variable
| * c95d2144be watchdog: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786
| * ec74a45e80 clk: mmp: pxa168: Fix memory leak in pxa168_clk_init()
| * 14992bc77f clk: hi3620: Fix memory leak in hi3620_mmc_clk_init()
| * d443fb67ca drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap
| * fe7e8ec072 drm/msm/dpu: fix writeback programming for YUV cases
| * 7593e62702 drm/msm/dpu: Ratelimit framedone timeout msgs
| * fb017c3e6a drm/amd/display: For prefetch mode > 0, extend prefetch if possible
| * 4ef53b7e30 media: i2c: imx335: Fix hblank min/max values
| * 5008bde32c media: ddbridge: fix an error code problem in ddb_probe
| * 6408851d05 media: amphion: remove mutext lock in condition of wait_event
| * 5108a2dc2d IB/ipoib: Fix mcast list locking
| * fe80290b2a drm/exynos: Call drm_atomic_helper_shutdown() at shutdown/unbind time
| * 7c972c8945 f2fs: fix to tag gcing flag on page during block migration
| * fb55c3cee6 hwmon: (nct6775) Fix fan speed set failure in automatic mode
| * bf808f5868 media: rkisp1: Fix IRQ disable race issue
| * f0d0fe3787 media: rkisp1: Store IRQ lines
| * fb71b54856 media: rkisp1: Fix IRQ handler return values
| * 1c51b6b0c6 media: rkisp1: Drop IRQF_SHARED
| * c3f77c5d63 ALSA: hda: Intel: add HDA_ARL PCI ID support
| * 3b28da57d0 PCI: add INTEL_HDA_ARL to pci_ids.h
| * 16786b7090 media: rockchip: rga: fix swizzling for RGB formats
| * 1ef8beb4bf media: stk1160: Fixed high volume of stk1160_dbg messages
| * 25eaa9f999 drm/mipi-dsi: Fix detach call without attach
| * f3e41cc260 drm/framebuffer: Fix use of uninitialized variable
| * 406f8d5bad drm/drm_file: fix use of uninitialized variable
| * 48ad42cd95 ASoC: amd: Add new dmi entries for acp5x platform
| * b6ca70f06e f2fs: fix write pointers on zoned device after roll forward
| * 9773a96eac drm/amd/display: Fix tiled display misalignment
| * 126543736f drm/bridge: anx7625: Fix Set HPD irq detect window to 2ms
| * 3c2bd20dc9 drm/panel-edp: Add override_edid_mode quirk for generic edp
| * 055c849724 RDMA/IPoIB: Fix error code return in ipoib_mcast_join
| * c4cb42824e fast_dput(): handle underflows gracefully
| * 0ee8e0a183 ASoC: doc: Fix undefined SND_SOC_DAPM_NOPM argument
| * 52e25a323c ALSA: hda: Refer to correct stream index at loops
| * b1020a5467 f2fs: fix to check return value of f2fs_reserve_new_block()
| * 332a7c108e net: dsa: qca8k: put MDIO bus OF node on qca8k_mdio_register() failure
| * 0438a985de octeontx2-af: Fix max NPC MCAM entry check while validating ref_entry
| * 95173204b1 i40e: Fix VF disable behavior to block all traffic
| * 9f9ac39adb bridge: cfm: fix enum typo in br_cc_ccm_tx_parse
| * a243e0818e net/smc: disable SEID on non-s390 archs where virtual ISM may be used
| * 388736c62b Bluetooth: L2CAP: Fix possible multiple reject send
| * 6d95ade9e6 Bluetooth: hci_sync: fix BR/EDR wakeup bug
| * a836b1c333 Bluetooth: qca: Set both WIDEBAND_SPEECH and LE_STATES quirks for QCA2066
| * da1a6e9f01 wifi: cfg80211: free beacon_ies when overridden from hidden BSS
| * 3bb09b9af1 wifi: rtlwifi: rtl8723{be,ae}: using calculate_bit_shift()
| * 12473265f5 libbpf: Fix NULL pointer dereference in bpf_object__collect_prog_relos
| * 68ef19417a wifi: rtl8xxxu: Add additional USB IDs for RTL8192EU devices
| * e15fa0c67e arm64: dts: amlogic: fix format for s4 uart node
| * 9e8338b72b ice: fix pre-shifted bit usage
| * 9c5541f3f0 arm64: dts: qcom: msm8998: Fix 'out-ports' is a required property
| * 2fdbf9d9a0 arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property
| * fd9a2c7003 md: Whenassemble the array, consult the superblock of the freshest device
| * 8ae4201900 block: prevent an integer overflow in bvec_try_merge_hw_page
| * 44f6b75c09 net: dsa: mv88e6xxx: Fix mv88e6352_serdes_get_stats error path
| * 0edb3ae8bf net: atlantic: eliminate double free in error handling logic
| * ea12794ea6 ice: fix ICE_AQ_VSI_Q_OPT_RSS_* register values
| * d4560c11c3 scsi: hisi_sas: Set .phy_attached before notifing phyup event HISI_PHYE_PHY_UP_PM
| * dc15b313f3 ARM: dts: imx23/28: Fix the DMA controller node name
| * 9388665a12 ARM: dts: imx23-sansa: Use preferred i2c-gpios properties
| * fb8e41af95 ARM: dts: imx27-apf27dev: Fix LED name
| * 6ebe86575b ARM: dts: imx25/27: Pass timing0
| * 68b2e26225 ARM: dts: imx25: Fix the iim compatible string
| * af7bbdac89 block/rnbd-srv: Check for unlikely string overflow
| * 238ec612a2 ionic: bypass firmware cmds when stuck in reset
| * 434fcaf372 ionic: pass opcode to devcmd_wait
| * 7dc0fefd37 net: phy: at803x: fix passing the wrong reference for config_intr
| * e7398f3e45 ARM: dts: imx1: Fix sram node
| * 7721a55c02 ARM: dts: imx27: Fix sram node
| * 8a0285ed7e ARM: dts: imx: Use flash@0,0 pattern
| * 8953b37bb1 ARM: dts: imx25/27-eukrea: Fix RTC node name
| * 1acdaf9f29 ARM: dts: rockchip: fix rk3036 hdmi ports node
| * 574dcd3126 wifi: wfx: fix possible NULL pointer dereference in wfx_set_mfp_ap()
| * 5a44a664ab bpf: Set uattr->batch.count as zero before batched update or deletion
| * 7719e56b20 scsi: libfc: Fix up timeout error in fc_fcp_rec_error()
| * 73fe92ddf9 scsi: libfc: Don't schedule abort twice
| * d6d6fe4bb1 bpf: Check rcu_read_lock_trace_held() before calling bpf map helpers
| * c07965d1a7 wifi: ath11k: fix race due to setting ATH11K_FLAG_EXT_IRQ_ENABLED too early
| * 25c6f49ef5 wifi: ath9k: Fix potential array-index-out-of-bounds read in ath9k_htc_txstatus()
| * db30f469ae ARM: dts: imx7s: Fix nand-controller #size-cells
| * 6fa750d62f ARM: dts: imx7s: Fix lcdif compatible
| * c9c2a35820 ARM: dts: imx7d: Fix coresight funnel ports
| * 89fdf0a2c7 scsi: arcmsr: Support new PCI device IDs 1883 and 1886
| * 61c859bd66 scsi: mpi3mr: Add PCI checks where SAS5116 diverges from SAS4116
| * 5c4cbec510 net: usb: ax88179_178a: avoid two consecutive device resets
| * cd4cdad9bd bonding: return -ENOMEM instead of BUG in alb_upper_dev_walk
| * c0d5a69322 PCI: Add no PM reset quirk for NVIDIA Spectrum devices
| * 04dcef4a78 scsi: lpfc: Fix possible file string name overflow when updating firmware
| * c0a96adce2 soc: xilinx: fix unhandled SGI warning message
| * 01946c3c83 soc: xilinx: Fix for call trace due to the usage of smp_processor_id()
| * fd937767d5 selftests/bpf: Fix issues in setup_classid_environment()
| * f58cfb63e4 wifi: rt2x00: correct wrong BBP register in RxDCOC calibration
| * ad0e7bbc0b selftests/bpf: Fix pyperf180 compilation failure with clang18
| * 76ab331d6d selftests/bpf: satisfy compiler by having explicit return in btf test
| * 739b3ccd94 wifi: rt2x00: restart beacon queue when hardware reset
| * 6d2cbf517d ext4: avoid online resizing failures due to oversized flex bg
| * dd10f82ece ext4: remove unnecessary check from alloc_flex_gd()
| * 60292a12a0 ext4: unify the type of flexbg_size to unsigned int
| * 069ede0475 ext4: fix inconsistent between segment fstrim and full fstrim
| * 80cab9dad5 ecryptfs: Reject casefold directory inodes
| * e8ca3e7330 SUNRPC: Fix a suspicious RCU usage warning
| * 0671f42a9c KVM: s390: fix setting of fpc register
| * 7a4d6481fb s390/ptrace: handle setting of fpc register correctly
| * 08f65c9067 s390/vfio-ap: fix sysfs status attribute for AP queue devices
| * d6c8d8ab76 arch: consolidate arch_irq_work_raise prototypes
| * 3537f92cd2 jfs: fix array-index-out-of-bounds in diNewExt
| * b03d76cc66 rxrpc_find_service_conn_rcu: fix the usage of read_seqbegin_or_lock()
| * ea4eb77c53 afs: fix the usage of read_seqbegin_or_lock() in afs_find_server*()
| * eef7c4cd98 afs: fix the usage of read_seqbegin_or_lock() in afs_lookup_volume_rcu()
| * 91256fcd57 crypto: stm32/crc32 - fix parsing list of devices
| * e0e78522b4 erofs: fix ztailpacking for subpage compressed blocks
| * 6c7bdb97d4 crypto: octeontx2 - Fix cptvf driver cleanup
| * 75b0f71b26 pstore/ram: Fix crash when setting number of cpus to an odd number
| * 32e8f2d955 jfs: fix uaf in jfs_evict_inode
| * 70780914cb jfs: fix array-index-out-of-bounds in dbAdjTree
| * cab0c265ba jfs: fix slab-out-of-bounds Read in dtSearch
| * e4cbc857d7 UBSAN: array-index-out-of-bounds in dtSplitRoot
| * 42f433785f FS:JFS:UBSAN:array-index-out-of-bounds in dbAdjTree
| * 185d97e5be ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events
| * 31569995fc PM / devfreq: Synchronize devfreq_monitor_[start/stop]
| * 7633b7a036 ACPI: NUMA: Fix the logic of getting the fake_pxm value
| * 33650372e3 ACPI: extlog: fix NULL pointer dereference check
| * 431c1a4921 PNP: ACPI: fix fortify warning
| * 81eb8b56e7 ACPI: video: Add quirk for the Colorful X15 AT 23 Laptop
| * 4d4e06eaa2 audit: Send netlink ACK before setting connection in auditd_set
| * 3430936a01 regulator: core: Only increment use_count when enable_count changes
| * b3ae38966d debugobjects: Stop accessing objects after releasing hash bucket lock
| * 74ec093dba perf/core: Fix narrow startup race when creating the perf nr_addr_filters sysfs file
| * d67e43be0e x86/mce: Mark fatal MCE's page as poison to avoid panic in the kdump kernel
| * abd26515d4 powerpc/lib: Validate size for vector operations
| * 0be5614f26 powerpc: pmd_move_must_withdraw() is only needed for CONFIG_TRANSPARENT_HUGEPAGE
| * d4908b3431 x86/boot: Ignore NMIs during very early boot
| * a6fd14db75 powerpc/64s: Fix CONFIG_NUMA=n build due to create_section_mapping()
| * cf3256c431 powerpc/mm: Fix build failures due to arch_reserved_kernel_pages()
| * 7ad4b2a6b2 powerpc: Fix build error due to is_valid_bugaddr()
| * d87d9a23a1 drivers/perf: pmuv3: don't expose SW_INCR event in sysfs
| * 4431284f4a arm64: irq: set the correct node for VMAP stack
| * d482d61025 powerpc/mm: Fix null-pointer dereference in pgtable_cache_add
| * 9e5c37e0fa asm-generic: make sparse happy with odd-sized put_unaligned_*()
* | f28d3f0d96 Merge branch 'android14-6.1' into branch 'android14-6.1-lts'
* | 7a8376be74 ANDROID: use reserved cpucaps for new capability
* | c801066eca Revert "mm/sparsemem: fix race in accessing memory_section->usage"
* | 2dbddbe358 Merge 6.1.76 into android-6.1
|\|
| * e5c3b988b8 Linux 6.1.76
| * d7dc6a8604 net/mlx5e: Handle hardware IPsec limits events
| * e90c7d26ca serial: core: fix kernel-doc for uart_port_unlock_irqrestore()
| * c02d3872c8 x86/entry/ia32: Ensure s32 is sign extended to s64
| * cf0b4ba4b0 tick/sched: Preserve number of idle sleeps across CPU hotplug events
| * e333bbb557 mips: Call lose_fpu(0) before initializing fcr31 in mips_set_personality_nan
| * ec745eeff4 cxl/region:Fix overflow issue in alloc_hpa()
| * 1111abee59 MIPS: lantiq: register smp_ops on non-smp platforms
| * b086f6d979 spi: fix finalize message on error return
| * 598af91f62 spi: bcm-qspi: fix SFDP BFPT read by usig mspi read
| * a2fa86e2bb drm/bridge: anx7625: Ensure bridge is suspended in disable()
| * 9564767b67 block: Move checking GENHD_FL_NO_PART to bdev_add_partition()
| * 4b84411165 gpio: eic-sprd: Clear interrupt after set the interrupt type
| * 23cf4cf429 drm/exynos: gsc: minor fix for loop iteration in gsc_runtime_resume
| * ba930885bf drm/exynos: fix accidental on-stack copy of exynos_drm_plane
| * c1cd4f9da5 drm/bridge: parade-ps8640: Make sure we drop the AUX mutex in the error case
| * 6ba690e7f7 drm/bridge: parade-ps8640: Ensure bridge is suspended in .post_disable()
| * 279f1cc562 drm/bridge: sii902x: Fix audio codec unregistration
| * e0f83c234e drm/bridge: sii902x: Fix probing race issue
| * c46f9c7f93 drm/bridge: sii902x: Use devm_regulator_bulk_get_enable()
| * ed555f5b5c drm: panel-simple: add missing bus flags for Tianma tm070jvhg[30/33]
| * 6b7fb2903a drm/bridge: parade-ps8640: Wait for HPD when doing an AUX transfer
| * f9a4c401bf Revert "powerpc/64s: Increase default stack size to 32KB"
| * ec5e692cba drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing
| * f91c77d2c3 btrfs: zoned: optimize hint byte for zoned allocator
| * 4c45143447 btrfs: zoned: factor out prepare_allocation_zoned()
| * b168029d67 serial: sc16is7xx: fix unconditional activation of THRI interrupt
| * 49d733c4bb serial: sc16is7xx: Use port lock wrappers
| * 4fd9a02121 serial: core: Provide port lock wrappers
| * e11dea8f50 dlm: use kernel_connect() and kernel_bind()
| * fd7c2ffa0e ARM: dts: qcom: sdx55: fix USB SS wakeup
| * ecf87621b4 ARM: dts: qcom: sdx55: fix USB DP/DM HS PHY interrupts
| * 34d2c909c7 ARM: dts: qcom: sdx55: fix pdc '#interrupt-cells'
| * bba1320ef2 ARM: dts: samsung: exynos4210-i9100: Unconditionally enable LDO12
| * 46cd7ef69f ARM: dts: qcom: sdx55: fix USB wakeup interrupt types
| * b87a1229d8 pipe: wakeup wr_wait after setting max_usage
| * 6f5c4aaddd fs/pipe: move check to pipe_has_watch_queue()
| * 28f010dc50 thermal: intel: hfi: Add syscore callbacks for system-wide PM
| * b2517d1412 thermal: intel: hfi: Disable an HFI instance when all its CPUs go offline
| * a8056e821c thermal: intel: hfi: Refactor enabling code into helper functions
| * e1c9d32c98 PM: sleep: Fix possible deadlocks in core system-wide PM code
| * a9dbf8ca31 PM: core: Remove unnecessary (void *) conversions
| * ea3357c6cf bus: mhi: ep: Do not allocate event ring element on stack
| * 512fc4d735 media: ov13b10: Enable runtime PM before registering async sub-device
| * a14c2431e5 media: ov13b10: Support device probe in non-zero ACPI D state
| * 33bf23c994 erofs: fix lz4 inplace decompression
| * 2197389e1a erofs: get rid of the remaining kmap_atomic()
| * 471ab2e8b7 drm/amdgpu/pm: Fix the power source flag error
| * b4cbd01832 drm/amd/display: Port DENTIST hang and TDR fixes to OTG disable W/A
| * 7960f14fca drm/bridge: nxp-ptn3460: simplify some error checking
| * 6341140b04 platform/x86: intel-uncore-freq: Fix types in sysfs callbacks
| * 85d16c03dd drm/amd/display: Disable PSR-SU on Parade 0803 TCON again
| * b5fcb340b7 drm/tidss: Fix atomic_flush check
| * 2a81e844d1 drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking
| * 62f2e79cf9 drm: Don't unref the same fb many times by mistake due to deadlock handling
| * 635e996e6e cpufreq: intel_pstate: Refine computation of P-state for given frequency
| * 242996f500 gpiolib: acpi: Ignore touchpad wakeup on GPD G1619-04
| * 6c495c84e2 xfs: read only mounts with fsopen mount API are busted
| * 7f95f6997f firmware: arm_scmi: Check mailbox/SMT channel for consistency
| * 2c939c74ef ksmbd: fix global oob in ksmbd_nl_policy
| * 2841631a03 platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe
| * 8e34430e33 netfilter: nf_tables: reject QUEUE/DROP verdict parameters
| * af149a4689 netfilter: nft_chain_filter: handle NETDEV_UNREGISTER for inet/ingress basechain
| * 5e7d8ddf2a hv_netvsc: Calculate correct ring size when PAGE_SIZE is not 4 Kbytes
| * aa2cc93639 wifi: iwlwifi: fix a memory corruption
| * dcc54a54de exec: Fix error handling in begin_new_exec()
| * 4646445756 rbd: don't move requests to the running list on errors
| * 6e6bca99e8 btrfs: don't abort filesystem when attempting to snapshot deleted subvolume
| * 52e02f26d0 btrfs: defrag: reject unknown flags of btrfs_ioctl_defrag_range_args
| * 86aff7c5f7 btrfs: don't warn if discard range is not aligned to sector
| * b60f748a2f btrfs: tree-checker: fix inline ref size in error messages
| * c91c247be4 btrfs: ref-verify: free ref cache before clearing mount opt
| * 9ebd514fbd btrfs: avoid copying BTRFS_ROOT_SUBVOL_DEAD flag to snapshot of subvolume being deleted
| * d9c54763e5 nbd: always initialize struct msghdr completely
| * 0a5a083c2b net: fec: fix the unhandled context fault from smmu
| * 5b1086d226 fjes: fix memleaks in fjes_hw_setup
| * 4b4dcb3f42 selftests: netdevsim: fix the udp_tunnel_nic test
| * cec65f09c4 net: mvpp2: clear BM pool before initialization
| * acb6eaf2ea net: stmmac: Wait a bit for the reset to take effect
| * 67ee37360d netfilter: nf_tables: validate NFPROTO_* family
| * ed5b62bbd4 netfilter: nf_tables: restrict anonymous set and map names to 16 bytes
| * c25d7922ef btrfs: fix race between reading a directory and adding entries to it
| * fd968e683b btrfs: refresh dir last index during a rewinddir(3) call
| * a045b6b197 btrfs: set last dir index to the current last index when opening dir
| * 2aa515b5b5 btrfs: fix infinite directory reads
| * bc6e242bb7 netfilter: nft_limit: reject configurations that cause integer overflow
| * c817f5c016 rcu: Defer RCU kthreads wakeup when CPU is dying
| * b2fa86b2ac net/mlx5e: fix a potential double-free in fs_any_create_groups
| * 42876db001 net/mlx5e: fix a double-free in arfs_create_groups
| * 890881d10f net/mlx5e: Allow software parsing when IPsec crypto is enabled
| * 62ce16005e net/mlx5: Use mlx5 device constant for selecting CQ period mode for ASO
| * 75d9ed4930 net/mlx5: DR, Can't go to uplink vport on RX rule
| * e54aedd4d0 net/mlx5: DR, Use the right GVMI number for drop action
| * f11792c389 ipv6: init the accept_queue's spinlocks in inet6_create
| * de061604f8 netlink: fix potential sleeping issue in mqueue_flush_file
| * 90fba981ca tcp: Add memory barrier to tcp_push()
| * ab49164c60 afs: Hide silly-rename files from userspace
| * f4f7e696db tracing: Ensure visibility when inserting an element into tracing_map
| * 82a9bc343b netfs, fscache: Prevent Oops in fscache_put_cache()
| * 71024928b3 net/rds: Fix UBSAN: array-index-out-of-bounds in rds_cmsg_recv
| * fcb0b4b6bc net: micrel: Fix PTP frame parsing for lan8814
| * 7a581f597a tun: add missing rx stats accounting in tun_xdp_act
| * 41e7decdad tun: fix missing dropped counter in tun_xdp_act
| * a2232f29bf net: fix removing a namespace with conflicting altnames
| * 6646145be9 udp: fix busy polling
| * 660c3053d9 llc: Drop support for ETH_P_TR_802_2.
| * 6d53b813ff llc: make llc_ui_sendmsg() more robust against bonding changes
| * c5e7fa4f9d vlan: skip nested type that is not IFLA_VLAN_QOS_MAPPING
| * 4ee0613868 bnxt_en: Wait for FLR to complete during probe
| * b1e0a68a0c tcp: make sure init the accept_queue's spinlocks once
| * 6994dba063 net/smc: fix illegal rmb_desc access in SMC-D connection dump
| * 49aaeb8c53 wifi: mac80211: fix potential sta-link leak
| * b59e08c872 drm/amd/display: pbn_div need be updated for hotplug event
| * a5046e5eb8 Revert "drm/amd: Enable PCIe PME from D3"
| * b1c06ee2d1 ksmbd: Add missing set_freezable() for freezable kthread
| * 844dfef316 ksmbd: send lease break notification on FILE_RENAME_INFORMATION
| * de603a52af ksmbd: don't increment epoch if current state and request state are same
| * e61fc656ce ksmbd: fix potential circular locking issue in smb2_set_ea()
| * 8fa25e67fd ksmbd: set v2 lease version on lease upgrade
| * 3101b9fd74 mm: page_alloc: unreserve highatomic page blocks before oom
| * 1d15da5601 LoongArch/smp: Call rcutree_report_cpu_starting() earlier
| * 0e0653d53a serial: sc16is7xx: improve do/while loop in sc16is7xx_irq()
| * 80beb4424d serial: sc16is7xx: remove obsolete loop in sc16is7xx_port_irq()
| * de8e41f78f serial: sc16is7xx: fix invalid sc16is7xx_lines bitfield in case of probe error
| * 416b10d281 serial: sc16is7xx: convert from _raw_ to _noinc_ regmap functions for FIFO
| * 4b068e55bf serial: sc16is7xx: change EFR lock to operate on each channels
| * f6c58552a8 serial: sc16is7xx: remove unused line structure member
| * 6dca71e6e1 serial: sc16is7xx: remove global regmap from struct sc16is7xx_port
| * 9bcb019aee serial: sc16is7xx: remove wasteful static buffer in sc16is7xx_regmap_name()
| * 45ec1b7acc serial: sc16is7xx: improve regmap debugfs by using one regmap per port
| * 362be9ec32 rename(): fix the locking of subdirectories
| * 68ed9e3332 mm/sparsemem: fix race in accessing memory_section->usage
| * 367a47ef4c mm/rmap: fix misplaced parenthesis of a likely()
| * 5d01dcda81 ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path
| * 13a6ceeb5b nouveau/vmm: don't set addr on the fail path to avoid warning
| * 40c23b5e07 rtc: Extend timeout for waiting for UIP to clear to 1s
| * 7971389316 rtc: Add support for configuring the UIP timeout for RTC reads
| * fd1f5396be rtc: mc146818-lib: Adjust failure return code for mc146818_get_time()
| * 911e7206c8 rtc: Adjust failure return code for cmos_set_alarm()
| * aca1ea92f5 rtc: cmos: Use ACPI alarm for non-Intel x86 systems too
| * 2b1dc0666e arm64: Rename ARM64_WORKAROUND_2966298
| * 9fec4db7ff media: mtk-jpeg: Fix use after free bug due to error path handling in mtk_jpeg_dec_device_run
| * a33fbb8b6d mmc: mmc_spi: remove custom DMA mapped buffers
| * c4edcd134b mmc: core: Use mrq.sbc in close-ended ffu
| * d78fac87c6 media: videobuf2-dma-sg: fix vmap callback
| * c160f2ac85 scripts/get_abi: fix source path leak
| * efe3ec7066 docs: kernel_abi.py: fix command injection
| * c014490c0b lsm: new security_file_ioctl_compat() hook
| * 2647770eac arm64: dts: qcom: sm8150: fix USB DP/DM HS PHY interrupts
| * 0168530568 arm64: dts: qcom: sdm845: fix USB DP/DM HS PHY interrupts
| * 69ee126bba arm64: dts: qcom: sc7280: fix usb_1 wakeup interrupt types
| * eec1f92949 arm64: dts: qcom: sm8150: fix USB wakeup interrupt types
| * 595d35c6ae arm64: dts: qcom: sdm845: fix USB wakeup interrupt types
| * 8191aa4146 arm64: dts: qcom: sc7180: fix USB wakeup interrupt types
| * 9f29c5d2bf scsi: ufs: core: Remove the ufshcd_hba_exit() call from ufshcd_async_scan()
| * 2ab32986a0 dmaengine: fix NULL pointer in channel unregistration function
| * 0c8ada71d9 iio: adc: ad7091r: Enable internal vref if external vref is not supplied
| * fcf8e37152 async: Introduce async_schedule_dev_nocall()
| * 6e8aab4de7 async: Split async_schedule_node_domain()
| * b37c1b0db1 parisc/power: Fix power soft-off button emulation on qemu
| * 71602d95ae parisc/firmware: Fix F-extend for PDC addresses
| * 0b093176fd bus: mhi: host: Add spinlock to protect WP access when queueing TREs
| * 3c5ec66b4b bus: mhi: host: Drop chan lock before queuing buffers
| * 2df39ac8f8 bus: mhi: host: Add alignment check for event ring read pointer
| * 574f69b46b mips: Fix max_mapnr being uninitialized on early stages
| * 6690a0acbb s390/vfio-ap: let on_scan_complete() callback filter matrix and update guest's APCB
| * baf3fcb268 s390/vfio-ap: loop over the shadow APCB when filtering guest's AP configuration
| * d6b8d034b5 s390/vfio-ap: always filter entire AP matrix
| * 51a7c02bc7 media: ov9734: Enable runtime PM before registering async sub-device
| * f4bb1d5daf rpmsg: virtio: Free driver_override when rpmsg_remove()
| * e8757cd139 media: imx355: Enable runtime PM before registering async sub-device
| * 8a7729cda2 PM / devfreq: Fix buffer overflow in trans_stat_show
| * f4518de40a s390/vfio-ap: unpin pages on gisc registration failure
| * dbc9a791a7 crypto: s390/aes - Fix buffer overread in CTR mode
| * aa8aa16ed9 hwrng: core - Fix page fault dead lock on mmap-ed hwrng
| * 3a081586c7 PM: hibernate: Enforce ordering during image compression/decompression
| * 680eb0a993 crypto: api - Disallow identical driver names
| * 562850a008 btrfs: sysfs: validate scrub_speed_max value
| * 29e2da3eab OPP: Pass rounded rate to _set_opp()
| * 4b5f8a187f arm64: properly install vmlinuz.efi
| * 852b6b2a2f ext4: allow for the last group to be marked as trimmed
| * 137568aa54 iio: adc: ad7091r: Allow users to configure device events
| * 6f57121e9c iio: adc: ad7091r: Set alert bit in config register
| * fafda9f08a Revert "nSVM: Check for reserved encodings of TLB_CONTROL in nested VMCB"
| * c519a9054b usb: dwc3: gadget: Handle EP0 request dequeuing properly
| * c8fe8ce07f usb: dwc3: gadget: Queue PM runtime idle on disconnect event
| * ce27046883 usb: dwc3: gadget: Refactor EP0 forced stall/restart into a separate API
* 0eac7b614d Merge branch 'android14-6.1' into branch 'android14-6.1-lts'
* 63040ce8e9 Merge branch 'android14-6.1' into branch 'android14-6.1-lts'
* 50fe3d2012 ANDROID: Add symbols for IIO SCMI module
* e666b8755f ANDROID: Update symbols list for open-dice.ko

Change-Id: Icb970da9bfba44d188465ce8c8148858a4a2fb1a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-05-30 15:23:39 +00:00
Carlos Llamas
a6358098da ANDROID: binder: fix KMI-break due to alloc->lock
Wrap 'struct binder_proc' inside 'struct binder_proc_wrap' to add the
alloc->lock equivalent without breaking the KMI. Also, add convenient
apis to access/modify this new spinlock.

Without this patch, the following KMI issues show up:

  type 'struct binder_proc' changed
    byte size changed from 616 to 576

  type 'struct binder_alloc' changed
    byte size changed from 152 to 112
    member 'spinlock_t lock' was added
    member 'struct mutex mutex' was removed

Bug: 254650075
Bug: 319778300
Change-Id: Ic31dc39fb82800a3e47be10a7873cd210f7b60be
Signed-off-by: Carlos Llamas <cmllamas@google.com>
[cmllamas: fixed trivial conflicts]
2024-05-29 20:51:37 +00:00
Carlos Llamas
1c5fb0ebd8 ANDROID: binder: fix ptrdiff_t printk-format issue
The correct printk format specifier when calculating buffer offsets
should be "%tx" as it is a pointer difference (a.k.a ptrdiff_t). This
fixes some W=1 build warnings reported by the kernel test robot.

Bug: 329799092
Fixes: 63f7ddea2e48 ("ANDROID: binder: fix KMI-break due to address type change")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401100511.A4BKMwoq-lkp@intel.com/
Change-Id: Iaa87433897b507c47fe8601464445cb6de4b61db
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-05-29 20:51:37 +00:00
Carlos Llamas
d30de4c7b0 ANDROID: binder: fix KMI-break due to address type change
In commit ("binder: keep vma addresses type as unsigned long") the vma
address type in 'struct binder_alloc' and 'struct binder_buffer' is
changed from 'void __user *' to 'unsigned long'.

This triggers the following KMI issues:

  type 'struct binder_buffer' changed
    member changed from 'void* user_data' to 'unsigned long user_data'
      type changed from 'void*' to 'unsigned long'

  type 'struct binder_alloc' changed
    member changed from 'void* buffer' to 'unsigned long buffer'
      type changed from 'void*' to 'unsigned long'

This offending commit is being backported as part of a larger patchset
from upstream in [1]. Lets fix these issues by doing a partial revert
that restores the original types and casts to an integer type where
necessary.

Note this approach is preferred over dropping the single KMI-breaking
patch from the backport, as this would have created non-trivial merge
conflicts in the subsequent cherry-picks.

Bug: 254650075
Bug: 319778300
Link: https://lore.kernel.org/all/20231201172212.1813387-1-cmllamas@google.com/ [1]
Change-Id: Ief9de717d0f34642f5954ffa2e306075a5b4e02e
Signed-off-by: Carlos Llamas <cmllamas@google.com>
[cmllamas: fixed trivial conflicts]
2024-05-29 20:51:37 +00:00
Carlos Llamas
81054a4507 Reapply "ANDROID: vendor_hooks: Add hook for binder_detect_low_async_space"
This reverts commit 637c8e0d372f1dfff53337a5db89f772577828d7.

Also squash commit db91c5d31a ("ANDROID: vendor_hook: rename the the
name of hooks"), which fixes the length of the vendor hook's name.
Rework the error return for a goto as this has been refactor too.
Finally, also fix spaces vs tabs.

Change-Id: I22c495eb81237c51c0f9f4d4f9f4f1cf0c8438a8
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-05-29 20:51:37 +00:00
Carlos Llamas
7e855d1492 Reapply "ANDROID: Add vendor hooks for binder perf tuning"
This reverts commit eeb899e9f54bef5286fd5044db481ecc01e417b4.

Change-Id: I810727a6872c16ccb484023bfbc587daca8a2515
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-05-29 20:51:37 +00:00
Carlos Llamas
a091f9709e UPSTREAM: binder: switch alloc->mutex to spinlock_t
The alloc->mutex is a highly contended lock that causes performance
issues on Android devices. When a low-priority task is given this lock
and it sleeps, it becomes difficult for the task to wake up and complete
its work. This delays other tasks that are also waiting on the mutex.

The problem gets worse when there is memory pressure in the system,
because this increases the contention on the alloc->mutex while the
shrinker reclaims binder pages.

Switching to a spinlock helps to keep the waiters running and avoids the
overhead of waking up tasks. This significantly improves the transaction
latency when the problematic scenario occurs.

The performance impact of this patchset was measured by stress-testing
the binder alloc contention. In this test, several clients of different
priorities send thousands of transactions of different sizes to a single
server. In parallel, pages get reclaimed using the shinker's debugfs.

The test was run on a Pixel 8, Pixel 6 and qemu machine. The results
were similar on all three devices:

after:
  | sched  | prio | average | max       | min     |
  |--------+------+---------+-----------+---------|
  | fifo   |   99 | 0.135ms |   1.197ms | 0.022ms |
  | fifo   |   01 | 0.136ms |   5.232ms | 0.018ms |
  | other  |  -20 | 0.180ms |   7.403ms | 0.019ms |
  | other  |   19 | 0.241ms |  58.094ms | 0.018ms |

before:
  | sched  | prio | average | max       | min     |
  |--------+------+---------+-----------+---------|
  | fifo   |   99 | 0.350ms | 248.730ms | 0.020ms |
  | fifo   |   01 | 0.357ms | 248.817ms | 0.024ms |
  | other  |  -20 | 0.399ms | 249.906ms | 0.020ms |
  | other  |   19 | 0.477ms | 297.756ms | 0.022ms |

The key metrics above are the average and max latencies (wall time).
These improvements should roughly translate to p95-p99 latencies on real
workloads. The response time is up to 200x faster in these scenarios and
there is no penalty in the regular path.

Note that it is only possible to convert this lock after a series of
changes made by previous patches. These mainly include refactoring the
sections that might_sleep() and changing the locking order with the
mmap_lock amongst others.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20231201172212.1813387-29-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 254650075
(cherry picked from commit 7710e2cca32e7f3958480e8bd44f50e29d0c2509)
Change-Id: I67121be071d5f072ac0e5eb719c95c0f1dee5eb5
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-05-29 20:51:37 +00:00
Carlos Llamas
a4abaacdab UPSTREAM: binder: reverse locking order in shrinker callback
The locking order currently requires the alloc->mutex to be acquired
first followed by the mmap lock. However, the alloc->mutex is converted
into a spinlock in subsequent commits so the order needs to be reversed
to avoid nesting the sleeping mmap lock under the spinlock.

The shrinker's callback binder_alloc_free_page() is the only place that
needs to be reordered since other functions have been refactored and no
longer nest these locks.

Some minor cosmetic changes are also included in this patch.

Signed-off-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20231201172212.1813387-28-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 254650075
(cherry picked from commit e50f4e6cc9bfaca655d3b6a3506d27cf2caa1d40)
Change-Id: I7f7501945a477ac5571082a5dd2a7934f484b8ab
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-05-29 20:51:37 +00:00
Carlos Llamas
112ca28d26 UPSTREAM: binder: avoid user addresses in debug logs
Prefer logging vma offsets instead of addresses or simply drop the debug
log altogether if not useful. Note this covers the instances affected by
the switch to store addresses as unsigned long. However, there are other
sections in the driver that could do the same.

Signed-off-by: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20231201172212.1813387-27-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 254650075
(cherry picked from commit 162c79731448a5a052e93af7753df579dfe0bf7a)
Change-Id: I92b7f409e45d9006492d56302e911ccdd8efc950
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-05-29 20:51:37 +00:00
Carlos Llamas
0402339efb UPSTREAM: binder: refactor binder_delete_free_buffer()
Skip the freelist call immediately as needed, instead of continuing the
pointless checks. Also, drop the debug logs that we don't really need.

Signed-off-by: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20231201172212.1813387-26-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 254650075
(cherry picked from commit f07b83a48e944c8a1cc1e9f6703fae5e34df2ba4)
Change-Id: I035bd6cd5c06ec984cd6eb3c3b53e0958c64df4f
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-05-29 20:51:37 +00:00
Carlos Llamas
aacaa36eaa UPSTREAM: binder: collapse print_binder_buffer() into caller
The code in print_binder_buffer() is quite small so it can be collapsed
into its single caller binder_alloc_print_allocated().

No functional change in this patch.

Signed-off-by: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20231201172212.1813387-25-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 254650075
(cherry picked from commit 8e905217c4543af9cf1754809846157a7dbbb261)
Change-Id: Ic3e2522b4702e60e09be3d5940f88ec8252ac793
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-05-29 20:51:37 +00:00