From 451df115c44f5e296faeb4960e2f838f6c345f71 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: May 17 2024 18:33:09 +0000 Subject: Import openvswitch3.2-3.2.0-79 from Fast DataPath --- diff --git a/SOURCES/openvswitch-3.2.0.patch b/SOURCES/openvswitch-3.2.0.patch index 68b238a..f6218d9 100644 --- a/SOURCES/openvswitch-3.2.0.patch +++ b/SOURCES/openvswitch-3.2.0.patch @@ -1540,7 +1540,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 @@ @@ -1560,6 +1560,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/sparse/automake.mk b/include/sparse/automake.mk index e966371192..2b1dd0e005 100644 --- a/include/sparse/automake.mk @@ -3513,6 +3531,19 @@ index ab9ce6b2e0..f140d25feb 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 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 7c04bb0e6b..809152d29b 100644 --- a/lib/ovs-router.c @@ -3813,6 +3844,19 @@ index 2f01966f79..90e8094599 100644 unixctl_command_register("rstp/tcn", "[bridge]", 0, 1, rstp_unixctl_tcn, NULL); unixctl_command_register("rstp/show", "[bridge]", 0, 1, rstp_unixctl_show, +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 f49048cdab..0f805412ae 100644 --- a/lib/tc.c @@ -3940,6 +3984,22 @@ index b556762277..e9603432d2 100644 return retval; } +diff --git a/lib/vlog.c b/lib/vlog.c +index b2653142f3..38df70d927 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.2.spec b/SPECS/openvswitch3.2.spec index 6ad89e9..453b782 100644 --- a/SPECS/openvswitch3.2.spec +++ b/SPECS/openvswitch3.2.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.2.0 -Release: 78%{?dist} +Release: 79%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -761,6 +761,14 @@ exit 0 %endif %changelog +* Fri May 17 2024 Open vSwitch CI - 3.2.0-79 +- Merging upstream branch-3.2 [RH git: c37953f11f] + Commit list: + 27841b2c18 compiler: Fix errors in Clang 17 ubsan checks. + bad48a6eda table: Fix freeing global variable. + a622f6cc63 vlog: Destroy async_append first then close log_fd. + + * Tue May 14 2024 Open vSwitch CI - 3.2.0-78 - Merging upstream branch-3.2 [RH git: ff697d229b] Commit list: