Commit graph

7420 commits

Author SHA1 Message Date
a2c2b2e29e Revert "battery: sec_battery: export {CURRENT/VOLTAGE}_MAX to sysfs"
This reverts commit 2bda4b9d8f.
2024-12-18 20:58:37 +01:00
Jesse Chan
2bda4b9d8f battery: sec_battery: export {CURRENT/VOLTAGE}_MAX to sysfs
Change-Id: I54c775bb80c2151bdc69ea9fb53a48a34327bbef
2024-12-18 20:00:53 +01:00
Sami Tolvanen
95be6620aa BACKPORT: FROMLIST: arm64: vdso: disable Shadow Call Stack
Shadow stacks are only available in the kernel, so disable SCS
instrumentation for the vDSO.

Bug: 145210207
Change-Id: I6e01b2c7788ba52d3b754b1fbd5bfb908b45741b
(am from https://lore.kernel.org/patchwork/patch/1149061/)
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2024-12-18 19:47:08 +01:00
Tim Zimmermann
1f0634fe2b drivers: net: wireless: scsc: don't delete or deactivate AP interface in slsi_del_station
* This function is meant for cleaning up going from STA to AP mode
* On latest 18.1 builds deleting/deactivating AP interface causes
  hotspot not to work, hostapd starts up and system says hotspot
  is on, but due to a kernel error (vif type isn't set to AP anymore)
  SSID isn't actually broadcasted and clients can't find nor connect
  to the hotspot
* So let's remove this as removing it doesn't seem to have any
  negative consequences but fixes hotspot, also disable an
  ugly warning caused by this which isn't actually a problem

Change-Id: I5a656fd38697b9be09ecdc5f344bc343458aeaaf
2024-12-18 19:46:36 +01:00
75d1ed86e7 Revert "defconfig: a53x*: Nuked a lot (commit history broke a little)"
This reverts commit 0029c23ea7.
2024-12-18 18:44:49 +01:00
78cce1edd9 drivers: samsung: exynos-cpupm.c: Fully nuke cpupm_debug 2024-12-18 18:43:43 +01:00
94813c91ed drivers: samsung: exynos-cpupm.c: Fully nuke cpupm_debug_info 2024-12-18 18:41:51 +01:00
8e2888567b drivers: samsung: exynos-cpupm.c: Add #ifdef CONFIG__EXYNOS_DEBUG_INFO 2024-12-18 18:38:09 +01:00
041f237b67 drivers: samsung: exynos-cpupm.c: Switch from sched_clock to ktime_get 2024-12-18 18:32:21 +01:00
ae83e3b222 drivers: samsung: exynos-cpupm.c: Switch from cpu_clock to sched_clock 2024-12-18 18:31:07 +01:00
146859f714 drivers: samsung: exynos-cpupm.c: Switch from local_clock to ktime_get_ns 2024-12-18 18:30:28 +01:00
4780062b8a drivers: samsung: exynos-ehld.c: Nuke ehld->sjtag_en = dbg_snapshot_get_sjtag_status(); 2024-12-18 18:27:27 +01:00
cb12fcb606 Revert "defconfig: a53x*: Readd CONFIG_EXYNOS_DEBUG_INFO"
This reverts commit 3296330133.
2024-12-18 18:24:47 +01:00
87f1a878dc drivers: samsung: exynos-adv-tracer.c: Switch from local_clock to ktime_get_ns 2024-12-18 18:24:34 +01:00
98936adf87 fs: blkdev.c: Fix a typo 2024-12-18 18:20:04 +01:00
3296330133 defconfig: a53x*: Readd CONFIG_EXYNOS_DEBUG_INFO 2024-12-18 18:15:48 +01:00
3f33f5d093 fs: blkdev.c: Fix build without CONFIG_SDFAT_DEBUG 2024-12-18 18:14:48 +01:00
0029c23ea7 defconfig: a53x*: Nuked a lot (commit history broke a little) 2024-12-18 17:57:28 +01:00
Ksawlii
1831693e5e kernel_build: modules.load: Nuke mfd_s2mu106.ko hl7132_charger.ko 2024-12-18 16:21:14 +01:00
Ksawlii
d2a123efff Revert "BACKPORT: FROMLIST: binder: fix freeze UAF in binder_release_work()"
This reverts commit 5380adeb80.
2024-12-18 15:46:58 +01:00
Ksawlii
d61e735066 Revert "BACKPORT: FROMGIT: binder: fix memleak of proc->delivered_freeze"
This reverts commit 1cf14664be.
2024-12-18 15:46:57 +01:00
Ksawlii
4a640601c9 Revert "BACKPORT: FROMGIT: binder: add delivered_freeze to debugfs output"
This reverts commit 4554485eb2.
2024-12-18 15:46:56 +01:00
Ksawlii
7225849ad5 Revert "tcp: tracking packets with CE marks in BW rate sample"
This reverts commit 33eb09a194.
2024-12-18 15:36:41 +01:00
Ksawlii
1f9b6d5fff Revert "net-tcp_bbr: v2: adjust skb tx.in_flight upon split in tcp_fragment()"
This reverts commit eddb362fbb.
2024-12-18 15:36:35 +01:00
Ksawlii
77303eca0a Revert "tcp: introduce per-route feature RTAX_FEATURE_ECN_LOW"
This reverts commit c57053bdc6.
2024-12-18 15:36:29 +01:00
Ksawlii
b9f262b660 Revert "tcp: add rcv_wnd and plb_rehash to TCP_INFO"
This reverts commit a00aad3a04.
2024-12-18 15:32:40 +01:00
Ksawlii
7905b1f2d0 Revert "net-tcp: add fast_ack_mode=1: skip rwin check in tcp_fast_ack_mode__tcp_ack_snd_check()"
This reverts commit 54113b9ad5.
2024-12-18 15:32:27 +01:00
Ksawlii
c2cfa39ed7 Revert "tcp: export TCPI_OPT_ECN_LOW in tcp_info tcpi_options field"
This reverts commit 62a04f2316.
2024-12-18 15:32:26 +01:00
Ksawlii
bfea72055d Revert "tcp: add accessors to read/set tp->snd_cwnd"
This reverts commit c8a587ff65.
2024-12-18 15:30:18 +01:00
Nahuel Gómez
958fb60b40 configs: use bbr as default tcp cong. algorithm
We already have the BBRv3 patches merged.

Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-18 15:14:17 +01:00
Nahuel Gómez
a6f250c0e8 sched: fair: tune BORE
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-18 15:10:03 +01:00
Nahuel Gómez
46aa3942ce sched: fair: properly call reweight_task for BORE
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-18 15:09:59 +01:00
Masahito S
f299ae0372 5.4 bootup fix: Variable declaration types 2024-12-18 15:09:53 +01:00
Masahito S
0769637133 5.4 compile error fix: ISO C90 forbids mixed declarations and code 2024-12-18 15:09:49 +01:00
Masahito S
30aca2aa4e 5.4 compile error fix: Use SYSCTL_ZERO and SYSCTL_ONE 2024-12-18 15:09:47 +01:00
Masahito S
ff6bc15f2a sched: linux5.4.y-bore5.1.0 2024-12-18 15:09:41 +01:00
Mubashir Adnan Qureshi
d496daa833 tcp: add sysctls for TCP PLB parameters
PLB (Protective Load Balancing) is a host based mechanism for load
balancing across switch links. It leverages congestion signals(e.g. ECN)
from transport layer to randomly change the path of the connection
experiencing congestion. PLB changes the path of the connection by
changing the outgoing IPv6 flow label for IPv6 connections (implemented
in Linux by calling sk_rethink_txhash()). Because of this implementation
mechanism, PLB can currently only work for IPv6 traffic. For more
information, see the SIGCOMM 2022 paper:
  https://doi.org/10.1145/3544216.3544226

This commit adds new sysctl knobs and sets their default values for
TCP PLB.

Signed-off-by: Mubashir Adnan Qureshi <mubashirq@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:08:12 +01:00
Mubashir Adnan Qureshi
f3217ac2c6 tcp: add support for PLB in DCTCP
PLB support is added to TCP DCTCP code. As DCTCP uses ECN as the
congestion signal, PLB also uses ECN to make decisions whether to change
the path or not upon sustained congestion.

Signed-off-by: Mubashir Adnan Qureshi <mubashirq@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:07:57 +01:00
Mubashir Adnan Qureshi
a00aad3a04 tcp: add rcv_wnd and plb_rehash to TCP_INFO
rcv_wnd can be useful to diagnose TCP performance where receiver window
becomes the bottleneck. rehash reports the PLB and timeout triggered
rehash attempts by the TCP connection.

Signed-off-by: Mubashir Adnan Qureshi <mubashirq@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:07:43 +01:00
Eric Dumazet
c8a587ff65 tcp: add accessors to read/set tp->snd_cwnd
We had various bugs over the years with code
breaking the assumption that tp->snd_cwnd is greater
than zero.

Lately, syzbot reported the WARN_ON_ONCE(!tp->prior_cwnd) added
in commit 8b8a321ff72c ("tcp: fix zero cwnd in tcp_cwnd_reduction")
can trigger, and without a repro we would have to spend
considerable time finding the bug.

Instead of complaining too late, we want to catch where
and when tp->snd_cwnd is set to an illegal value.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Suggested-by: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Link: https://lore.kernel.org/r/20220405233538.947344-1-eric.dumazet@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:07:40 +01:00
Yuchung Cheng
33eb09a194 tcp: tracking packets with CE marks in BW rate sample
In order to track CE marks per rate sample (one round trip), TCP needs a
per-skb header field to record the tp->delivered_ce count when the skb
was sent. To make space, we replace the "last_in_flight" field which is
used exclusively for NV congestion control. The stat needed by NV can be
alternatively approximated by existing stats tcp_sock delivered and
mss_cache.

This patch counts the number of packets delivered which have CE marks in
the rate sample, using similar approach of delivery accounting.

Cc: Lawrence Brakmo <brakmo@fb.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Luke Hsiao <lukehsiao@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:07:35 +01:00
Neal Cardwell
0f3a19122b net-tcp_bbr: broaden app-limited rate sample detection
This commit is a bug fix for the Linux TCP app-limited
(application-limited) logic that is used for collecting rate
(bandwidth) samples.

Previously the app-limited logic only looked for "bubbles" of
silence in between application writes, by checking at the start
of each sendmsg. But "bubbles" of silence can also happen before
retransmits: e.g. bubbles can happen between an application write
and a retransmit, or between two retransmits.

Retransmits are triggered by ACKs or timers. So this commit checks
for bubbles of app-limited silence upon ACKs or timers.

Why does this commit check for app-limited state at the start of
ACKs and timer handling? Because at that point we know whether
inflight was fully using the cwnd.  During processing the ACK or
timer event we often change the cwnd; after changing the cwnd we
can't know whether inflight was fully using the old cwnd.

Origin-9xx-SHA1: 3fe9b53291e018407780fb8c356adb5666722cbc
Change-Id: I37221506f5166877c2b110753d39bb0757985e68
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:07:30 +01:00
Neal Cardwell
0aafceb293 net-tcp_bbr: v2: export FLAG_ECE in rate_sample.is_ece
For understanding the relationship between inflight and ECN signals,
to try to find the highest inflight value that has acceptable levels
ECN marking.

Effort: net-tcp_bbr
Origin-9xx-SHA1: 3eba998f2898541406c2666781182200934965a8
Change-Id: I3a964e04cee83e11649a54507043d2dfe769a3b3
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:07:14 +01:00
Neal Cardwell
1970659e8a net-tcp_bbr: v2: introduce ca_ops->skb_marked_lost() CC module callback API
For connections experiencing reordering, RACK can mark packets lost
long after we receive the SACKs/ACKs hinting that the packets were
actually lost.

This means that CC modules cannot easily learn the volume of inflight
data at which packet loss happens by looking at the current inflight
or even the packets in flight when the most recently SACKed packet was
sent. To learn this, CC modules need to know how many packets were in
flight at the time lost packets were sent. This new callback, combined
with TCP_SKB_CB(skb)->tx.in_flight, allows them to learn this.

This also provides a consistent callback that is invoked whether
packets are marked lost upon ACK processing, using the RACK reordering
timer, or at RTO time.

Effort: net-tcp_bbr
Origin-9xx-SHA1: afcbebe3374e4632ac6714d39e4dc8a8455956f4
Change-Id: I54826ab53df636be537e5d3c618a46145d12d51a
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:07:09 +01:00
Neal Cardwell
20cf76b03c net-tcp_bbr: v2: adjust skb tx.in_flight upon merge in tcp_shifted_skb()
When tcp_shifted_skb() updates state as adjacent SACKed skbs are
coalesced, previously the tx.in_flight was not adjusted, so we could
get contradictory state where the skb's recorded pcount was bigger
than the tx.in_flight (the number of segments that were in_flight
after sending the skb).

Normally have a SACKed skb with contradictory pcount/tx.in_flight
would not matter. However, with SACK reneging, the SACKed bit is
removed, and an skb once again becomes eligible for retransmitting,
fragmenting, SACKing, etc. Packetdrill testing verified the following
sequence is possible in a kernel that does not have this commit:

 - skb N is SACKed
 - skb N+1 is SACKed and combined with skb N using tcp_shifted_skb()
   - tcp_shifted_skb() will increase the pcount of prev,
     but leave tx.in_flight as-is
   - so prev skb can have pcount > tx.in_flight
 - RTO, tcp_timeout_mark_lost(), detect reneg,
   remove "SACKed" bit, mark skb N as lost
   - find pcount of skb N is greater than its tx.in_flight

I suspect this issue iw what caused the bbr2_inflight_hi_from_lost_skb():
  WARN_ON_ONCE(inflight_prev < 0)
to fire in production machines using bbr2.

Effort: net-tcp_bbr
Origin-9xx-SHA1: 1a3e997e613d2dcf32b947992882854ebe873715
Change-Id: I1b0b75c27519953430c7db51c6f358f104c7af55
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:07:04 +01:00
Neal Cardwell
eddb362fbb net-tcp_bbr: v2: adjust skb tx.in_flight upon split in tcp_fragment()
When we fragment an skb that has already been sent, we need to update
the tx.in_flight for the first skb in the resulting pair ("buff").

Because we were not updating the tx.in_flight, the tx.in_flight value
was inconsistent with the pcount of the "buff" skb (tx.in_flight would
be too high). That meant that if the "buff" skb was lost, then
bbr2_inflight_hi_from_lost_skb() would calculate an inflight_hi value
that is too high. This could result in longer queues and higher packet
loss.

Packetdrill testing verified that without this commit, when the second
half of an skb is SACKed and then later the first half of that skb is
marked lost, the calculated inflight_hi was incorrect.

Effort: net-tcp_bbr
Origin-9xx-SHA1: 385f1ddc610798fab2837f9f372857438b25f874
Origin-9xx-SHA1: a0eb099690af net-tcp_bbr: v2: fix tcp_fragment() tx.in_flight recomputation [prod feb 8 2021; use as a fixup]
Origin-9xx-SHA1: 885503228153ff0c9114e net-tcp_bbr: v2: introduce tcp_skb_tx_in_flight_is_suspicious() helper for warnings
Change-Id: I617f8cab4e9be7a0b8e8d30b047bf8645393354d
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:07:00 +01:00
Yousuk Seung
f1bd4e759f net-tcp: add new ca opts flag TCP_CONG_WANTS_CE_EVENTS
Add a a new ca opts flag TCP_CONG_WANTS_CE_EVENTS that allows a
congestion control module to receive CE events.

Currently congestion control modules have to set the TCP_CONG_NEEDS_ECN
bit in opts flag to receive CE events but this may incur changes in ECN
behavior elsewhere. This patch adds a new bit TCP_CONG_WANTS_CE_EVENTS
that allows congestion control modules to receive CE events
independently of TCP_CONG_NEEDS_ECN.

Effort: net-tcp
Origin-9xx-SHA1: 9f7e14716cde760bc6c67ef8ef7e1ee48501d95b
Change-Id: I2255506985242f376d910c6fd37daabaf4744f24
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:06:57 +01:00
Neal Cardwell
54113b9ad5 net-tcp: add fast_ack_mode=1: skip rwin check in tcp_fast_ack_mode__tcp_ack_snd_check()
Add logic for an experimental TCP connection behavior, enabled with
tp->fast_ack_mode = 1, which disables checking the receive window
before sending an ack in __tcp_ack_snd_check(). If this behavior is
enabled, the data receiver sends an ACK if the amount of data is >
RCV.MSS.

Change-Id: Iaa0a0fd7108221f883137a79d5bfa724f1b096d4
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:06:47 +01:00
Jianfeng Wang
96c42cd35d net-tcp_bbr: v2: inform CC module of losses repaired by TLP probe
Before this commit, when there is a packet loss that creates a sequence
hole that is filled by a TLP loss probe, then tcp_process_tlp_ack()
only informs the congestion control (CC) module via a back-to-back entry
and exit of CWR. But some congestion control modules (e.g. BBR) do not
respond to CWR events.

This commit adds a new CA event with which the core TCP stack notifies
the CC module when a loss is repaired by a TLP. This will allow CC
modules that do not use the CWR mechanism to have a custom handler for
such TLP recoveries.

Effort: net-tcp_bbr
Change-Id: Ieba72332b401b329bff5a641d2b2043a3fb8f632
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:06:40 +01:00
Neal Cardwell
4a3e7b65cd net-tcp_bbr: v2: introduce is_acking_tlp_retrans_seq into rate_sample
Introduce is_acking_tlp_retrans_seq into rate_sample. This bool will
export to the CC module the knowledge of whether the current ACK
matched a TLP retransmit.

Note that when this bool is true, we cannot yet tell (in general) whether
this ACK is for the original or the TLP retransmit.

Effort: net-tcp_bbr
Change-Id: I2e6494332167e75efcbdc99bd5c119034e9c39b4
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-12-18 15:06:33 +01:00