Commit b7187139 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'hardening-v6.9-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull more hardening updates from Kees Cook:

 - CONFIG_MEMCPY_SLOW_KUNIT_TEST is no longer needed (Guenter Roeck)

 - Fix needless UTF-8 character in arch/Kconfig (Liu Song)

 - Improve __counted_by warning message in LKDTM (Nathan Chancellor)

 - Refactor DEFINE_FLEX() for default use of __counted_by

 - Disable signed integer overflow sanitizer on GCC < 8

* tag 'hardening-v6.9-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  lkdtm/bugs: Improve warning message for compilers without counted_by support
  overflow: Change DEFINE_FLEX to take __counted_by member
  Revert "kunit: memcpy: Split slow memcpy tests into MEMCPY_SLOW_KUNIT_TEST"
  arch/Kconfig: eliminate needless UTF-8 character in Kconfig help
  ubsan: Disable signed integer overflow sanitizer on GCC < 8
parents bfa8f186 231dc3f0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -799,7 +799,7 @@ config CFI_CLANG
	depends on ARCH_SUPPORTS_CFI_CLANG
	depends on $(cc-option,-fsanitize=kcfi)
	help
	  This option enables Clangs forward-edge Control Flow Integrity
	  This option enables Clang's forward-edge Control Flow Integrity
	  (CFI) checking, where the compiler injects a runtime check to each
	  indirect function call to ensure the target is a valid function with
	  the correct static type. This restricts possible call targets and
+1 −1
Original line number Diff line number Diff line
@@ -417,7 +417,7 @@ static void lkdtm_FAM_BOUNDS(void)
	pr_err("FAIL: survived access of invalid flexible array member index!\n");

	if (!__has_attribute(__counted_by__))
		pr_warn("This is expected since this %s was built a compiler supporting __counted_by\n",
		pr_warn("This is expected since this %s was built with a compiler that does not support __counted_by\n",
			lkdtm_kernel_info);
	else if (IS_ENABLED(CONFIG_UBSAN_BOUNDS))
		pr_expected_config(CONFIG_UBSAN_TRAP);
+2 −2
Original line number Diff line number Diff line
@@ -956,7 +956,7 @@ ice_vsi_cfg_txq(struct ice_vsi *vsi, struct ice_tx_ring *ring,
int ice_vsi_cfg_single_txq(struct ice_vsi *vsi, struct ice_tx_ring **tx_rings,
			   u16 q_idx)
{
	DEFINE_FLEX(struct ice_aqc_add_tx_qgrp, qg_buf, txqs, 1);
	DEFINE_RAW_FLEX(struct ice_aqc_add_tx_qgrp, qg_buf, txqs, 1);

	if (q_idx >= vsi->alloc_txq || !tx_rings || !tx_rings[q_idx])
		return -EINVAL;
@@ -978,7 +978,7 @@ int ice_vsi_cfg_single_txq(struct ice_vsi *vsi, struct ice_tx_ring **tx_rings,
static int
ice_vsi_cfg_txqs(struct ice_vsi *vsi, struct ice_tx_ring **rings, u16 count)
{
	DEFINE_FLEX(struct ice_aqc_add_tx_qgrp, qg_buf, txqs, 1);
	DEFINE_RAW_FLEX(struct ice_aqc_add_tx_qgrp, qg_buf, txqs, 1);
	int err = 0;
	u16 q_idx;

+2 −2
Original line number Diff line number Diff line
@@ -4695,7 +4695,7 @@ ice_dis_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_queues,
		enum ice_disq_rst_src rst_src, u16 vmvf_num,
		struct ice_sq_cd *cd)
{
	DEFINE_FLEX(struct ice_aqc_dis_txq_item, qg_list, q_id, 1);
	DEFINE_RAW_FLEX(struct ice_aqc_dis_txq_item, qg_list, q_id, 1);
	u16 i, buf_size = __struct_size(qg_list);
	struct ice_q_ctx *q_ctx;
	int status = -ENOENT;
@@ -4917,7 +4917,7 @@ int
ice_dis_vsi_rdma_qset(struct ice_port_info *pi, u16 count, u32 *qset_teid,
		      u16 *q_id)
{
	DEFINE_FLEX(struct ice_aqc_dis_txq_item, qg_list, q_id, 1);
	DEFINE_RAW_FLEX(struct ice_aqc_dis_txq_item, qg_list, q_id, 1);
	u16 qg_size = __struct_size(qg_list);
	struct ice_hw *hw;
	int status = 0;
+4 −4
Original line number Diff line number Diff line
@@ -1938,7 +1938,7 @@ static enum ice_ddp_state ice_init_pkg_info(struct ice_hw *hw,
 */
static enum ice_ddp_state ice_get_pkg_info(struct ice_hw *hw)
{
	DEFINE_FLEX(struct ice_aqc_get_pkg_info_resp, pkg_info, pkg_info,
	DEFINE_RAW_FLEX(struct ice_aqc_get_pkg_info_resp, pkg_info, pkg_info,
			ICE_PKG_CNT);
	u16 size = __struct_size(pkg_info);
	u32 i;
@@ -1990,7 +1990,7 @@ static enum ice_ddp_state ice_chk_pkg_compat(struct ice_hw *hw,
					     struct ice_pkg_hdr *ospkg,
					     struct ice_seg **seg)
{
	DEFINE_FLEX(struct ice_aqc_get_pkg_info_resp, pkg, pkg_info,
	DEFINE_RAW_FLEX(struct ice_aqc_get_pkg_info_resp, pkg, pkg_info,
			ICE_PKG_CNT);
	u16 size = __struct_size(pkg);
	enum ice_ddp_state state;
Loading