From patchwork Sat Feb 18 20:37:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Bugaev X-Patchwork-Id: 1744584 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=Vg0eeJMS; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PK0rY3lMtz23r4 for ; Sun, 19 Feb 2023 07:38:37 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 781203888C65 for ; Sat, 18 Feb 2023 20:38:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 781203888C65 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676752715; bh=JZ8l+wX0hTHvH+Lr660bP1MnRHUZbTSOQbPrJJMlDc8=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Vg0eeJMSaI4zUOzG9gMhWSVgStYTPXoc6iLfgqTYKwW+rmehtzjaLupqA7xmsoJJ9 hwkw6DkfmXz2easdCth5PSpk6XyQWjkKAn/2zMrp+mDWIYvSZ2q2LMwUIkixdTtg4C SGoTYOfAyWqBrjVngdclnueN8xfz6bmt9EHWPXME= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by sourceware.org (Postfix) with ESMTPS id 1C4DB3858D32 for ; Sat, 18 Feb 2023 20:37:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1C4DB3858D32 Received: by mail-lj1-x22a.google.com with SMTP id z4so1395717lji.0 for ; Sat, 18 Feb 2023 12:37:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JZ8l+wX0hTHvH+Lr660bP1MnRHUZbTSOQbPrJJMlDc8=; b=A4jfy3F0Hp9UVmJXeipwRgt/n7Sy6oI2PcR01x+EZm3XJ9fmAcK12tW6qqphmdPbpd TnT7UKGarZZNTforx5bmbm/8D6nxvwjkFO+W3A+UI2oRVms5Rx5fMm0mDLOxk/h2TzOe 9RMY8tfA/us/8MKCVmkfJ1RnjFqLnro67o+FrItFz5Z/tr2fVTUvQKSyfpzy14RrwTs3 KdVWPRUqKjO5dAvIz4ljcx+aSeMH5lJMYofL4QY/ufEmBSmh8/4y85PkkbVLmzJNOtIh 3bJKaiA8bU+C22m7TFtwTB7lfG5I0C8Kxk9kqN3ngWM3x94SY5YUOx8ENADVnh+QH070 qsPw== X-Gm-Message-State: AO0yUKXc3WC9vHlVhVoh8NN3p2P/MxaoFJfrFBstfY7hwlraG4p1iPAE X0HZPkLeKY9OmgH70tiuyJY= X-Google-Smtp-Source: AK7set88zd72y5bR+4S/n1gpyBdq73CL+sZUTbWTxLct/ZDdR29oxr2Xm8BAlhGtYrcSy93k17Owuw== X-Received: by 2002:a2e:2a43:0:b0:293:5002:80ef with SMTP id q64-20020a2e2a43000000b00293500280efmr1479246ljq.20.1676752651320; Sat, 18 Feb 2023 12:37:31 -0800 (PST) Received: from surface-pro-6.. ([2a00:1370:818c:4a57:e4a7:ca9:e8d7:4ead]) by smtp.gmail.com with ESMTPSA id u15-20020a05651c130f00b002934febffe4sm1004049lja.128.2023.02.18.12.37.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Feb 2023 12:37:30 -0800 (PST) To: bug-hurd@gnu.org, libc-alpha@sourceware.org Cc: =?utf-8?q?Fl=C3=A1vio_Cruz?= , Sergey Bugaev Subject: [RFC PATCH 0/9] More x86_64-gnu glibc work Date: Sat, 18 Feb 2023 23:37:08 +0300 Message-Id: <20230218203717.373211-1-bugaevc@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-3.8 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Sergey Bugaev via Libc-alpha From: Sergey Bugaev Reply-To: Sergey Bugaev Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Hello, here's some more work on the x86_64-gnu glibc port. Large parts of glibc (almost all of it?) builds, in particular mach/subdir_lib builds cleanly. Patch 6 is really unrelated to the rest of the changes, it's just a small thing that I've noticed while single-stepping through glibc startup, trying to understand which order things are getting called in, and from where. Patch 8/9 adds i386_fsgs_base_state to Mach headers. Does this look reasonable? I have not written an implementation. Any volunteers? :) Then patch 9/9 adds a fairly complete implementation of tls.h based on that API. It turned out that thread_state.h did not need large changes compared to the i386 version after all, so consider applying Flavio's patch ("Define PC, SP and SYSRETURN for hurd x86_64") instead of the version my patch adds (but keep the rest of my patch). I'm not super sure that the thing I've done with __libc_tls_initialized is correct / makes sense; please do take a look! Large parts remaining: * ucontext / sigcontext * intr_msg / signal trampoline Sergey