Add the '__counted_by()' compiler attribute to the flexible array member
'match[]' to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and
CONFIG_FORTIFY_SOURCE, adjust 'cfg80211_mlme_register_mgmt()' accordingly.
Signed-off-by: Dmitry Antipov
---
net/wi
mbers
are explicitly initialized.
Fixes: 9dba48a6ece7 ("cfg80211: support multicast RX registration")
Signed-off-by: Dmitry Antipov
---
net/wireless/mlme.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
According to 'ath12k_ce_alloc_ring()', annotate flexible array
member 'skb' of 'struct ath12k_ce_ring' with '__counted_by()'
to improve runtime bounds checking when CONFIG_UBSAN_BOUNDS is
enabled. Compile tested only.
Signed-off-by: Dmitry
According to 'ath12k_reg_update_chan_list()', annotate flexible
array member 'channel' of 'struct ath12k_wmi_scan_chan_list_arg'
with '__counted_by()' attribute to improve runtime bounds checking
when CONFIG_UBSAN_BOUNDS is enabled. Compile tested only.
Si
According to 'ath11k_ce_alloc_ring()', annotate flexible array
member 'skb' of 'struct ath11k_ce_ring' with '__counted_by()'
to improve runtime bounds checking when CONFIG_UBSAN_BOUNDS is
enabled. Compile tested only.
Signed-off-by: Dmitry
According to 'ath11k_reg_update_chan_list()', annotate flexible
array member 'ch_param' of 'struct scan_chan_list_params' with
'__counted_by()' attribute to improve runtime bounds checking
when CONFIG_UBSAN_BOUNDS is enabled. Compile tested only.
Signed-off
Correct spelling here and there as suggested by codespell.
Signed-off-by: Dmitry Antipov
---
v2: join the series
---
drivers/net/wireless/ath/ath11k/hal.h | 6 +++---
drivers/net/wireless/ath/ath11k/mac.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net
According to 'ath12k_reg_update_chan_list()', annotate flexible
array member 'channel' of 'struct ath12k_wmi_scan_chan_list_arg'
with '__counted_by()' attribute to improve runtime bounds checking
when CONFIG_UBSAN_BOUNDS is enabled. Compile tested only.
Sig
Accorind to 'ath12k_ce_alloc_ring()', annotate flexible array
member 'skb' of 'struct ath12k_ce_ring' with '__counted_by()'
to improve runtime bounds checking when CONFIG_UBSAN_BOUNDS is
enabled. Compile tested only.
Signed-off-by: Dmitry Antipov
---
According to 'ath11k_reg_update_chan_list()', annotate flexible
array member 'ch_param' of 'struct scan_chan_list_params' with
'__counted_by()' attribute to improve runtime bounds checking
when CONFIG_UBSAN_BOUNDS is enabled. Compile tested only.
Signed-
According to 'ath11k_ce_alloc_ring()', annotate flexible array
member 'skb' of 'struct ath11k_ce_ring' with '__counted_by()'
to improve runtime bounds checking when CONFIG_UBSAN_BOUNDS is
enabled. Compile tested only.
Signed-off-by: Dmitry Antipov
---
scheduled scans")
Fixes: 5ba63533bbf6 ("cfg80211: fix alignment problem in scan request")
Signed-off-by: Dmitry Antipov
---
v2: fix title prefix as noticed by Kalle
---
net/wireless/nl80211.c | 3 ++-
net/wireless/sme.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff
scheduled scans")
Fixes: 5ba63533bbf6 ("cfg80211: fix alignment problem in scan request")
Signed-off-by: Dmitry Antipov
---
net/wireless/nl80211.c | 3 ++-
net/wireless/sme.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/wireless/nl80211.c b/net/wireles
and use convenient
'struct_size()' to simplify the math here and in 'kzalloc()' above.
Fixes: 5ba63533bbf6 ("cfg80211: fix alignment problem in scan request")
Signed-off-by: Dmitry Antipov
---
net/wireless/scan.c | 6 +++---
1 file changed, 3 insertions(+),
According to '__reuseport_alloc()', annotate flexible array member
'sock' of 'struct sock_reuseport' with '__counted_by()' and use
convenient 'struct_size()' to simplify the math used in 'kzalloc()'.
Signed-off-by: Dmitry Antipov
--
According to '__reuseport_alloc()', annotate flexible array member
'sock' of 'struct sock_reuseport' with '__counted_by()' and use
convenient 'struct_size()' to simplify the math used in 'kzalloc()'.
Signed-off-by: Dmitry Antip
According to '__reuseport_alloc()', annotate trailing VLA 'sock' of
'struct sock_reuseport' with '__counted_by()' and use convenient
'struct_size()' to simplify the math used in 'kzalloc()'.
Signed-off-by: Dmitry Antipov
---
include/n
n_channels' early to help '__counted_by()' work as expected.
And the same 'kmalloc()' math adjustment is also applicable.
Signed-off-by: Dmitry Antipov
---
net/wireless/sme.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/net/wireless/sme.c b/
x27;__counted_by' attribute. Briefly
tested with clang 18.1.1 and CONFIG_UBSAN_BOUNDS running iwlwifi.
Signed-off-by: Dmitry Antipov
---
include/net/cfg80211.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index c
scan()'. Although an initialization
of 'hw_scan_req->req.n_channels' introduces some confusion around
allocated vs. used VLA members, this shouldn't be a problem since
everything is correctly adjusted soon in 'ieee80211_prep_hw_scan()'.
Cleanup 'kmalloc()' math
20 matches
Mail list logo