diff --git a/SOURCES/openvswitch-3.3.0.patch b/SOURCES/openvswitch-3.3.0.patch index c05e89c..015485c 100644 --- a/SOURCES/openvswitch-3.3.0.patch +++ b/SOURCES/openvswitch-3.3.0.patch @@ -217,6 +217,28 @@ index 2049ddaa26..22c767a4ce 100644 openvswitch (3.3.0-1) unstable; urgency=low * New upstream version +diff --git a/include/openvswitch/compiler.h b/include/openvswitch/compiler.h +index 878c5c6a70..ecb91801cc 100644 +--- a/include/openvswitch/compiler.h ++++ b/include/openvswitch/compiler.h +@@ -69,6 +69,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/sparse/automake.mk b/include/sparse/automake.mk index c1229870bb..45e6202c52 100644 --- a/include/sparse/automake.mk @@ -915,6 +937,19 @@ index d3d42b4148..232ebeb97b 100644 ptrdiff_t msg_offset = (char *) b->msg - (char *) b->data; new_buffer->msg = (char *) new_buffer->data + msg_offset; +diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c +index 9e07d9bab6..49afcc55c9 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 ca014d80ed..3d84c9a30a 100644 --- a/lib/ovs-router.c @@ -1122,6 +1157,19 @@ index 9927dcc185..f1fe32714e 100644 } static void +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 e9bcae4e4b..e55ba3b1bb 100644 --- a/lib/tc.c @@ -1173,7 +1221,7 @@ index e9bcae4e4b..e55ba3b1bb 100644 return 0; diff --git a/lib/vlog.c b/lib/vlog.c -index b2653142f3..e78c785f7b 100644 +index b2653142f3..59b524b097 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -29,6 +29,7 @@ @@ -1184,6 +1232,18 @@ index b2653142f3..e78c785f7b 100644 #include "coverage.h" #include "dirs.h" #include "openvswitch/dynamic-string.h" +@@ -410,10 +411,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. */ @@ -1274,8 +1275,9 @@ vlog_fatal(const struct vlog_module *module, const char *message, ...) va_end(args); } diff --git a/SPECS/openvswitch3.3.spec b/SPECS/openvswitch3.3.spec index db34811..3ad7441 100644 --- a/SPECS/openvswitch3.3.spec +++ b/SPECS/openvswitch3.3.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.3.0 -Release: 18%{?dist} +Release: 19%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -767,6 +767,14 @@ exit 0 %endif %changelog +* Fri May 17 2024 Open vSwitch CI - 3.3.0-19 +- Merging upstream branch-3.3 [RH git: f3bdc58258] + Commit list: + 8d4ba3b5a8 compiler: Fix errors in Clang 17 ubsan checks. + d153eff606 table: Fix freeing global variable. + f02dc3cfec vlog: Destroy async_append first then close log_fd. + + * Tue May 14 2024 Open vSwitch CI - 3.3.0-18 - Merging upstream branch-3.3 [RH git: 2c450fb957] Commit list: