From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 67A843858405 for ; Tue, 24 Aug 2021 18:45:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 67A843858405 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-13-VKNE3crWNvq-MVj8aCLSTw-1; Tue, 24 Aug 2021 14:45:44 -0400 X-MC-Unique: VKNE3crWNvq-MVj8aCLSTw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5D81987D542; Tue, 24 Aug 2021 18:45:43 +0000 (UTC) Received: from greed.delorie.com (ovpn-112-6.rdu2.redhat.com [10.10.112.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2BDE45DA60; Tue, 24 Aug 2021 18:45:43 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.15.2/8.15.2) with ESMTP id 17OIjgox1420239; Tue, 24 Aug 2021 14:45:42 -0400 From: DJ Delorie To: Jay K Cc: libffi-discuss@sourceware.org Subject: Re: is fork() supported? In-Reply-To: Date: Tue, 24 Aug 2021 14:45:42 -0400 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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: libffi-discuss@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libffi-discuss mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2021 18:45:47 -0000 Jay K writes: > 1 Sorry, I assumed mail from DJ was about djgpp, and that context was > lacking in libffi. My mistake. Ha! Yeah, not about djgpp, which I think "just works" ;-) > 3 So libffi no longer has read/write/execute memory, or turns > read/write into execute, correct? The problem case is when libffi can't mmap a chunk of write+exec memory, and resorts to writing to a file and mapping the file read+exec, which happens in Linux with certain selinux security profiles. Those mappings get shared between a parent/child pair. > 4 So the implied assertion or question then, does that work very much > sweep away "all such problems", or some remain? I think the trampfd static templates *should* solve the problem on platforms that support mmap(). But, as I said, this is besides the point - the question is "is it supported", not "is it possible". Given we've added at least one closure method that violates the fork() premise - was adding that method a bug, or does it imply that it's not supported?