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 A57CF388803E for ; Wed, 21 Jul 2021 07:22:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A57CF388803E 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-265-EnbYWSuoM_q6XkkvkWvVhw-1; Wed, 21 Jul 2021 03:22:26 -0400 X-MC-Unique: EnbYWSuoM_q6XkkvkWvVhw-1 Received: by mail-wr1-f72.google.com with SMTP id d8-20020adf9c880000b0290141a87409b5so566341wre.16 for ; Wed, 21 Jul 2021 00:22:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RVFPmq6HK/jJWOuT5gOrF07Xp+7+mw7fp/SQbiXDAQM=; b=hSxW54+MgaJwaNkT5d9V7CjRQaBK123RiilBnNbGbKDm0RYHG+kyB1O+2uxeTpxYOf 2AktlZ5l7kXStarNJQV3KgxMj5GyACuLZj6xiLpC/jh2VYScOqQLfYZoKot051/Vmx4A DXjSxLZvIzRjntfZUabc20zS21PWb63xHGPdzWjYJyw+wFOBvylc2qNXlyXx3cvKuS3g xLXXy2qaeGCF2zsAujA2pTpbr3rQ7UqE+YlrZyE3b2S37dbKvJAgpv0PSaz3ZlucYzOd oc5eeUnCbhTiyrufsHwV1W8hx1MIhE/H1FIeHumFIakdKZa9VVwz4EIWOVgxr1eD8fmx X2jQ== X-Gm-Message-State: AOAM533LNFeWqFe/D0YXchY7VCmZ2qsluX6rIHBvvR4ToeY59bbsEl9K TD5RV1U0RGXF7H+s+8jTdmB+hH+UJy3NAIlDiuxTd8vULbo5iKQbEeMAjVVEzOJNktWXNaXwoT+ o84d5Vyox0/nDIGJtrRtv X-Received: by 2002:a5d:6da9:: with SMTP id u9mr40309271wrs.7.1626852145737; Wed, 21 Jul 2021 00:22:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYfc2RtEMzyomN1royoenyN++I5lsamEQRbQ46vs/Fo0lXhPD0u27UeqIS5tVkaQcvnVv0eg== X-Received: by 2002:a5d:6da9:: with SMTP id u9mr40309253wrs.7.1626852145553; Wed, 21 Jul 2021 00:22:25 -0700 (PDT) Received: from thuth.remote.csb (p5791d597.dip0.t-ipconnect.de. [87.145.213.151]) by smtp.gmail.com with ESMTPSA id f7sm25839124wru.11.2021.07.21.00.22.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Jul 2021 00:22:25 -0700 (PDT) Subject: Re: Disabling TLS address caching to help QEMU on GNU/Linux To: Florian Weimer , gcc@gcc.gnu.org, libc-alpha@sourceware.org, qemu-devel@nongnu.org References: <87im15qbp3.fsf@oldenburg.str.redhat.com> Cc: Stefan Hajnoczi , Iain Sandoe From: Thomas Huth Message-ID: Date: Wed, 21 Jul 2021 09:22:24 +0200 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: <87im15qbp3.fsf@oldenburg.str.redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 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_H4, 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: 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: Wed, 21 Jul 2021 07:22:30 -0000 On 20/07/2021 16.52, Florian Weimer wrote: > Currently, the GNU/Linux ABI does not really specify whether the thread > pointer (the address of the TCB) may change at a function boundary. [...] > One important piece of software for GNU is QEMU (not just for GNU/Linux, > Hurd development also benefits from virtualization). QEMU uses stackful > coroutines extensively. There are some hard-to-change code areas where > resumption happens across threads unfortunately. These increasingly > cause problems with more inlining, inter-procedural analysis, and a > general push towards LTO (which is also needed for some security > hardening features). Thanks a lot for your mail, Florian! As a context for those who read about this for the very first time: We're currently facing the problem that the coroutines in QEMU fail when compiling QEMU with -flto on a non-x86 architecture, see: https://bugzilla.redhat.com/show_bug.cgi?id=1952483#c6 > Should the GNU toolchain offer something to help out the QEMU > developers? I guess that would be extremely helpful... Thomas