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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 35EA0398B853 for ; Thu, 5 Aug 2021 08:17:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 35EA0398B853 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-113-rtqVS9waNTeKuW93gNAhlw-1; Thu, 05 Aug 2021 04:17:56 -0400 X-MC-Unique: rtqVS9waNTeKuW93gNAhlw-1 Received: by mail-wr1-f72.google.com with SMTP id p12-20020a5d68cc0000b02901426384855aso1651748wrw.11 for ; Thu, 05 Aug 2021 01:17:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2Cst8Z51pmwCGCMpYLEXrk6+qjON2X5Y2PdR3X6vFNQ=; b=J3RfcnPSedC1zhIGoyHqqOG4XL5LYDO2+bDS8DV/aNSjUaj2d1ILCx0je0POcPCf+Z /8scZ5iUoTX1Wf+ayqNZcctq3KuO18Ew6RKNNHLWJN/KH9mJXVgHrKOv6x+u7oqyUD/E tPgx2HrvQ0i0b8nTxCNj9TP2WBG7MZwoICqmI6XmEzSk8h8ikZm0EY1BTO5IWlBr+v1Q kRx8Gc7Lw0/ujcqZ2yW8zPECMbMJCvY7craUeYiFP13Ym/xOagud7JYDmbQ4nlQ0eNlE Q1rP/3bY8nxPRlX+L2R8u33A5JIeGtUqLziABXBdAT/NjDLVTPFs6LpX6g6cI9vvTDGk ka0A== X-Gm-Message-State: AOAM532DU+P4L+U+Tl5s++i1LQ1sgiDUCCprmjMvXgxjKKuS5/hzy11Y Vq5vqQbkNMWHwYWuBDHxyPMubUirzhsdi1j6esL2IcU4ooCgxgOuXQnaJh4x05mERT8auucM0VI KIV79Nrp70O3SLyngyXe2Rpdb9fzA6iCH1wCzkT5aQDBdG9IvRHkDr6BBLqjv8cpB6YDhKT4= X-Received: by 2002:a05:600c:154b:: with SMTP id f11mr13903981wmg.116.1628151475503; Thu, 05 Aug 2021 01:17:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvqkQmR+nYXI05vsIN5Tq+Z9JmghHyLhY2we8OYYrBGDo+ZzIW6qI6pPepxt9bTkibvLcDeg== X-Received: by 2002:a05:600c:154b:: with SMTP id f11mr13903969wmg.116.1628151475341; Thu, 05 Aug 2021 01:17:55 -0700 (PDT) Received: from zarquon.pink (cpc108959-cmbg20-2-0-cust731.5-4.cable.virginm.net. [80.0.22.220]) by smtp.gmail.com with ESMTPSA id o17sm5132104wrw.17.2021.08.05.01.17.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Aug 2021 01:17:54 -0700 (PDT) To: libffi-discuss@sourceware.org References: From: Andrew Haley Subject: Re: is fork() supported? Message-ID: Date: Thu, 5 Aug 2021 09:17:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 08:18:00 -0000 On 8/4/21 9:00 PM, DJ Delorie via Libffi-discuss wrote: > I don't mean fork/exec (duh) but a fork() and keep going... > > Consider a case where a process is using a file-backed mapping for > closures; a fork() doesn't isolate that backing between parent/child > so there's a chance (for example) the parent could deallocate a > closure that the child needs, etc... > > 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. 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 -- Andrew Haley (he/him) Java Platform Lead Engineer Red Hat UK Ltd. https://keybase.io/andrewhaley EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671