<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glibc/include, branch vdso</title>
<subtitle>Fork of glibc for development</subtitle>
<id>https://git.zx2c4.com/glibc/atom/include?h=vdso</id>
<link rel='self' href='https://git.zx2c4.com/glibc/atom/include?h=vdso'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/'/>
<updated>2024-09-06T12:07:00Z</updated>
<entry>
<title>stdlib: Do not use GLIBC_PRIVATE ABI for errno in libc_nonshared.a</title>
<updated>2024-09-06T12:07:00Z</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2024-09-06T12:07:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=7d6e30b4b4e83429cc77222d4fe4d5e8843d8e2b'/>
<id>urn:sha1:7d6e30b4b4e83429cc77222d4fe4d5e8843d8e2b</id>
<content type='text'>
Using TLS directly introduces a GLIBC_PRIVATE ABI dependency
into libc_nonshared.a, and thus indirectly into applications.
Adding the !defined LIBC_NONSHARED condition deactivates direct
TLS access, and libc_nonshared.a code switches to using
__errno_location, like application code.

Currently, this has no effect because there is no code in
libc_nonshared.a that accesses errno.

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>Define __libc_initial for the static libc</title>
<updated>2024-08-09T14:17:14Z</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2024-08-09T14:17:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=eb0e50e9a1cf80a2ba6f33f990a08ef37a3267fb'/>
<id>urn:sha1:eb0e50e9a1cf80a2ba6f33f990a08ef37a3267fb</id>
<content type='text'>
Reviewed-by: Adhemerval Zanella &lt;adhemerval.zanella@linaro.org&gt;
</content>
</entry>
<entry>
<title>elf: Avoid re-initializing already allocated TLS in dlopen (bug 31717)</title>
<updated>2024-08-05T16:26:52Z</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2024-08-01T21:31:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=5097cd344fd243fb8deb6dec96e8073753f962f9'/>
<id>urn:sha1:5097cd344fd243fb8deb6dec96e8073753f962f9</id>
<content type='text'>
The old code used l_init_called as an indicator for whether TLS
initialization was complete.  However, it is possible that
TLS for an object is initialized, written to, and then dlopen
for this object is called again, and l_init_called is not true at
this point.  Previously, this resulted in TLS being initialized
twice, discarding any interim writes (technically introducing a
use-after-free bug even).

This commit introduces an explicit per-object flag, l_tls_in_slotinfo.
It indicates whether _dl_add_to_slotinfo has been called for this
object.  This flag is used to avoid double-initialization of TLS.
In update_tls_slotinfo, the first_static_tls micro-optimization
is removed because preserving the initalization flag for subsequent
use by the second loop for static TLS is a bit complicated, and
another per-object flag does not seem to be worth it.  Furthermore,
the l_init_called flag is dropped from the second loop (for static
TLS initialization) because l_need_tls_init on its own prevents
double-initialization.

The remaining l_init_called usage in resize_scopes and update_scopes
is just an optimization due to the use of scope_has_map, so it is
not changed in this commit.

The isupper check ensures that libc.so.6 is TLS is not reverted.
Such a revert happens if l_need_tls_init is not cleared in
_dl_allocate_tls_init for the main_thread case, now that
l_init_called is not checked anymore in update_tls_slotinfo
in elf/dl-open.c.

Reported-by: Jonathon Anderson &lt;janderson@rice.edu&gt;
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>Increase version number to 2.40</title>
<updated>2024-07-21T16:23:25Z</updated>
<author>
<name>Andreas K. Hüttel</name>
<email>dilfridge@gentoo.org</email>
</author>
<published>2024-07-21T16:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=89d3d815ef6e84935147b683d510bacb0ba4df1d'/>
<id>urn:sha1:89d3d815ef6e84935147b683d510bacb0ba4df1d</id>
<content type='text'>
Signed-off-by: Andreas K. Hüttel &lt;dilfridge@gentoo.org&gt;
</content>
</entry>
<entry>
<title>posix: Sync tempname with gnulib</title>
<updated>2024-04-10T17:53:39Z</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2023-10-10T19:22:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=686d5420253bd76b1b7458f91d6ef9fc1a12b229'/>
<id>urn:sha1:686d5420253bd76b1b7458f91d6ef9fc1a12b229</id>
<content type='text'>
The gnulib version contains an important change (9ce573cde), which
fixes some problems with multithreading, entropy loss, and ASLR leak
nfo.  It also fixes an issue where getrandom is not being used
on some new files generation (only for __GT_NOCREATE on first try).

The 044bf893ac removed __path_search, which is now moved to another
gnulib shared files (stdio-common/tmpdir.{c,h}).  Tthis patch
also fixes direxists to use __stat64_time64 instead of __xstat64,
and move the include of pathmax.h for !_LIBC (since it is not used
by glibc).  The license is also changed from GPL 3.0 to 2.1, with
permission from the authors (Bruno Haible and Paul Eggert).

The sync also removed the clock fallback, since clock_gettime
with CLOCK_REALTIME is expected to always succeed.

It syncs with gnulib commit 323834962817af7b115187e8c9a833437f8d20ec.

Checked on x86_64-linux-gnu.

Co-authored-by: Bruno Haible &lt;bruno@clisp.org&gt;
Co-authored-by: Paul Eggert &lt;eggert@cs.ucla.edu&gt;
Reviewed-by: Bruno Haible &lt;bruno@clisp.org&gt;
</content>
</entry>
<entry>
<title>riscv: Enable multi-arg ifunc resolvers</title>
<updated>2024-03-01T15:14:59Z</updated>
<author>
<name>Evan Green</name>
<email>evan@rivosinc.com</email>
</author>
<published>2024-02-27T22:56:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=a29bb320a1a1daa8add4d213fc70f273810dd91a'/>
<id>urn:sha1:a29bb320a1a1daa8add4d213fc70f273810dd91a</id>
<content type='text'>
RISC-V is apparently the first architecture to pass more than one
argument to ifunc resolvers. The helper macros in libc-symbols.h,
__ifunc_resolver(), __ifunc(), and __ifunc_hidden(), are incompatible
with this. These macros have an "arg" (non-final) parameter that
represents the parameter signature of the ifunc resolver. The result is
an inability to pass the required comma through in a single preprocessor
argument.

Rearrange the __ifunc_resolver() macro to be variadic, and pass the
types as those variable parameters. Move the guts of __ifunc() and
__ifunc_hidden() into new macros, __ifunc_args(), and
__ifunc_args_hidden(), that pass the variable arguments down through to
__ifunc_resolver(). Then redefine __ifunc() and __ifunc_hidden(), which
are used in a bunch of places, to simply shuffle the arguments down into
__ifunc_args[_hidden]. Finally, define a riscv-ifunc.h header, which
provides convenience macros to those looking to write ifunc selectors
that use both arguments.

Signed-off-by: Evan Green &lt;evan@rivosinc.com&gt;
Reviewed-by: Florian Weimer &lt;fweimer@redhat.com&gt;
Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>arm: Use _dl_find_object on __gnu_Unwind_Find_exidx (BZ 31405)</title>
<updated>2024-02-23T11:50:00Z</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2024-02-22T13:42:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=f4c142bb9fe6b02c0af8cfca8a920091e2dba44b'/>
<id>urn:sha1:f4c142bb9fe6b02c0af8cfca8a920091e2dba44b</id>
<content type='text'>
Instead of __dl_iterate_phdr. On ARM dlfo_eh_frame/dlfo_eh_count
maps to PT_ARM_EXIDX vaddr start / length.

On a Neoverse N1 machine with 160 cores, the following program:

  $ cat test.c
  #include &lt;stdlib.h&gt;
  #include &lt;pthread.h&gt;
  #include &lt;assert.h&gt;

  enum {
    niter = 1024,
    ntimes = 128,
  };

  static void *
  tf (void *arg)
  {
    int a = (int) arg;

    for (int i = 0; i &lt; niter; i++)
      {
        void *p[ntimes];
        for (int j = 0; j &lt; ntimes; j++)
  	p[j] = malloc (a * 128);
        for (int j = 0; j &lt; ntimes; j++)
  	free (p[j]);
      }

    return NULL;
  }

  int main (int argc, char *argv[])
  {
    enum { nthreads = 16 };
    pthread_t t[nthreads];

    for (int i = 0; i &lt; nthreads; i ++)
      assert (pthread_create (&amp;t[i], NULL, tf, (void *) i) == 0);

    for (int i = 0; i &lt; nthreads; i++)
      {
        void *r;
        assert (pthread_join (t[i], &amp;r) == 0);
        assert (r == NULL);
      }

    return 0;
  }
  $ arm-linux-gnueabihf-gcc -fsanitize=address test.c -o test

Improves from ~15s to 0.5s.

Checked on arm-linux-gnueabihf.
</content>
</entry>
<entry>
<title>string: Add hidden builtin definition for __strcpy_chk.</title>
<updated>2024-02-06T08:17:04Z</updated>
<author>
<name>Stefan Liebler</name>
<email>stli@linux.ibm.com</email>
</author>
<published>2024-02-05T13:22:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=fa3eb7d5e7d32ca1ad48b48a7eb6d15b8382c3a7'/>
<id>urn:sha1:fa3eb7d5e7d32ca1ad48b48a7eb6d15b8382c3a7</id>
<content type='text'>
Otherwise on at least x86_64 and s390x there is an unwanted PLT entry
in libc.so when configured with --enable-fortify-source=3 and build
with -Os.

This is observed in elf/check-localplt
Extra PLT reference: libc.so: __strcpy_chk

The call to PLT entry is in inet/ruserpass.c.
Reviewed-by: Adhemerval Zanella  &lt;adhemerval.zanella@linaro.org&gt;
</content>
</entry>
<entry>
<title>Refer to C23 in place of C2X in glibc</title>
<updated>2024-02-01T11:02:01Z</updated>
<author>
<name>Joseph Myers</name>
<email>josmyers@redhat.com</email>
</author>
<published>2024-02-01T11:02:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=42cc619dfbc44e263239c2de870bae11ad65810a'/>
<id>urn:sha1:42cc619dfbc44e263239c2de870bae11ad65810a</id>
<content type='text'>
WG14 decided to use the name C23 as the informal name of the next
revision of the C standard (notwithstanding the publication date in
2024).  Update references to C2X in glibc to use the C23 name.

This is intended to update everything *except* where it involves
renaming files (the changes involving renaming tests are intended to
be done separately).  In the case of the _ISOC2X_SOURCE feature test
macro - the only user-visible interface involved - support for that
macro is kept for backwards compatibility, while adding
_ISOC23_SOURCE.

Tested for x86_64.
</content>
</entry>
<entry>
<title>version.h, include/features.h: Bump version to 2.39</title>
<updated>2024-01-31T00:29:11Z</updated>
<author>
<name>Andreas K. Hüttel</name>
<email>dilfridge@gentoo.org</email>
</author>
<published>2024-01-31T00:29:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=3e941ef87e5ac15a59ec32dd1750a58904ad2fb0'/>
<id>urn:sha1:3e941ef87e5ac15a59ec32dd1750a58904ad2fb0</id>
<content type='text'>
Signed-off-by: Andreas K. Hüttel &lt;dilfridge@gentoo.org&gt;
</content>
</entry>
</feed>
