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.133.124]) by sourceware.org (Postfix) with ESMTP id 6CEB73858436 for ; Thu, 5 Aug 2021 18:13:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6CEB73858436 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-266-bUL1ERH7NHaln7Mk85woiw-1; Thu, 05 Aug 2021 14:13:17 -0400 X-MC-Unique: bUL1ERH7NHaln7Mk85woiw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4D2DF100E34B for ; Thu, 5 Aug 2021 18:13:16 +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 1AAD34A66; Thu, 5 Aug 2021 18:13:16 +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 175IDFO11060955; Thu, 5 Aug 2021 14:13:15 -0400 From: DJ Delorie To: Andrew Haley , Florian Weimer Cc: libffi-discuss@sourceware.org Subject: Re: is fork() supported? In-Reply-To: Date: Thu, 05 Aug 2021 14:13:15 -0400 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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: Thu, 05 Aug 2021 18:13:19 -0000 >> I see four options... >> >> 1. Not supported. Sorry. >> >> 2. Supported only if you have fork-able closure backings (mmap or >> maybe ktmpfile, but not file-backed) but this means documenting >> that (at least) selinux settings might affect this. Caveat >> Programmer. >> >> 3. Some API that says "I need this" so it can fail in a more useful >> way than "segfault". >> >> 4. Fully supported, and we have some work to do to handle fork events. Andrew Haley writes: > The bug that will never die. > > https://bugzilla.redhat.com/show_bug.cgi?id=1249685 > https://bugzilla.redhat.com/show_bug.cgi?id=531233 > https://bugzilla.redhat.com/show_bug.cgi?id=772657 Sounds like a vote for (1) or (2) ;-) Florian Weimer writes: > Well, there are two ways to fix it: Avoid the need for alias mappings by > switching to static trampolines, or create new alias mappings upon fork. > (A third option would be kernel support for private alias mappings. A > fourth, get some form of explicit JIT support for SELinux.) Sounds like a vote for (4)