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 ESMTPS id F31393857410 for ; Wed, 21 Sep 2022 12:49:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F31393857410 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663764581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/RveKhCENmK7Si4KD0qfxZY88smLuaaCsmTRz99dgoE=; b=LaZdrk5Y+nBNPhr5abVPP1ATzXMQfPF2WP916OxORSuDUTQ1iEJKOEmjdlUn1EtdeL1Wpn uELYsVQ9Y0/00KpOZdH7wz696gBNDx0JJeQ73NsjWAaWtnTGRapNrp5KLXIvgq3dSPFuGJ lXxQ2OB0cyI1V3ikjEC0c5dut0SMRSE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-438-3WW3n2BnOKOeWMfjfd3blA-1; Wed, 21 Sep 2022 08:49:27 -0400 X-MC-Unique: 3WW3n2BnOKOeWMfjfd3blA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BB673855421; Wed, 21 Sep 2022 12:49:21 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.54]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 343EF1415138; Wed, 21 Sep 2022 12:49:21 +0000 (UTC) From: Florian Weimer To: Adhemerval Zanella Netto via Libc-alpha Cc: Adhemerval Zanella Netto Subject: Re: [committed] hppa: undef __ASSUME_SET_ROBUST_LIST References: Date: Wed, 21 Sep 2022 14:49:19 +0200 In-Reply-To: (Adhemerval Zanella Netto via Libc-alpha's message of "Wed, 21 Sep 2022 09:16:44 -0300") Message-ID: <87illg3nao.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Adhemerval Zanella Netto via Libc-alpha: > On 20/09/22 17:20, John David Anglin wrote: >> QEMU does not support support set_robust_list. Thus, we need >> to enable detection of set_robust_list system call. >> >> Signed-off-by: John David Anglin >> --- >> diff --git a/sysdeps/unix/sysv/linux/hppa/kernel-features.h b/sysdeps/unix/sysv/linux/hppa/kernel-features.h >> index 0cd21ef0fa..079612e4aa 100644 >> --- a/sysdeps/unix/sysv/linux/hppa/kernel-features.h >> +++ b/sysdeps/unix/sysv/linux/hppa/kernel-features.h >> @@ -30,3 +30,6 @@ >> >> #undef __ASSUME_CLONE_DEFAULT >> #define __ASSUME_CLONE_BACKWARDS 1 >> + >> +/* QEMU does not support set_robust_list. */ >> +#undef __ASSUME_SET_ROBUST_LIST >> > > Does it happen only for hppa? If is a generic missing feature maybe we should > undef __ASSUME_SET_ROBUST_LIST for all architectures. I think it's just a 32-bit/64-bit mismatch issue. You can't create 32-bit robust futexes from a 64-bit process because the pointer size in the robust list differs. For non-process-shared mutexes, qemu-user should be able to emulate these futexes in userspace. It already has to intercept thread exit, and it can walk the mutex list at that time. I don't think it makes sense to pessimize bare-metal uses simply because there's a qemu-user limitation. Thanks, Florian