clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
522 stars 29 forks source link

glibc: 0001-linux-nanosleep-use-power-saving-ops-for-very-small-.patch breaks invalid argument detection #3187

Closed schiele closed 1 month ago

schiele commented 1 month ago

The current implementation of the patch 0001-linux-nanosleep-use-power-saving-ops-for-very-small-.patch breaks detecting negative numbers as invalid parameters in nanosleep calls. While this is not a problem for valid calls it does become a problem for implementations that exploit the fact that nanosleep errors out on those invalid arguments.

schiele commented 1 month ago

This patch fixes the problem: 0001-linux-nanosleep-error-on-invalid-parameters.patch.txt

fenrus75 commented 1 month ago

thank you for the patch -- this looks sensible and indeed is an oversight - I've also pinged Colin to take a look but I've merged your patch into our glibc package already

On Wed, Sep 25, 2024 at 4:10 AM Robert Schiele @.***> wrote:

This patch fixes the problem: 0001-linux-nanosleep-error-on-invalid-parameters.patch.txt https://github.com/user-attachments/files/17129792/0001-linux-nanosleep-error-on-invalid-parameters.patch.txt

— Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/3187#issuecomment-2373780450, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FNLJMTG6R42ASVLX53ZYKK27AVCNFSM6AAAAABO2I5MUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZTG44DANBVGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

schiele commented 1 month ago

@fenrus75 I saw that you added the patch to the spec file for the glibc but did not apply it in the %prep phase, so it is not effective in the end.

The missing part should be something like:

diff --git a/glibc.spec b/glibc.spec
index a4d4f29..bf7c9f2 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -230,6 +230,7 @@ GNU C library extra components.
 %patch62 -p1
 %patch63 -p1
 %patch64 -p1
+%patch65 -p1

 %patch9 -p1
schiele commented 1 month ago

Delivered with build 42480.