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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 26 Feb 2024 17:00:20 +0100
From: Anna-Maria Behnsen <anna-maria@...utronix.de>
To: Arnd Bergmann <arnd@...db.de>, Naresh Kamboju
 <naresh.kamboju@...aro.org>, open list <linux-kernel@...r.kernel.org>,
 lkft-triage@...ts.linaro.org, Linux ARM
 <linux-arm-kernel@...ts.infradead.org>, Thomas Gleixner
 <tglx@...utronix.de>, Vincenzo Frascino <vincenzo.frascino@....com>
Cc: Ard Biesheuvel <ardb@...nel.org>, Catalin Marinas
 <catalin.marinas@....com>, Kees Cook <keescook@...omium.org>
Subject: Re: arch/arm64/include/asm/atomic_ll_sc.h:298:9: error: unknown
 type name 'u128'

"Arnd Bergmann" <arnd@...db.de> writes:

> On Fri, Feb 23, 2024, at 10:10, Naresh Kamboju wrote:
>> In file included from arch/arm64/include/asm/lse.h:5,
>>                  from arch/arm64/include/asm/cmpxchg.h:14,
>>                  from arch/arm64/include/asm/atomic.h:16,
>>                  from include/linux/atomic.h:7,
>>                  from include/asm-generic/bitops/atomic.h:5,
>>                  from arch/arm64/include/asm/bitops.h:25,
>>                  from include/linux/bitops.h:68,
>>                  from arch/arm64/include/asm/memory.h:209,
>>                  from arch/arm64/include/asm/page.h:46,
>>                  from include/vdso/datapage.h:22,
>>                  from lib/vdso/gettimeofday.c:5,
>>
>>                  from <command-line>:
>> arch/arm64/include/asm/atomic_ll_sc.h:298:9: error: unknown type name 'u128'
>>   298 |         u128 full;
>>       |         ^~~~
>> arch/arm64/include/asm/atomic_ll_sc.h:305:24: error: unknown type name 'u128'
>>   305 | static __always_inline u128
>
> The problem here is the separation of vdso/*.h headers and
> linux/*.h headers.
>
> Commit a0d2fcd62ac2 ("vdso/ARM: Make union vdso_data_store
> available for all architectures") introduced a reference to
> the asm/page.h in include/vdso/datapage.h, but this is outside
> of the vdso/*.h namespace and doesn't work in the compat vdso.

But the asm namespace works for the vdso namespace. Only linux headers
do not work, or am I wrong?

> I think it is only needed because of the PAGE_SIZE macro,
> so that constant needs to come from somewhere else.

Yes.

> I have an older patch that I never merged to unify the
> page size configuration in Kconfig, and could try to
> dig that out if nobody has a better idea. If we do that,
> we could introduce a CONFIG_PAGE_SIZE.

PAGE_SIZE is defined in asm/page-def.h for arm64. So this could be a
fast fix (tested with clang-14):

---8<----
--- a/include/vdso/datapage.h
+++ b/include/vdso/datapage.h
@@ -19,7 +19,11 @@
 #include <vdso/time32.h>
 #include <vdso/time64.h>
 
+#ifdef CONFIG_ARM64
+#include <asm/page-def.h>
+#else
 #include <asm/page.h>
+#endif
 
 #ifdef CONFIG_ARCH_HAS_VDSO_DATA
 #include <asm/vdso/data.h>
---8<---

Thanks,

	Anna-Maria


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ