Message ID | 20240323173301.151066-3-bugaevc@gmail.com |
---|---|
State | New |
Headers | show
Return-Path: <libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=ciPv629Z; dkim-atps=neutral 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=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V25vR3LJbz1yXr for <incoming@patchwork.ozlabs.org>; Sun, 24 Mar 2024 04:35:47 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 673C0385828B for <incoming@patchwork.ozlabs.org>; Sat, 23 Mar 2024 17:35:45 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by sourceware.org (Postfix) with ESMTPS id 9E18C3858D38 for <libc-alpha@sourceware.org>; Sat, 23 Mar 2024 17:35:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9E18C3858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9E18C3858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::133 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711215311; cv=none; b=xUPYQ+zVavcEB5h6YbfxInjLIrgLz1zqhnBMRyZug0urITmXONJRx7yG3W+qNDH4p4KJEGbkmuOuthgJiUALRRMMxPNJQAGiCXUqpFJ9cKIQJB9OxMvL8UwLkwomxGHoABVZSeTXz+M9Z41eKl4fAMvC1qkCKIYM5MbO6BJ62yU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711215311; c=relaxed/simple; bh=QLm2gkFJkUHUSpODDW4W2hXFVO5ktCW5m1/+v8zCsKk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=vUk8pnPCd/ek8tV/++4LWadvVhwKrAi2GFsnP4g1bNObl2GNaWCMGCYiuecfhWjX3SnsHNsUMKqjqRYWGAaY6g+Wgims6mzbi3c2cPMQ0QostMgPU8I6UqCXuV9qz9uxnrpNW24nQoxIvJHssWgWU5JgTYlk+k5YHpGgsUvABY4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-513d4559fb4so4058829e87.3 for <libc-alpha@sourceware.org>; Sat, 23 Mar 2024 10:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711215308; x=1711820108; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JFEeh4wxyCQEooqv37+/ruhSLJ/BYeXTKxuq5I80Ufc=; b=ciPv629ZQDzbUR3Q1AloZHTZpkpmQdl7fY0oBZ7lrF4MNWmgpOBS/Agcmjag3ly4DH mtK6ZtK65oGgQ1/UoTICqNbgBMM6Kztcwatqen4sE6IziDHC5d+CI80OYIGgAzp3Hwfw YZOeR/8N6UJccoR2qkSCC7Exk02CfqBkGHUzdp2G3Yl3+PJ9yHeZ1mTi2m0JxSMOjl7+ B4Wh0dmiDVK44C0zZFm+3/VA6eBDkKssVGf9i6fo7SE+ioxJQGcDoruB6iX8aOTcdiuM 8RLrRJWfvqw22GK1UZrSQz19mX7yrqsUx1bMyTXr889gAGP6C53syBGqrI5fN5X+p7RO QT3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711215308; x=1711820108; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JFEeh4wxyCQEooqv37+/ruhSLJ/BYeXTKxuq5I80Ufc=; b=UGDKjqMQ6LUOBMm2ul5qwjslr9wVqItIofwT8EUcYCMoAhj7Mf5sEC1AJo63OKpsS4 qeU4deaYMgBH/glOXMXew+54RGcSvNj1lMHHbNMSTq81Z0IbXD/9gz/LEAnL09wNRIBk qZOmjyTtn7VTgIkyyAW8xyDIozhi4vihuAbUYUWfGR4hw8P3YRSzYCD/GNlsiO5n7Zmy wTl0+Qf01G4HIIWg17PH/5apRAqZPAjPtunEbpxzS4SD11f3krnrohD8Zzch8+kE1wWz lVAolT+8Eg0uJvTp4rWUocflWGIzVDq/8j5Ki3+l71Uh/n6rG2NgpEx/i+Z8PRD26Alc vN0g== X-Gm-Message-State: AOJu0YxgHPM2qfHMghpUeFAw2j+lE9zxKV/lC5uah2qVidp2pOlh3785 hfH1+zrRM3kXVMLOhNq0hwcQsv+rnIaA2FcsDXeWtx8luBAxeLul5S84TDO5 X-Google-Smtp-Source: AGHT+IHcAINUAaBytMDKgGBGKkB0T2bMfeSu8323F+HqdY2f70X38i1BNKpuryi90jIlLQsebIq1wA== X-Received: by 2002:a19:c518:0:b0:515:9789:a705 with SMTP id w24-20020a19c518000000b005159789a705mr1649838lfe.15.1711215305615; Sat, 23 Mar 2024 10:35:05 -0700 (PDT) Received: from surface-pro-6.. (79-139-171-253.dynamic.spd-mgts.ru. [79.139.171.253]) by smtp.gmail.com with ESMTPSA id g20-20020ac25394000000b00513973dee6fsm361290lfh.150.2024.03.23.10.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 10:35:05 -0700 (PDT) From: Sergey Bugaev <bugaevc@gmail.com> To: libc-alpha@sourceware.org, bug-hurd@gnu.org Cc: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>, Luca <luca@orpolo.org> Subject: [PATCH v2 02/20] hurd: Stop relying on VM_MAX_ADDRESS Date: Sat, 23 Mar 2024 20:32:43 +0300 Message-ID: <20240323173301.151066-3-bugaevc@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240323173301.151066-1-bugaevc@gmail.com> References: <20240323173301.151066-1-bugaevc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, 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.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org |
Series |
aarch64-gnu port & GNU/Hurd on AArch64 progress
|
expand
|
diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c index 882a0347..8b1928d1 100644 --- a/hurd/hurdsig.c +++ b/hurd/hurdsig.c @@ -1658,8 +1658,8 @@ _hurdsig_getenv (const char *variable) while (*ep) { const char *p = *ep; - _hurdsig_fault_preemptor.first = (long int) p; - _hurdsig_fault_preemptor.last = VM_MAX_ADDRESS; + _hurdsig_fault_preemptor.first = (unsigned long int) p; + _hurdsig_fault_preemptor.last = (unsigned long int) -1; if (! strncmp (p, variable, len) && p[len] == '=') { size_t valuelen; @@ -1671,8 +1671,8 @@ _hurdsig_getenv (const char *variable) memcpy (value, p, valuelen); break; } - _hurdsig_fault_preemptor.first = (long int) ++ep; - _hurdsig_fault_preemptor.last = (long int) (ep + 1); + _hurdsig_fault_preemptor.first = (unsigned long int) ++ep; + _hurdsig_fault_preemptor.last = (unsigned long int) (ep + 1); } _hurdsig_end_catch_fault (); return value;
We'd like to avoid committing to a specific size of virtual address space (i.e. the value of VM_AARCH64_T0SZ) on AArch64. While the current version of GNU Mach still exports VM_MAX_ADDRESS for compatibility, we should try to avoid relying on it when we can. This piece of logic in _hurdsig_getenv () doesn't actually care about the size of user- accessible virtual address space, it just wants to preempt faults on any addresses starting from the value of the P pointer and above. So, use (unsigned long int) -1 instead of VM_MAX_ADDRESS. While at it, change the casts to (unsigned long int) and not just (long int), since the type of struct hurd_signal_preemptor.{first,last} is unsigned long int. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> --- hurd/hurdsig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)