From patchwork Mon Aug 16 09:22:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1517072 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gp7wn0m9pz9sCD for ; Mon, 16 Aug 2021 19:22:33 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B5C66393AC27 for ; Mon, 16 Aug 2021 09:22:30 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from hera.aquilenet.fr (hera.aquilenet.fr [185.233.100.1]) by sourceware.org (Postfix) with ESMTPS id 82589393AC14 for ; Mon, 16 Aug 2021 09:22:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 82589393AC14 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=ens-lyon.org Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 9ED3F1DD; Mon, 16 Aug 2021 11:22:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DxmxF_1hqFXX; Mon, 16 Aug 2021 11:22:16 +0200 (CEST) Received: from begin.home (unknown [IPv6:2a01:cb19:956:1b00:de41:a9ff:fe47:ec49]) by hera.aquilenet.fr (Postfix) with ESMTPSA id BC9891D2; Mon, 16 Aug 2021 11:22:16 +0200 (CEST) Received: from samy by begin.home with local (Exim 4.94.2) (envelope-from ) id 1mFYox-00CQFY-GS; Mon, 16 Aug 2021 11:22:15 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Subject: [hurd,commited] hurd: Drop fmh kludge Date: Mon, 16 Aug 2021 11:22:15 +0200 Message-Id: <20210816092215.2960797-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spamd-Bar: +++++ X-Rspamd-Server: hera Authentication-Results: hera.aquilenet.fr X-Rspamd-Queue-Id: 9ED3F1DD X-Spamd-Result: default: False [5.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; MID_CONTAINS_FROM(1.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[] X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , Cc: commit-hurd@gnu.org Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Gnumach's 0650a4ee30e3 implements support for high bits being set in the mask parameter of vm_map. This allows to remove the fmh kludge that was masking away the address range by mapping a dumb area there. --- sysdeps/mach/hurd/dl-sysdep.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index 4b2072e5d5..968a58f668 100644 --- a/sysdeps/mach/hurd/dl-sysdep.c +++ b/sysdeps/mach/hurd/dl-sysdep.c @@ -66,37 +66,6 @@ void *_dl_random attribute_relro = NULL; struct hurd_startup_data *_dl_hurd_data; -#define FMH defined(__i386__) -#if ! FMH -# define fmh() ((void)0) -# define unfmh() ((void)0) -#else -/* XXX loser kludge for vm_map kernel bug, fixed by gnumach's 0650a4ee30e3 */ -#undef ELF_MACHINE_USER_ADDRESS_MASK -#define ELF_MACHINE_USER_ADDRESS_MASK 0 -static vm_address_t fmha; -static vm_size_t fmhs; -static void unfmh(void){ -__vm_deallocate(__mach_task_self(),fmha,fmhs);} -static void fmh(void) { - error_t err;int x;vm_offset_t o;mach_port_t p; - vm_address_t a=0x08000000U,max=VM_MAX_ADDRESS; - while (!(err=__vm_region(__mach_task_self(),&a,&fmhs,&x,&x,&x,&x,&p,&o))){ - __mach_port_deallocate(__mach_task_self(),p); - if (a+fmhs>=0x80000000U){ - max=a; break;} - fmha=a+=fmhs;} - if (err) assert(err==KERN_NO_SPACE); - if (!fmha)fmhs=0;else{ - fmhs=max-fmha; - err = __vm_map (__mach_task_self (), - &fmha, fmhs, 0, 0, MACH_PORT_NULL, 0, 1, - VM_PROT_NONE, VM_PROT_NONE, VM_INHERIT_COPY); - assert_perror(err);} - } -/* XXX loser kludge for vm_map kernel bug */ -#endif - ElfW(Addr) _dl_sysdep_start (void **start_argptr, @@ -147,8 +116,6 @@ _dl_sysdep_start (void **start_argptr, && _dl_hurd_data->user_entry == 0) _dl_hurd_data->user_entry = (vm_address_t) ENTRY_POINT; -unfmh(); /* XXX */ - #if 0 /* XXX make this work for real someday... */ if (_dl_hurd_data->user_entry == (vm_address_t) ENTRY_POINT) /* We were invoked as a command, not as the program interpreter. @@ -257,8 +224,6 @@ unfmh(); /* XXX */ /* Initialize frequently used global variable. */ GLRO(dl_pagesize) = __getpagesize (); -fmh(); /* XXX */ - /* See hurd/hurdstartup.c; this deals with getting information from the exec server and slicing up the arguments. Then it will call `go', above. */