From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by sourceware.org (Postfix) with ESMTPS id 4EB5B3955CA9 for ; Tue, 3 May 2022 17:01:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4EB5B3955CA9 Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-e2fa360f6dso17804354fac.2 for ; Tue, 03 May 2022 10:01:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=3Z4iWn8h7U/5QUr2YkH6nn7gS8YK6U0XZFRjnTToAyQ=; b=IvndfjL7k5XipUQkgmS/JIN3EQJ4/eSFlzNLa7sUIhZ33Hoo7aZxcpw24SRr6wFFQu UyuYRQdP1RPd4agn+0KA0jpHjVigu+gYxRjF44oeOizPYqI6sMubbYPQCVHRaO3hvXqy SSGtrfDNPV6SNI19fjbe+Zt721ujjEsAy6HKS3dOsVZo6lLPgeJ8FPsgEyWLllyIwshn iNJo+ItNVIniPoVQCpqfoioW5ToKVPlrsowx/DctVlRSKp3vyN+QX4EBZ+rAitcqFosN ZbPKIK93gZ3bBFM5cklbdeL77jSIUwIqst9b3sM43DZAxaSbM5PwG09lqll1F6NdNcGn jjJw== X-Gm-Message-State: AOAM532I2Jlj2PO4K53nvsAuuLmt0HHCcLe5XgQysu5ZBilsY6HWkV81 30P02xCc6kHlKbEm/I3tKQYSJZlcXFi2wQ== X-Google-Smtp-Source: ABdhPJz6Bu07g+2qidg78tYn1XA7qxVUx9uTenPFOpTTeZFzTefZ7uXZcz2MHy5CGda1LTdLV4Tv7A== X-Received: by 2002:a05:6870:4623:b0:ed:c502:bf3d with SMTP id z35-20020a056870462300b000edc502bf3dmr1804585oao.100.1651597305885; Tue, 03 May 2022 10:01:45 -0700 (PDT) Received: from ?IPV6:2804:431:c7cb:726:bb0f:4f0c:a44b:4ae1? ([2804:431:c7cb:726:bb0f:4f0c:a44b:4ae1]) by smtp.gmail.com with ESMTPSA id e2-20020a4aa602000000b0035ef3da8387sm2166957oom.4.2022.05.03.10.01.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 May 2022 10:01:44 -0700 (PDT) Message-ID: <7d39fd76-9802-03ca-0a24-bff8223eb53e@linaro.org> Date: Tue, 3 May 2022 14:01:42 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH 1/5] Linux: Implement a useful version of _startup_fatal Content-Language: en-US To: libc-alpha@sourceware.org References: <7a6a51b346a81484046ba392a9854a88568a92aa.1651518694.git.fweimer@redhat.com> <87ilqn4spx.fsf@oldenburg.str.redhat.com> <877d734qne.fsf@oldenburg.str.redhat.com> <87bkwfxkhg.fsf@oldenburg.str.redhat.com> <87levifvwm.fsf@oldenburg.str.redhat.com> <87h766ftx0.fsf@oldenburg.str.redhat.com> <87czguftaw.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella In-Reply-To: <87czguftaw.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: , X-List-Received-Date: Tue, 03 May 2022 17:01:49 -0000 On 03/05/2022 13:57, Florian Weimer via Libc-alpha wrote: > * H. J. Lu: > >> On Tue, May 3, 2022 at 9:44 AM Florian Weimer wrote: >>> >>> * H. J. Lu: >>> >>>> On Tue, May 3, 2022 at 9:01 AM Florian Weimer wrote: >>>>> >>>>> * H. J. Lu: >>>>> >>>>>> The startup codes can't use cancellation before it is ready. Do we need to >>>>>> check SHARED in this case? >>>>> >>>>> I think __libc_fatal shouldn't be a cancellation point. That's not >>>>> really related to SHARED. >>>> >>>> Should we define _startup_fatal unconditionally and always define >>>> I386_USE_SYSENTER as 0 for i386 so that _startup_fatal can be >>>> used safely during startup? >>> >>> Hmm. Isn't that what my patch does? >>> >> >> Your patch still checks BUILD_PIE_DEFAULT and SHARED. > > Ah, I see, thanks. You are right, the i386 version should define > I386_USE_SYSENTER unconditionally. Will fix. I think you might want to check ia64 as well, since it uses a TCB variable to call the syscall in some cases.