From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121326 invoked by alias); 20 Apr 2017 12:52:45 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 121296 invoked by uid 89); 20 Apr 2017 12:52:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy= X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D12339D416 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D12339D416 Subject: Re: [PATCH 1/2] nptl: Remove __ASSUME_SET_ROBUST_LIST To: Adhemerval Zanella Cc: GNU C Library References: <1492550000-31374-1-git-send-email-adhemerval.zanella@linaro.org> <35b8a72e-dfce-6cd1-0998-a3866239da30@redhat.com> <85636314-6928-361f-234b-badec623b5a5@linaro.org> <8469b941-ac1f-1cda-ac15-1f8747ea69a2@linaro.org> From: Florian Weimer Message-ID: <12b8e1e7-44ea-a526-0010-9f64c1e559a2@redhat.com> Date: Thu, 20 Apr 2017 12:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <8469b941-ac1f-1cda-ac15-1f8747ea69a2@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2017-04/txt/msg00412.txt.bz2 On 04/20/2017 02:50 PM, Adhemerval Zanella wrote: > > > On 19/04/2017 15:09, Florian Weimer wrote: >> On 04/19/2017 07:38 PM, Adhemerval Zanella wrote: >>> On Wed, Apr 19, 2017 at 12:28 PM, Florian Weimer wrote: >>>> On 04/19/2017 04:17 PM, Adhemerval Zanella wrote: >>>>> >>>>> The problem is kernel supports for some architecture depends of kernel >>>>> config >>>>> and the underlying hardware revision/model. >>>> >>>> >>>> I understand that. But I have seen a lot of use of robust mutexes lately, >>>> and I'm sure these developers aren't aware that the mutexes aren't portable >>>> across GNU/Linux (the Linux architecture subset supported by glibc). >>>> >>>> I expect it's like the missing accept4 system call—you need to provide the >>>> set_robust_list system call in the kernel if you want to a working, modern >>>> system. >>> >>> But my point is with current minimum supported kernel version for some >>> architectures >>> we can't simple assume set_robust_list support and even bumping minimum kernel >>> version for some architectures also do not solve the issue (on mips >>> for instance). >> >> Hmm, maybe you are right, and we have to keep things this way for now. >> >> But I don't like that your patch reintroduces the conditional code. You could use >> >> #define __set_robust_list_avail 1 >> >> for the __ASSUME_SET_ROBUST_LIST case to reduce clutter, and let GCC do the rest. > > Rechecking what you meant, I am not following you here: the idea is to have > __set_robust_list_avail being a runtime variable and get rid of the _ASSUME > define. How using a define would help in this way? I suggest to keep the __ASSUME_SET_ROBUST_LIST define but concentrate its use to a single place by making __set_robust_list_avail available unconditionally, but as a constant for __ASSUME_SET_ROBUST_LIST. This is the pattern we used elsewhere (e.g. for have_cloexec). Thanks, Florian