diff --git a/SOURCES/openvswitch-3.1.0.patch b/SOURCES/openvswitch-3.1.0.patch index 261a378..9108f34 100644 --- a/SOURCES/openvswitch-3.1.0.patch +++ b/SOURCES/openvswitch-3.1.0.patch @@ -1724,7 +1724,7 @@ index a1d75756c9..820c09f84b 100644 -EXTRA_DIST += build-aux/check-structs - diff --git a/include/openvswitch/compiler.h b/include/openvswitch/compiler.h -index cf009f8264..52614a5ac0 100644 +index cf009f8264..91baeb9f5f 100644 --- a/include/openvswitch/compiler.h +++ b/include/openvswitch/compiler.h @@ -37,6 +37,16 @@ @@ -1744,6 +1744,24 @@ index cf009f8264..52614a5ac0 100644 #if __GNUC__ && !__CHECKER__ #define OVS_UNUSED __attribute__((__unused__)) #define OVS_PRINTF_FORMAT(FMT, ARG1) __attribute__((__format__(printf, FMT, ARG1))) +@@ -53,6 +63,17 @@ + #define OVS_UNLIKELY(CONDITION) (!!(CONDITION)) + #endif + ++/* Clang 17's implementation of ubsan enables checking that function pointers ++ * match the type of the called function. This currently breaks ovs-rcu, which ++ * calls multiple different types of callbacks via a generic void *(void*) ++ * function pointer type. This macro enables disabling that check for specific ++ * functions. */ ++#if __clang__ && __has_feature(undefined_behavior_sanitizer) ++#define OVS_NO_SANITIZE_FUNCTION __attribute__((no_sanitize("function"))) ++#else ++#define OVS_NO_SANITIZE_FUNCTION ++#endif ++ + #if __has_feature(c_thread_safety_attributes) + /* "clang" annotations for thread safety check. + * diff --git a/include/openvswitch/meta-flow.h b/include/openvswitch/meta-flow.h index 045dce8f5f..3b0220aaa2 100644 --- a/include/openvswitch/meta-flow.h @@ -5738,6 +5756,19 @@ index 8fdce0cf80..62ee4e0682 100644 #include "ovs-atomic-clang.h" #elif HAVE_ATOMIC && __cplusplus >= 201103L #include "ovs-atomic-c++.h" +diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c +index 946aa04d18..9238e77a3e 100644 +--- a/lib/ovs-rcu.c ++++ b/lib/ovs-rcu.c +@@ -326,7 +326,7 @@ ovsrcu_postpone__(void (*function)(void *aux), void *aux) + cb->aux = aux; + } + +-static bool ++static bool OVS_NO_SANITIZE_FUNCTION + ovsrcu_call_postponed(void) + { + struct ovsrcu_cbset *cbset; diff --git a/lib/ovs-router.c b/lib/ovs-router.c index 5d0fbd503e..4080134533 100644 --- a/lib/ovs-router.c @@ -6142,6 +6173,19 @@ index 62da9febb6..86747e58ba 100644 #if OPENSSL_VERSION_NUMBER < 0x3000000fL SSL_CTX_set_tmp_dh_callback(ctx, tmp_dh_callback); #else +diff --git a/lib/table.c b/lib/table.c +index 48d18b6518..b7addbf390 100644 +--- a/lib/table.c ++++ b/lib/table.c +@@ -522,7 +522,7 @@ table_print_json__(const struct table *table, const struct table_style *style, + json_object_put_string(json, "caption", table->caption); + } + if (table->timestamp) { +- json_object_put_nocopy( ++ json_object_put( + json, "time", + json_string_create_nocopy(table_format_timestamp__())); + } diff --git a/lib/tc.c b/lib/tc.c index 4c07e22162..5b193bc395 100644 --- a/lib/tc.c @@ -6402,6 +6446,22 @@ index b556762277..e9603432d2 100644 return retval; } +diff --git a/lib/vlog.c b/lib/vlog.c +index 0a615bb664..b6f8bda3e6 100644 +--- a/lib/vlog.c ++++ b/lib/vlog.c +@@ -410,10 +410,10 @@ vlog_set_log_file__(char *new_log_file_name) + + /* Close old log file, if any. */ + ovs_mutex_lock(&log_file_mutex); ++ async_append_destroy(log_writer); + if (log_fd >= 0) { + close(log_fd); + } +- async_append_destroy(log_writer); + free(log_file_name); + + /* Install new log file. */ diff --git a/ofproto/bond.c b/ofproto/bond.c index cfdf44f854..c31869a4c7 100644 --- a/ofproto/bond.c diff --git a/SPECS/openvswitch3.1.spec b/SPECS/openvswitch3.1.spec index a2bc598..088e639 100644 --- a/SPECS/openvswitch3.1.spec +++ b/SPECS/openvswitch3.1.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.1.0 -Release: 109%{?dist} +Release: 110%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -754,6 +754,14 @@ exit 0 %endif %changelog +* Fri May 17 2024 Open vSwitch CI - 3.1.0-110 +- Merging upstream branch-3.1 [RH git: a475882723] + Commit list: + 7694dfacb8 compiler: Fix errors in Clang 17 ubsan checks. + 490b5fa359 table: Fix freeing global variable. + faf1751557 vlog: Destroy async_append first then close log_fd. + + * Tue May 14 2024 Open vSwitch CI - 3.1.0-109 - Merging upstream branch-3.1 [RH git: d476b37007] Commit list: