Skip to content

Conversation

@Avenger-285714
Copy link
Member

Enable this option can prevent from ignoring warnings which resulting in problems that difficult to locate and solve.

Also, it encourages to program more regularly and carefully, avoiding potential problems as much as possible.

So enable it on arm64, loongarch and x86.

Enable this option can prevent from ignoring warnings which
resulting in problems that difficult to locate and solve.

Also, it encourages to program more regularly and carefully,
avoiding potential problems as much as possible.

So enable it on arm64, loongarch and x86.

Signed-off-by: WangYuli <wangyuli@uniontech.com>
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • arch/arm64/configs/deepin_arm64_desktop_defconfigarch/loongarch/configs/deepin_loongarch_desktop_defconfig中,CONFIG_BUILD_SALT的值从"arm64-desktop-hwe"更改为"-loongarch-desktop-hwe",确保这一变更与项目需求和配置规范保持一致。
  • arch/x86/configs/deepin_x86_desktop_defconfig中,CONFIG_UAPI_HEADER_TEST被设置为"y",需要确认是否这是预期的配置更改,以及是否有相应的代码实现支持这一选项。
  • 删除了arch/x86/configs/deepin_x86_desktop_defconfig中的CONFIG_MFD_CS42L43_SDWCONFIG_SND_SOC_CS42L43_SDW配置项,需要确保这些选项的移除不会影响现有功能的正常工作。
  • CONFIG_FRAME_WARN的值从1024更改为4096,需要确认这是否符合项目的代码风格指南和性能要求。
  • 新增了CONFIG_STRIP_ASM_SYMSCONFIG_READABLE_ASM配置项,需要确保这些选项的添加是符合项目需求的,并且是否有相应的文档说明其用途。

是否建议立即修改:

  • 是,特别是如果上述更改与项目需求和规范不一致,或者没有相应的代码实现和文档支持新选项。同时,确保配置项的修改是经过充分讨论和一致同意的。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign utsweetyfish for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Avenger-285714 Avenger-285714 merged commit e2426d4 into deepin-community:linux-6.6.y May 7, 2024
lanlanxiyiji pushed a commit that referenced this pull request Dec 22, 2025
Enable this option can prevent from ignoring warnings which
resulting in problems that difficult to locate and solve.

Also, it encourages to program more regularly and carefully,
avoiding potential problems as much as possible.

So enable it on arm64, loongarch and x86.

Signed-off-by: WangYuli <wangyuli@uniontech.com>
(cherry picked from commit e2426d4)
Link: #115
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff pushed a commit to opsiff/UOS-kernel that referenced this pull request Jan 4, 2026
[ Upstream commit 5ace7ef87f059d68b5f50837ef3e8a1a4870c36e ]

The push_nsh() action structure looks like this:

 OVS_ACTION_ATTR_PUSH_NSH(OVS_KEY_ATTR_NSH(OVS_NSH_KEY_ATTR_BASE,...))

The outermost OVS_ACTION_ATTR_PUSH_NSH attribute is OK'ed by the
nla_for_each_nested() inside __ovs_nla_copy_actions().  The innermost
OVS_NSH_KEY_ATTR_BASE/MD1/MD2 are OK'ed by the nla_for_each_nested()
inside nsh_key_put_from_nlattr().  But nothing checks if the attribute
in the middle is OK.  We don't even check that this attribute is the
OVS_KEY_ATTR_NSH.  We just do a double unwrap with a pair of nla_data()
calls - first time directly while calling validate_push_nsh() and the
second time as part of the nla_for_each_nested() macro, which isn't
safe, potentially causing invalid memory access if the size of this
attribute is incorrect.  The failure may not be noticed during
validation due to larger netlink buffer, but cause trouble later during
action execution where the buffer is allocated exactly to the size:

 BUG: KASAN: slab-out-of-bounds in nsh_hdr_from_nlattr+0x1dd/0x6a0 [openvswitch]
 Read of size 184 at addr ffff88816459a634 by task a.out/22624

 CPU: 8 UID: 0 PID: 22624 6.18.0-rc7+ deepin-community#115 PREEMPT(voluntary)
 Call Trace:
  <TASK>
  dump_stack_lvl+0x51/0x70
  print_address_description.constprop.0+0x2c/0x390
  kasan_report+0xdd/0x110
  kasan_check_range+0x35/0x1b0
  __asan_memcpy+0x20/0x60
  nsh_hdr_from_nlattr+0x1dd/0x6a0 [openvswitch]
  push_nsh+0x82/0x120 [openvswitch]
  do_execute_actions+0x1405/0x2840 [openvswitch]
  ovs_execute_actions+0xd5/0x3b0 [openvswitch]
  ovs_packet_cmd_execute+0x949/0xdb0 [openvswitch]
  genl_family_rcv_msg_doit+0x1d6/0x2b0
  genl_family_rcv_msg+0x336/0x580
  genl_rcv_msg+0x9f/0x130
  netlink_rcv_skb+0x11f/0x370
  genl_rcv+0x24/0x40
  netlink_unicast+0x73e/0xaa0
  netlink_sendmsg+0x744/0xbf0
  __sys_sendto+0x3d6/0x450
  do_syscall_64+0x79/0x2c0
  entry_SYSCALL_64_after_hwframe+0x76/0x7e
  </TASK>

Let's add some checks that the attribute is properly sized and it's
the only one attribute inside the action.  Technically, there is no
real reason for OVS_KEY_ATTR_NSH to be there, as we know that we're
pushing an NSH header already, it just creates extra nesting, but
that's how uAPI works today.  So, keeping as it is.

Fixes: b2d0f5d ("openvswitch: enable NSH support")
Reported-by: Junvy Yang <zhuque@tencent.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Acked-by: Eelco Chaudron echaudro@redhat.com
Reviewed-by: Aaron Conole <aconole@redhat.com>
Link: https://patch.msgid.link/20251204105334.900379-1-i.maximets@ovn.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit c999153bfb2d1d9b295b7010d920f2a7c6d7595f)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants