From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 0CAA83858D1E for ; Sun, 12 Feb 2023 16:01:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0CAA83858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x630.google.com with SMTP id k13so11302910plg.0 for ; Sun, 12 Feb 2023 08:01:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1676217684; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/Ii5lV93SVkrNFLpgzhv+Rv+0mAty+qkERSAcRCZzkw=; b=DDmwBw5nxDCN28gAuEm6vmrbu7HVnWgq8zi87DTS26Vwtg9yk7cnTAPAktBIAL+DKA yCetwfmwdOAh5hy3jA0qB11mvOUYKxNbJXo8NLZD0yCz0J74ZyePNASeOTXiNID1cthx SefGZyZwhtr1EuvBwtmi+e/i9+tuMT+Jm6PHQh4oSCglULFU5yon7lPzC1YcR7CJUyJ2 sFGqyZ1Mun9r3xFO3n3AikZDNHFjI6AHiTlOmyXvRTk/WVEGLdlXvkaVbbHNMe3VmEkv cyn7w4ajA6WpiSvVaxXPyB1dOLas6nUaCTJz52Oi6S5SSfjdZr0tka9IR1I38YSD7NYu Mpxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676217684; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/Ii5lV93SVkrNFLpgzhv+Rv+0mAty+qkERSAcRCZzkw=; b=eVzC4u66LCfMHcXaGfmWExNJX44aDw/cgqNrhOX3JBW6oEBZIpSR+u5uCKY8FM4YEp BR5plcmpXnTuB0+70AS6YWgwR6N4m6EsUzW8V7CRgYgVkFpwabdpduU+e/VbTBTFyL5i uw8BXaS9orD0jyQ/XA6GD0pdtQPVfNoI0mLrwGgW3YgmGINdnABpaQ8RBuBGHGXW9+q1 Eg7sC3NWlJ6h+VvBG0EWn6/ESq0WRGSOfiDxJdUDHCBK7WMKTxx44zlI3eKx1lkgGeWX AqpAIJdf1/jQKltorQK1YXLqfiaqf3Fp8BoWSGmL8PRsyY7odXA0ER13KmiaetfZyOp7 zYVw== X-Gm-Message-State: AO0yUKX/6nUH3rT3Um6DafcMdvJK/LDpl0URgbWa9NaHBprckDvru+be YwGPlYyETDS7JLkcAp+kTSaD0IF3+YYMRKNS9WA3r155NgAQug== X-Google-Smtp-Source: AK7set/KziC7U28UUY7OPwaLoXcpe9KQVWhzxsrAZs5ZeYSeJnI7giPoAcjurQj7Y5R2l2OO5P58RPbMYICme5/IkD0= X-Received: by 2002:a17:902:8693:b0:197:90f8:f36 with SMTP id g19-20020a170902869300b0019790f80f36mr5160252plo.9.1676217684164; Sun, 12 Feb 2023 08:01:24 -0800 (PST) MIME-Version: 1.0 References: <20230212111044.610942-1-bugaevc@gmail.com> <20230212111044.610942-10-bugaevc@gmail.com> <20230212150710.zuzw5nqdtwvflkrj@begin> <20230212154623.3f7qppulbp33fth7@begin> In-Reply-To: <20230212154623.3f7qppulbp33fth7@begin> From: Sergey Bugaev Date: Sun, 12 Feb 2023 19:01:13 +0300 Message-ID: Subject: Re: [RFC PATCH glibc 9/12] mach: Look for mach_i386.defs on x86_64 too To: Samuel Thibault Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org, =?UTF-8?B?RmzDoXZpbyBDcnV6?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sun, Feb 12, 2023 at 6:46 PM Samuel Thibault w= rote: > > Sergey Bugaev, le dim. 12 f=C3=A9vr. 2023 18:38:03 +0300, a ecrit: > > Since mach/machine/syscall_sw.h is the i386 version on x86_64 (or -- > > is it not supposed to be?) > > Nobody yet decided that the system call interface would be the same on > i386 and on x86_64 :) > > Most probably we'll need a different header, to put the trap number of > rax instead of eax, notably. And the systemcall instruction will most > probably not be an lcall. > > > the _MACH_I386_SYSCALL_SW_H_ guard is the one to fake, hence setting > > mach-machine to i386. > > This can be already fixed by shipping a different file in mach, as we'll > most probably want in the end anyway. I've kind of assumed that the x86_64 Mach using / installing the i386 headers is intentional, and if some things (like the actual syscall ABI) are to be different, they'd both be defined in the same file, predicated on an ifdef. This is what XNU does for sure, see osfmk/mach/i386/syscall_sw.h Sergey