lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230731141733.25059-1-tuananhlfc@gmail.com>
Date:   Mon, 31 Jul 2023 21:17:33 +0700
From:   Anh Tuan Phan <tuananhlfc@...il.com>
To:     mathieu.desnoyers@...icios.com, peterz@...radead.org,
        paulmck@...nel.org, boqun.feng@...il.com, shuah@...nel.org
Cc:     linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        Anh Tuan Phan <tuananhlfc@...il.com>
Subject: [PATCH] selftests/rseq: Fix unknown type name __weak for gcc 11.3.0

Add the definition of the '__weak' attribute since it is not available in
GCC 11.3.0 and newer:

rseq.c:41:1: error: unknown type name ‘__weak’
   41 | __weak ptrdiff_t __rseq_offset;

Fixes: 3bcbc20942db ("selftests/rseq: Play nice with binaries statically linked against glibc 2.35+")
Signed-off-by: Anh Tuan Phan <tuananhlfc@...il.com>
---
 tools/testing/selftests/rseq/rseq.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/rseq/rseq.c b/tools/testing/selftests/rseq/rseq.c
index a723da253244..584eec9b0930 100644
--- a/tools/testing/selftests/rseq/rseq.c
+++ b/tools/testing/selftests/rseq/rseq.c
@@ -34,6 +34,10 @@
 #include "../kselftest.h"
 #include "rseq.h"
 
+#ifndef __weak
+#define __weak __attribute__((weak))
+#endif
+
 /*
  * Define weak versions to play nice with binaries that are statically linked
  * against a libc that doesn't support registering its own rseq.
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ