From: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
To: Sergey Bugaev <bugaevc@gmail.com>
Cc: libc-alpha@sourceware.org, bug-hurd@gnu.org,
Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
Helmut Grohne <helmut@subdivi.de>
Subject: Re: [RFC PATCH 00/23] aarch64-gnu port
Date: Mon, 11 Mar 2024 18:14:51 +0400 [thread overview]
Message-ID: <41F1EBC2-5556-4704-85F5-58B068C8CE59@linaro.org> (raw)
In-Reply-To: <20240103171502.1358371-1-bugaevc@gmail.com>
> On Jan 3, 2024, at 21:14, Sergey Bugaev <bugaevc@gmail.com> wrote:
>
> Hello!
>
> This is my work on the aarch64-gnu port, aka GNU/Hurd on 64-bit ARM.
>
> To build this, you need an aarch64-gnu toolchain (binutils, GCC, MIG),
> and GNU Mach headers for AArch64. I have posted the patches for
> binutils, GCC, and GNU Mach to the bug-hurd mailing list; no patches
> are required to build aarch64-gnu-mig.
>
> glibc fully builds and produces all the exepected libraries (including
> libmvec) and binaries. It can then be used to build other programs, in
> particular many core Hurd servers seem to build just fine.
>
> There is no AArch64 port of GNU Mach yet; I'm trying to get the ball
> rolling by making this port of glibc. I have only added some AArch64
> headers to GNU Mach, but no actual runnable code. My versions of
> <mach/aarch64/exception.h>, <mach/aarch64/thread_status.h> (and others)
> are by no means final, they are more of preliminary sketches of the API
> so I have something to port glibc against. If there are changes
> resulting from discussions and (hopefully) an eventual Mach AArch64
> port, we'll need to make corresponding changes to glibc.
>
> There not being a Mach build means that it's not currently possible to
> run or test any of this port on a real Mach. It is possible to run
> simple statically linked executables on Linux (or, I guess, other
> kernels which use ELF and similar enough ABI wrt how the arguments are
> placed on the stack) as long as you emulate the syscalls and RPCs in
> some way. I have done that, and verified that simple statically linked
> executables in the bootstrap configuration (i.e. without a Hurd exec
> server, with arguments already placed on the stack by Mach) start up
> fine.
>
> I have also done a quick i686-gnu build (to see if static-start.S or
> init-first.c changes have broken something), and a statically linked
> hello world seems to still work as expected.
>
> As usual, the disclaimer about me not knowing what I'm doing: I don't!
> I especially am not at all familiar with AArch64, even less so than with
> x86_64. I could have done something incredibly stupid; please do review!
>
> That being said, these changes seem smaller and a lot less radical than
> the x86_64 port patchset; they're mostly adding things rather than
> reworking them, so there is less of a chance to break the x86 targets.
> Evidently, we've done enough rewrokings and portability fixes (notably,
> various 64-bit fixes) during the x86_64 port to make it easier to add
> new ports. This port itself continues this trend somewhat too, with
> init-first.c now finally becoming only sysdeps/mach/hurd -specific, and
> HTL gaining support for TLS_DTV_AT_TP.
>
> As I said in the previous letter on bug-hurd, the hardware hardening
> features (BTI, MTE, PAC) are currently "not really supported", but I do
> want to support them in the future. I'm extremely interested in getting
> feedback or suggestions about these. For example: what should our API
> for controlling PAC keys look like, should we just allow userland to
> read and write all the keys? Are there, for example, any gotchas with
> BTI that we need to be aware of? Is it possible to start using PAC after
> initial start-up (once /dev/random becomes available, so PAC keys can be
> initialized) — how would we do that without crashing on e.g. ret
> pointers that have not been encrypted?
>
> Finally, a couple of words about the page size. My plan is for userland
> to not assume any static value of page size, and always query it
> dynamically, unlike on x86, even though GNU Mach will likely be compiled
> with some fixed value of page size; my understanding is this is also how
> things are done on GNU/Linux. To that end, I've tried to reduce the
> reliance on <mach/vm_param.h> and on EXEC_PAGESIZE being defined.
> Currently, Mach headers still define *something* named PAGE_SIZE
> unconditionally, causing __mach_init () to pick it up and use it instead
> of querying the page size dynamically. We should make sure this does not
> happen (i.e. <mach/vm_param.h> should not define PAGE_SIZE on AArch64),
> this is just something I haven't figured out a nice way to fix yet.
>
> Sergey
>
> P.S. I have not forgotten about my other unmerged patch series! (Most
> importantly, O_IGNORE_CTTY everywhere and the fcntl fortification.) I
> hope to find some time to hack on them, hopefully some time soon.
>
> Sergey Bugaev (23):
> hurd: Add some missing includes
> hurd: Declare _hurd_intr_rpc_msg* with protected visibility
> Allow glibc to be compiled without EXEC_PAGESIZE
> mach: Drop some unnecessary vm_param.h includes
> hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now
> mach: Drop SNARF_ARGS macro
> hurd: Pass the data pointer to _hurd_stack_setup explicitly
> hurd: Drop x86-specific assembly from init-first.c
> hurd: Make init-first.c no longer x86-specific
> hurd: Only init early static TLS if it's used to store stack or
> pointer guards
> hurd: Initializy _dl_pagesize early in static builds
> aarch64: Make cpu-features definitions not Linux-specific
> aarch64: Add dl-procinfo
> aarch64: Allow building without kernel support for BTI
> mach: Add a basic AArch64 port
> hurd: Add a basic AArch64 port
> hurd: Implement TLS on AArch64
> hurd: Implement longjmp for AArch64
> Add FPE_FLTIDO
> hurd: Add an AArch64 signal implementation
> htl: Implement some support for TLS_DTV_AT_TP
> htl: Add an AArch64 implementation
> hurd: Add expected aarch64-gnu abistlists
Hi Sergey,
Would you please update and re-post your patch series, so that reviewers can check that it doesn't break existing targets? We (Linaro) had our pre-commit CI down in late December / early January, so most of your patches weren't tested, see [1].
[1] https://patchwork.sourceware.org/project/glibc/list/?series=29086
Thank you,
--
Maxim Kuvyrkov
https://www.linaro.org
prev parent reply other threads:[~2024-03-11 14:15 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
2024-01-03 17:14 ` [PATCH 01/23] hurd: Add some missing includes Sergey Bugaev
2024-01-03 20:43 ` Samuel Thibault
2024-01-03 21:08 ` Sergey Bugaev
2024-01-03 21:24 ` Sergey Bugaev
2024-01-03 21:35 ` Samuel Thibault
2024-01-03 21:00 ` Samuel Thibault
2024-01-03 17:14 ` [PATCH 02/23] hurd: Declare _hurd_intr_rpc_msg* with protected visibility Sergey Bugaev
2024-01-03 21:00 ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 03/23] Allow glibc to be compiled without EXEC_PAGESIZE Sergey Bugaev
2024-03-11 16:13 ` Florian Weimer
2024-03-25 11:58 ` Florian Weimer
2024-03-25 12:24 ` Sergey Bugaev
2024-04-10 11:57 ` Florian Weimer
2024-04-15 12:53 ` Sergey Bugaev
2024-04-22 21:01 ` Samuel Thibault
2024-01-03 17:14 ` [PATCH 04/23] mach: Drop some unnecessary vm_param.h includes Sergey Bugaev
2024-01-03 21:00 ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 05/23] hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now Sergey Bugaev
2024-01-03 17:14 ` [PATCH 06/23] mach: Drop SNARF_ARGS macro Sergey Bugaev
2024-01-03 21:00 ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 07/23] hurd: Pass the data pointer to _hurd_stack_setup explicitly Sergey Bugaev
2024-01-04 22:47 ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 08/23] hurd: Drop x86-specific assembly from init-first.c Sergey Bugaev
2024-01-04 22:48 ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 09/23] hurd: Make init-first.c no longer x86-specific Sergey Bugaev
2024-01-04 22:48 ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 10/23] hurd: Only init early static TLS if it's used to store stack or pointer guards Sergey Bugaev
2024-01-04 22:48 ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 11/23] hurd: Initializy _dl_pagesize early in static builds Sergey Bugaev
2024-01-04 22:48 ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 12/23] aarch64: Make cpu-features definitions not Linux-specific Sergey Bugaev
2024-01-04 22:48 ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 13/23] aarch64: Add dl-procinfo Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 14/23] aarch64: Allow building without kernel support for BTI Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 15/23] mach: Add a basic AArch64 port Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 16/23] hurd: " Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 17/23] hurd: Implement TLS on AArch64 Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 18/23] hurd: Implement longjmp for AArch64 Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 19/23] Add FPE_FLTIDO Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 20/23] hurd: Add an AArch64 signal implementation Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 21/23] htl: Implement some support for TLS_DTV_AT_TP Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 22/23] htl: Add an AArch64 implementation Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 23/23] hurd: Add expected aarch64-gnu abistlists Sergey Bugaev
2024-01-03 17:30 ` [RFC PATCH 00/23] aarch64-gnu port Joseph Myers
2024-01-03 17:57 ` Sergey Bugaev
2024-03-11 16:10 ` Florian Weimer
2024-03-11 13:47 ` H.J. Lu
2024-03-11 15:38 ` Sergey Bugaev
2024-03-11 14:14 ` Maxim Kuvyrkov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41F1EBC2-5556-4704-85F5-58B068C8CE59@linaro.org \
--to=maxim.kuvyrkov@linaro.org \
--cc=adhemerval.zanella@linaro.org \
--cc=bug-hurd@gnu.org \
--cc=bugaevc@gmail.com \
--cc=helmut@subdivi.de \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).