已开启
[Bug]: 共享内存 attach/detach IPC 请求未携带名称 #56
yangqi创建于  14 天前
yangqi
14 天前 创建

安全信息提醒

本 Issue 不包含 API 令牌、密钥、密码、身份验证凭证、私有地址或其他敏感数据。

缺陷描述

ShmIpcCommand::IpcCallShmAttachShmIpcCommand::IpcCallShmDetach 创建 IPC request 后,未将函数入参写入 request 的 name_ 字段,导致服务端处理请求时无法获得目标共享内存名称。

此外,ubsmem_shmem_attachubsmem_shmem_detach 已实现并使用默认可见性导出,但公共头文件 ubs_mem.h 缺少声明,外部调用者无法通过公开接口正常使用。

环境信息

【OS 版本】与 OS 版本无关

【本软件版本】ubs-mem master、openEuler-24.03-LTS-SP4 分支

【依赖软件版本】不适用

【组网信息】不适用

缺陷信息

【问题复现步骤】

  1. 调用 ubsmem_shmem_attachubsmem_shmem_detach,传入目标共享内存名称。
  2. 客户端通过 IpcCallShmAttachIpcCallShmDetach 创建并发送 IPC request。
  3. 服务端读取 request 的 name_ 字段并处理请求。

【实际结果】

IPC request 的 name_ 字段未赋值,服务端无法获得目标共享内存名称;同时公共头文件缺少 attach/detach 接口声明,外部调用者无法通过公开接口正常使用这两个接口。

【期望结果】

IPC request 正确携带调用者传入的共享内存名称;公共头文件声明 attach/detach 接口,外部调用者可以正常编译并调用。

【其他相关附件信息】

无。

【已分析信息】

【验证要求】

  • 两个目标分支的 Release 构建通过。
  • clang-format 检查通过。
  • git diff --check 通过。
likedislike
openeuler-ci-botopeneuler-ci-bot成员
14 天前 将 hlinbo、shw030915、Gao_Victor、qmyyxtl、caowaterman、yangqi12138 设为负责人
openeuler-ci-botopeneuler-ci-bot成员
14 天前 添加了label:sig/sig-UB-ServiceCore
openeuler-ci-bot
openeuler-ci-bot成员
14 天前 评论:

Welcome To openEuler Community

Hey @yangqi12138 , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.

Contact Guide

If you have any questions, please contact the SIG: sig-UB-ServiceCore ,
and any of the maintainers: @Gao_Victor, @caowaterman, @hlinbo, @qmyyxtl, @shw030915 ,
and any of the committers: @deepsleep_mem, @liu1103xwxw .

likedislike
Yyangqi
14 天前 关联了pull request:fix: set shared memory attach and detach names
Yyangqi
14 天前 关联了pull request:fix: set shared memory attach and detach names
Yyangqi
1 天前 修改标题为 “[Bug]: 共享内存 attach/detach IPC 请求未携带名称”,原标题为“共享内存 attach/detach IPC 请求未携带名称”
Yyangqi
1 天前 修改了issue 的描述
Yyangqi
1 天前 添加了label:bug