[PATCH] elf: Simplify software TM implementation in _dl_find_object

Szabolcs Nagy szabolcs.nagy@arm.com
Fri Jan 7 15:49:22 GMT 2022


The 01/07/2022 14:41, Florian Weimer wrote:
> With the current set of fences, the version update at the start
> of the TM write operation is redundant.  Also use relaxed MO stores
> during the dlclose update, and skip any version changes there.
> 
> Suggested-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
> 
> ---
> Initial testing looks good, but I'll keep the aarch64 and powerpc64le
> tests running in a loop for a while.

looks good to me except

> @@ -282,15 +279,6 @@ _dlfo_mappings_end_update (void)
>    atomic_thread_fence_release ();
>    __atomic_wide_counter_fetch_add_relaxed (&_dlfo_loaded_mappings_version, 1);
>  }

i think the v += 1 does not have to be atomic so

 start_version = load_relaxed (&ver);
 store_relaxed (&ver, start_version + 1);

or if we can change the api to pass start_version
that may be clearer.



More information about the Libc-alpha mailing list