From d4ff150377811abfb775b7f5ca78ff22f10a7c54 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: May 17 2024 20:49:34 +0000 Subject: Import openvswitch2.17-2.17.0-152 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.17.0.patch b/SOURCES/openvswitch-2.17.0.patch index 4ec8262..542f2f3 100644 --- a/SOURCES/openvswitch-2.17.0.patch +++ b/SOURCES/openvswitch-2.17.0.patch @@ -94889,7 +94889,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 @@ @@ -94909,6 +94909,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/dynamic-string.h b/include/openvswitch/dynamic-string.h index ee18217107..1c262b0494 100644 --- a/include/openvswitch/dynamic-string.h @@ -103757,9 +103775,18 @@ index ecc251a7ff..02c9e84cf5 100644 #endif /* ovs-numa.h */ diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c -index 1866bd3088..946aa04d18 100644 +index 1866bd3088..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; @@ -444,3 +444,40 @@ ovsrcu_init_module(void) ovsthread_once_done(&once); } @@ -105354,6 +105381,19 @@ index fcaddf10ad..71039e24f1 100644 } /* Attempts to guess the content type of a stream whose first few bytes were +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 adb2d3182a..aa30e90be5 100644 --- a/lib/tc.c @@ -106463,6 +106503,20 @@ index 7415e6291f..e9603432d2 100644 ovs_list_remove(&b->list_node); int error = vconn_send_block(vconn, b); if (error) { +diff --git a/lib/vlog.c b/lib/vlog.c +index 533f937555..1567250c7d 100644 +--- a/lib/vlog.c ++++ b/lib/vlog.c +@@ -395,8 +395,8 @@ vlog_set_log_file(const char *file_name) + /* Close old log file, if any, and install new one. */ + ovs_mutex_lock(&log_file_mutex); + if (log_fd >= 0) { +- close(log_fd); + async_append_destroy(log_writer); ++ close(log_fd); + } + + free(log_file_name); diff --git a/m4/ax_func_posix_memalign.m4 b/m4/ax_func_posix_memalign.m4 index bd60adcbc8..2442ceca74 100644 --- a/m4/ax_func_posix_memalign.m4 diff --git a/SPECS/openvswitch2.17.spec b/SPECS/openvswitch2.17.spec index 22488cc..176d2f7 100644 --- a/SPECS/openvswitch2.17.spec +++ b/SPECS/openvswitch2.17.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.17.0 -Release: 151%{?dist} +Release: 152%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -751,6 +751,14 @@ exit 0 %endif %changelog +* Fri May 17 2024 Open vSwitch CI - 2.17.0-152 +- Merging upstream branch-2.17 [RH git: 9ce5325f9a] + Commit list: + 9468d54d01 compiler: Fix errors in Clang 17 ubsan checks. + f23b1e500a table: Fix freeing global variable. + a6f9175aee vlog: Destroy async_append first then close log_fd. + + * Tue May 14 2024 Open vSwitch CI - 2.17.0-151 - Merging upstream branch-2.17 [RH git: b4f6b6d488] Commit list: