From c1dccfb7387b9d943634f9adb3e8f16dc8cd75e6 Mon Sep 17 00:00:00 2001 From: davidhwang Date: Tue, 22 Sep 2026 10:46:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(rmrs):=20=E7=A7=BB=E9=99=A4=20libsmap.so=20?= =?UTF-8?q?=E8=BD=AF=E9=93=BE=E6=8E=A5=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除 rmrs_smap_module.cpp 中对 libsmap.so 是否为符号链接的检测代码 - 通过补丁方式修复 rmrs 模块加载逻辑 - 更新 spec 文件添加该补丁的应用流程 --- ...emove-libsmap.so-symbolic-link-check.patch | 28 +++++++++++++++++++ ubturbo.spec | 11 ++++++-- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 0001-fix-rmrs-remove-libsmap.so-symbolic-link-check.patch diff --git a/0001-fix-rmrs-remove-libsmap.so-symbolic-link-check.patch b/0001-fix-rmrs-remove-libsmap.so-symbolic-link-check.patch new file mode 100644 index 0000000..eacfc80 --- /dev/null +++ b/0001-fix-rmrs-remove-libsmap.so-symbolic-link-check.patch @@ -0,0 +1,28 @@ +From 4db8bece3360a8b56daf3999985980fbd27214c6 Mon Sep 17 00:00:00 2001 +From: davidhwang +Date: Tue, 22 Sep 2026 10:37:25 +0800 +Subject: [PATCH] fix(rmrs): remove libsmap.so symbolic link check + +--- + .../rmrs/src/ubturbo_plugin/common/smap/rmrs_smap_module.cpp | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/plugins/rmrs/src/ubturbo_plugin/common/smap/rmrs_smap_module.cpp b/plugins/rmrs/src/ubturbo_plugin/common/smap/rmrs_smap_module.cpp +index 4bf462c..30c1b65 100644 +--- a/plugins/rmrs/src/ubturbo_plugin/common/smap/rmrs_smap_module.cpp ++++ b/plugins/rmrs/src/ubturbo_plugin/common/smap/rmrs_smap_module.cpp +@@ -32,11 +32,6 @@ SmapQueryProcessConfigFunc SmapModule::smapQueryProcessConfigFunc = nullptr; + + RmrsResult SmapModule::Init() + { +- struct stat sb; +- if (lstat(SMAP_LIBSMAPSO_PATH_RMRS, &sb) == 0 && S_ISLNK(sb.st_mode)) { +- UBTURBO_LOG_ERROR(RMRS_MODULE_NAME, RMRS_MODULE_CODE) << "[RmrsSmapModule] SMAP path is a symbolic link."; +- return RMRS_ERROR; +- } + smapHandle = dlopen(SMAP_LIBSMAPSO_PATH_RMRS, RTLD_LAZY); + if (smapHandle == nullptr) { + UBTURBO_LOG_ERROR(RMRS_MODULE_NAME, RMRS_MODULE_CODE) << "[RmrsSmapModule] Load libsmap.so failed."; +-- +2.54.0 + diff --git a/ubturbo.spec b/ubturbo.spec index 50f671a..1d92171 100644 --- a/ubturbo.spec +++ b/ubturbo.spec @@ -1,5 +1,5 @@ %global version 1.0.0 -%global release_version 1 +%global release_version 2 %global __strip /bin/true %{!?kernel_version:%global kernel_version %(ls -t /lib/modules | head -n 1)} @@ -8,11 +8,12 @@ Name: ubturbo Version: %{version} -Release: %{release_version} +Release: %{release_version}%{?dist} Summary: ubturbo - hierarchical memory management framework License: MulanPSL2 URL: https://gitee.com/openeuler/ubturbo.git Source0: %{name}-%{version}.tar.gz +Patch1: 0001-fix-rmrs-remove-libsmap.so-symbolic-link-check.patch ExclusiveArch: aarch64 # ─── Kernel module build (ubdma / smap_*.ko / ucache.ko) ─── @@ -129,7 +130,7 @@ ucache / smap plugin interfaces. # ============================================================================= %prep -%setup -q -T -b 0 -n %{build_subdir} +%autosetup -n %{name}-%{version} -p1 %build kver="%{kernel_version}" @@ -503,6 +504,10 @@ if [ "$1" = 0 ]; then fi fi %changelog +* Tue Sep 22 2026 davidhwang - 1.0.0-2 +- [Type] bugfix +- [DESC] 改用 patch 修复 rmrs 初始化拦截 libsmap.so 软连接导致加载失败的问题 + * Thu Jul 16 2026 Yu Yuanxun - 1.0.0-1 - [Type] sync - [DESC] update ubturbo \ No newline at end of file -- Gitee