Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rocclr for openSUSE:Factory checked in at 2026-10-29 18:18:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rocclr (Old) and /work/SRC/openSUSE:Factory/.rocclr.new.1255 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rocclr" Thu Oct 29 18:18:23 2026 rev:3 rq:1393644 version:7.2.2 Changes: -------- --- /work/SRC/openSUSE:Factory/rocclr/rocclr.changes 2026-09-21 14:30:10.399024494 +0200 +++ /work/SRC/openSUSE:Factory/.rocclr.new.1255/rocclr.changes 2026-10-29 18:18:34.341229427 +0100 @@ -1,0 +2,9 @@ +Tue Oct 27 20:54:47 UTC 2026 - Jeremy Newton <[email protected]> + +- Cherrypick fix from newer release to fix reported bug + Adds: + 0001-SWDEV-568260-Make-PAL-SetMemAccess-identical-in-beha.patch + 0002-SWDEV-568260-Validate-sub-buffer-coverage-in-hipMemS.patch +- Add 0001-clr-remove-__noinline__-keyword.patch to fix on newer GCC + +------------------------------------------------------------------- New: ---- 0001-SWDEV-568260-Make-PAL-SetMemAccess-identical-in-beha.patch 0001-clr-remove-__noinline__-keyword.patch 0002-SWDEV-568260-Validate-sub-buffer-coverage-in-hipMemS.patch ----------(New B)---------- New: Adds: 0001-SWDEV-568260-Make-PAL-SetMemAccess-identical-in-beha.patch 0002-SWDEV-568260-Validate-sub-buffer-coverage-in-hipMemS.patch New: 0002-SWDEV-568260-Validate-sub-buffer-coverage-in-hipMemS.patch - Add 0001-clr-remove-__noinline__-keyword.patch to fix on newer GCC New: 0001-SWDEV-568260-Make-PAL-SetMemAccess-identical-in-beha.patch 0002-SWDEV-568260-Validate-sub-buffer-coverage-in-hipMemS.patch - Add 0001-clr-remove-__noinline__-keyword.patch to fix on newer GCC ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rocclr.spec ++++++ --- /var/tmp/diff_new_pack.8RZt3B/_old 2026-10-29 18:18:35.493277701 +0100 +++ /var/tmp/diff_new_pack.8RZt3B/_new 2026-10-29 18:18:35.498277911 +0100 @@ -158,6 +158,13 @@ # Fix for reproducible builds Patch4: reproducible.patch +# Backport: https://github.com/ROCm/rocm-systems/pull/2451 +Patch5: 0001-SWDEV-568260-Make-PAL-SetMemAccess-identical-in-beha.patch +Patch6: 0002-SWDEV-568260-Validate-sub-buffer-coverage-in-hipMemS.patch + +# Fix for newer GC:C +Patch7: 0001-clr-remove-__noinline__-keyword.patch + BuildRequires: cmake %if %{with docs} BuildRequires: doxygen ++++++ 0001-SWDEV-568260-Make-PAL-SetMemAccess-identical-in-beha.patch ++++++ >From d59f71d8daa6ce9f76ebfba8d1756f139bb6deb5 Mon Sep 17 00:00:00 2001 From: Marko Arandjelovic <[email protected]> Date: Thu, 8 Jan 2026 14:26:27 +0000 Subject: [PATCH 1/2] SWDEV-568260 - Make PAL SetMemAccess identical in behavior to ROCm --- rocclr/device/pal/paldevice.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/rocclr/device/pal/paldevice.cpp b/rocclr/device/pal/paldevice.cpp index 6de934fb48..e0ea81a893 100644 --- a/rocclr/device/pal/paldevice.cpp +++ b/rocclr/device/pal/paldevice.cpp @@ -2487,6 +2487,10 @@ bool Device::virtualFree(void* addr) { return true; } +static inline address NextSubBufferPtr(const amd::Memory* mem) { + return reinterpret_cast<address>(mem->getSvmPtr()) + mem->getSize(); +} + // ================================================================================================ bool Device::SetMemAccess(void* va_addr, size_t va_size, VmmAccess access_flags, VmmLocationType access_location) { @@ -2502,16 +2506,13 @@ bool Device::SetMemAccess(void* va_addr, size_t va_size, VmmAccess access_flags, LogPrintfError("Virtual address present, but not mapped yet: 0x%x \n", va_addr); } - // Check for valid size. - if (va_size > amd_mem_obj->getSize()) { - LogPrintfError("Given size: %u cannot be greater than mem_size: %u \n", va_size, - amd_mem_obj->getSize()); - return false; + address range_end_address = reinterpret_cast<address>(amd_mem_obj->getSvmPtr()) + va_size; + while (amd_mem_obj && NextSubBufferPtr(amd_mem_obj) <= range_end_address) { + device::Memory* dev_mem_obj = amd_mem_obj->getDeviceMemory(*this); + dev_mem_obj->SetAccess(static_cast<device::Memory::MemAccess>(access_flags)); + amd_mem_obj = amd::MemObjMap::FindMemObj(NextSubBufferPtr(amd_mem_obj)); } - device::Memory* dev_mem_obj = amd_mem_obj->getDeviceMemory(*this); - dev_mem_obj->SetAccess(static_cast<device::Memory::MemAccess>(access_flags)); - return true; } -- 2.56.0 ++++++ 0001-clr-remove-__noinline__-keyword.patch ++++++ >From d199ff6777388dc04b00739a4211acefd0610f7f Mon Sep 17 00:00:00 2001 From: Tom Rix <[email protected]> Date: Tue, 25 Aug 2026 10:17:54 -0700 Subject: [PATCH] clr remove __noinline__ keyword --- hipamd/include/hip/amd_detail/host_defines.h | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/clr/hipamd/include/hip/amd_detail/host_defines.h b/projects/clr/hipamd/include/hip/amd_detail/host_defines.h index f0d1b573753c..eb334d2d8843 100644 --- a/hipamd/include/hip/amd_detail/host_defines.h +++ b/hipamd/include/hip/amd_detail/host_defines.h @@ -353,7 +353,6 @@ typedef __hip_internal::int64_t __hip_int64_t; #define __global__ -#define __noinline__ #define __forceinline__ inline #define __shared__ -- 2.55.0 ++++++ 0002-SWDEV-568260-Validate-sub-buffer-coverage-in-hipMemS.patch ++++++ >From ea9384f6dd835c52e329dcb96c11eb4cad8d86a4 Mon Sep 17 00:00:00 2001 From: Marko Arandjelovic <[email protected]> Date: Wed, 24 Dec 2025 12:39:29 +0000 Subject: [PATCH 2/2] SWDEV-568260 - Validate sub-buffer coverage in hipMemSetAccess --- hipamd/src/hip_vm.cpp | 95 ++++++++++++++---------------- 1 file changed, 44 insertions(+), 51 deletions(-) diff --git a/hipamd/src/hip_vm.cpp b/hipamd/src/hip_vm.cpp index 85a4c9beee..1cbe11060f 100644 --- a/hipamd/src/hip_vm.cpp +++ b/hipamd/src/hip_vm.cpp @@ -350,6 +350,38 @@ hipError_t hipMemRetainAllocationHandle(hipMemGenericAllocationHandle_t* handle, HIP_RETURN(hipSuccess); } +static inline address NextSubBufferPtr(const amd::Memory* mem) { + return reinterpret_cast<address>(mem->getSvmPtr()) + mem->getSize(); +} + +static hipError_t ValidateSubBufferCoverage(amd::Memory* vaddr_sub_buffer_obj, size_t range_size) { + // Validate that the requested range size is within the parent sub-buffer bounds. + if (vaddr_sub_buffer_obj == nullptr || (vaddr_sub_buffer_obj->parent() != nullptr && + range_size > (vaddr_sub_buffer_obj->parent()->getSize() - + vaddr_sub_buffer_obj->getOrigin()))) { + return hipErrorInvalidValue; + } + + address range_end_address = + reinterpret_cast<address>(vaddr_sub_buffer_obj->getSvmPtr()) + range_size; + size_t covered_size = 0; + amd::Memory* current_sub_buffer_obj = vaddr_sub_buffer_obj; + // Validate that the size matches the sum of sub-buffer sizes + while (current_sub_buffer_obj && NextSubBufferPtr(current_sub_buffer_obj) <= range_end_address) { + if (range_size > covered_size && + range_size < covered_size + current_sub_buffer_obj->getSize()) { + return hipErrorInvalidValue; + } + covered_size += current_sub_buffer_obj->getSize(); + current_sub_buffer_obj = amd::MemObjMap::FindMemObj(NextSubBufferPtr(current_sub_buffer_obj)); + } + if (covered_size != range_size) { + return hipErrorInvalidValue; + } + + return hipSuccess; +} + hipError_t hipMemSetAccess(void* ptr, size_t size, const hipMemAccessDesc* desc, size_t count) { HIP_INIT_API(hipMemSetAccess, ptr, size, desc, count); @@ -357,30 +389,12 @@ hipError_t hipMemSetAccess(void* ptr, size_t size, const hipMemAccessDesc* desc, HIP_RETURN(hipErrorInvalidValue); } - // Ensure that the specified size parameter matches the total size of a complete set of - // sub-buffers, disallowing partial sub-buffer coverage - auto mem_object = amd::MemObjMap::FindMemObj(ptr); - hipMemLocationType memLocationType = hipMemLocationTypeNone; - - if (mem_object) { - memLocationType = static_cast<hipMemLocationType>(mem_object->getUserData().locationType); - if (mem_object->parent()) { - size_t accumulated_buffer_size = 0; - for (auto sub_buffer : mem_object->parent()->subBuffers()) { - accumulated_buffer_size += sub_buffer->getSize(); - if (accumulated_buffer_size > size) { - HIP_RETURN(hipErrorInvalidValue); - } else if (accumulated_buffer_size == size) { - break; - } - } - - if (accumulated_buffer_size != size) { - HIP_RETURN(hipErrorInvalidValue); - } - } - } else { - HIP_RETURN(hipErrorInvalidValue); + // Ensure that the specified size parameter matches the sum of a complete set of + // sub-buffers in the range, disallowing partial sub-buffer coverage. + amd::Memory* vaddr_sub_obj = amd::MemObjMap::FindMemObj(ptr); + hipError_t status = ValidateSubBufferCoverage(vaddr_sub_obj, size); + if (status != hipSuccess) { + HIP_RETURN(status); } for (size_t desc_idx = 0; desc_idx < count; ++desc_idx) { @@ -417,36 +431,15 @@ hipError_t hipMemUnmap(void* ptr, size_t size) { HIP_RETURN(hipErrorInvalidValue); } - // Helper lambda to get the next sub-buffer pointer - auto next_subbuffer_ptr = [](const amd::Memory* mem) -> address { - return reinterpret_cast<address>(mem->getSvmPtr()) + mem->getSize(); - }; - amd::Memory* vaddr_sub_obj = amd::MemObjMap::FindMemObj(ptr); - // Validate that the size is within range - if (vaddr_sub_obj == nullptr || - (vaddr_sub_obj->parent() != nullptr && - size > (vaddr_sub_obj->parent()->getSize() - vaddr_sub_obj->getOrigin()))) { - HIP_RETURN(hipErrorInvalidValue); - } - - address end_address = reinterpret_cast<address>(vaddr_sub_obj->getSvmPtr()) + size; - size_t total_processed_size = 0; - amd::Memory* check_obj = vaddr_sub_obj; - // Validate that the size matches the sum of sub-buffer sizes - while (check_obj && next_subbuffer_ptr(check_obj) <= end_address) { - if (size > total_processed_size && size < total_processed_size + check_obj->getSize()) { - HIP_RETURN(hipErrorInvalidValue); - } - total_processed_size += check_obj->getSize(); - check_obj = amd::MemObjMap::FindMemObj(next_subbuffer_ptr(check_obj)); - } - if (total_processed_size != size) { - HIP_RETURN(hipErrorInvalidValue); + hipError_t status = ValidateSubBufferCoverage(vaddr_sub_obj, size); + if (status != hipSuccess) { + HIP_RETURN(status); } // Unmap all sub-buffers in the range - while (vaddr_sub_obj && next_subbuffer_ptr(vaddr_sub_obj) <= end_address) { + address end_address = reinterpret_cast<address>(vaddr_sub_obj->getSvmPtr()) + size; + while (vaddr_sub_obj && NextSubBufferPtr(vaddr_sub_obj) <= end_address) { amd::Memory* phys_mem_obj = vaddr_sub_obj->getUserData().phys_mem_obj; if (phys_mem_obj == nullptr) { HIP_RETURN(hipErrorInvalidValue); @@ -463,7 +456,7 @@ hipError_t hipMemUnmap(void* ptr, size_t size) { reinterpret_cast<hip::GenericAllocation*>(phys_mem_obj->getUserData().data); ga->release(); - address next_ptr = next_subbuffer_ptr(vaddr_sub_obj); + address next_ptr = NextSubBufferPtr(vaddr_sub_obj); vaddr_sub_obj->release(); vaddr_sub_obj = amd::MemObjMap::FindMemObj(next_ptr); } -- 2.56.0 ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.8RZt3B/_old 2026-10-29 18:18:35.684285705 +0100 +++ /var/tmp/diff_new_pack.8RZt3B/_new 2026-10-29 18:18:35.695286166 +0100 @@ -1,6 +1,6 @@ -mtime: 1789773063 -commit: 93cd6e578d0051aef458b64f94b7fe13ae22720b7d72e143f094bb59ae10d091 +mtime: 1793234432 +commit: 6fc613f9e8772b1b5e567def88439472420e5c910e8530de1870ba11875b3be9 url: https://src.opensuse.org/ROCm/rocclr -revision: 93cd6e578d0051aef458b64f94b7fe13ae22720b7d72e143f094bb59ae10d091 +revision: 6fc613f9e8772b1b5e567def88439472420e5c910e8530de1870ba11875b3be9 projectscmsync: https://src.opensuse.org/ROCm/_ObsPrj ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-10-29 01:40:32.000000000 +0100 @@ -0,0 +1,7 @@ +sources +README.md +_buildconfig* +_buildinfo* +debian +.osc +changelog
