public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* Patching glibc 2.27 on Ubuntu
@ 2021-11-25  8:53 Evgeny Morozov
  2021-11-25 17:24 ` Carlos O'Donell
  0 siblings, 1 reply; 2+ messages in thread
From: Evgeny Morozov @ 2021-11-25  8:53 UTC (permalink / raw)
  To: libc-help

Hi,

I'd like to apply a patch from
https://sourceware.org/bugzilla/show_bug.cgi?id=25847 (the "mitigation
patch": https://sourceware.org/bugzilla/attachment.cgi?id=12484) to many
x64 systems running Ubuntu 18.04. They should all have the same version of
the libc6 package installed. Is it possible to build it on one system and
just copy the affected binaries to all of them, or do I have to build and
install it on each system? If I can copy just a few binaries, should I copy
only libpthread.so, libc.so, both, something else?

I was able to build glibc as follows:

sudo apt build-dep glibc
mkdir src
apt source glibc
mkdir build
cd build
../glibc-2.27/configure --prefix=/usr
make -j

This generates a 17MB libc.so file, while the system one is ~2MB. Should I
run strip on it?

Thanks in advance,
Evgeny Morozov

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Patching glibc 2.27 on Ubuntu
  2021-11-25  8:53 Patching glibc 2.27 on Ubuntu Evgeny Morozov
@ 2021-11-25 17:24 ` Carlos O'Donell
  0 siblings, 0 replies; 2+ messages in thread
From: Carlos O'Donell @ 2021-11-25 17:24 UTC (permalink / raw)
  To: Evgeny Morozov, libc-help

On 11/25/21 03:53, Evgeny Morozov wrote:
> Hi,
> 
> I'd like to apply a patch from
> https://sourceware.org/bugzilla/show_bug.cgi?id=25847 (the "mitigation
> patch": https://sourceware.org/bugzilla/attachment.cgi?id=12484) to many
> x64 systems running Ubuntu 18.04. They should all have the same version of
> the libc6 package installed. Is it possible to build it on one system and
> just copy the affected binaries to all of them, or do I have to build and
> install it on each system? If I can copy just a few binaries, should I copy
> only libpthread.so, libc.so, both, something else?

You need to integrate the patch into the Ubuntu version of glibc shipping with the distribution.

You should take the patch, and add it to the Ubuntu glibc package as a patch and build the package
using dpkg-buildpackage or a build service.

It is not recommended to build your own glibc and install it into your distribution.

-- 
Cheers,
Carlos.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-25 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25  8:53 Patching glibc 2.27 on Ubuntu Evgeny Morozov
2021-11-25 17:24 ` Carlos O'Donell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).