On 2/12/2026 12:43 PM, Zhuoying Cai wrote:
+static bool is_comp_overlap(SecureIplCompAddrRange *comp_addr_range,
+                            int addr_range_index,
+                            uint64_t start_addr, uint64_t end_addr)
+{
+    /* neither a signed nor an unsigned component can overlap with a signed 
component */
+    for (int i = 0; i < addr_range_index; i++) {
+        if ((comp_addr_range[i].start_addr < end_addr &&
+            start_addr < comp_addr_range[i].end_addr) &&
+            comp_addr_range[i].is_signed) {
+            return true;
+       }
+    }
+
+    return false;
+}
+

Shouldn't we use <= and >= checks? For example if comp_addr_range[i].start_addr == end_addr, wouldn't that be an overlap? and similar for start_addr?

Thanks

Farhan



Reply via email to