Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 9 Mar 2015 19:50:58 +0100
From: Szabolcs Nagy <>
Subject: aarch64 port

attached patch adds aarch64 support

tested on foundation model + linaro rootfs, there are some issues still:

	should work, relocs lisghtly tested, but vdso does not work
	yet (at least i see clock_gettime syscalls in strace)
	i used "cbnz w0,__cancel", that is "compare and branch on nonzero"
	but it has a +-1M limit on the jump is that ok?
	needs to access dtv for which the asm needs sizeof(struct pthread)
	so we may want to add the dtv at the end of pthread struct too
	is aarch64 only syscalls ok here or do we want a generic
	32bit+64bit syscall header like kernel has now for new archs?
	needs __BYTE_ORDER workarounds, not tested on bigendian
	i think i need to include endian.h somewhere i think this should be ok
	but not tested on bigendian
	may needs some further checks
	i removed TCGETS2,etc which used struct termios2
	a_crash probably should be a single instruction
	a_spin is probably fine but pthread_spin* could be improved
signal.h, user.h
	exposes ucontext stuff which uses __attribute__((aligned(16))) (can be
	fixed with manual padding i guess, i just copied the kernel sigcontext)
	and fpregset_t uses __uint128_t (for ld128 float registers).
	if we decide that __uint128 is ok for platforms with 128 bit
	long double then i'll change internal/libm.h etc to avoid the
	ugly endian dependent bithacks
long double:
	printf/scanf/.. should work but some math functions
	are missing/broken now, there is an exp2l patch that
	is needed before this one to make things compile

generic issues (affect other archs too):

	sigprocmask vs pthread_sigmask: the only difference is errno
	i dont see errno requirement for sigsetjmp so pthread_sigmask should be ok?
	sys/reg.h seems to be x86 only (and m68k) in glibc, so probably it should
	be left empty..
	shminfo should be under _GNU_SOURCE according to the manual:
	however shm* is reserved namespace for sys/shm.h
	(i used _GNU_SOURCE in aarch64, others lack it)
	i havent tested this much
	but kernel NCCS 32 vs 19 we use in various archs seems inconsistent

View attachment "0001-add-aarch64-port.patch" of type "text/x-diff" (72744 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.