From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65199 invoked by alias); 25 Jul 2019 07:53:38 -0000 Mailing-List: contact libc-help-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: libc-help-owner@sourceware.org Received: (qmail 65188 invoked by uid 89); 25 Jul 2019 07:53:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=H*c:GB2312, H*UA:6.1, H*u:6.1, our X-HELO: heian.cn.fujitsu.com Received: from mail.cn.fujitsu.com (HELO heian.cn.fujitsu.com) (183.91.158.132) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 Jul 2019 07:53:37 +0000 Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 25 Jul 2019 15:53:33 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id 688454CDE81D; Thu, 25 Jul 2019 15:53:35 +0800 (CST) Received: from [10.167.215.46] (10.167.215.46) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server id 14.3.439.0; Thu, 25 Jul 2019 15:53:34 +0800 Message-ID: <5D395FFB.30904@cn.fujitsu.com> Date: Thu, 25 Jul 2019 07:53:00 -0000 From: Yang Xu User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: Florian Weimer CC: Subject: Re: question about prctl return value type References: <5D382C5F.6020806@cn.fujitsu.com> <87pnlzn1xs.fsf@oldenburg2.str.redhat.com> In-Reply-To: <87pnlzn1xs.fsf@oldenburg2.str.redhat.com> Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit X-yoursite-MailScanner-ID: 688454CDE81D.AB848 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: xuyang2018.jy@cn.fujitsu.com X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg00023.txt.bz2 on 2019/07/24 18:48, Florian Weimer wrote: > * Yang Xu: > >> Since kernel syscall use long value for return, why we set int in >> sys/prctl.h(glibc). as below: >> >> /include/sys/prctl.h >> >> 1 #ifndef _SYS_PRCTL_H >> 2 #include_next >> 3 >> 4 # ifndef _ISOMAC >> 5 >> 6 extern int __prctl (int __option, ...); >> 7 >> 8 # endif /* !_ISOMAC */ >> 9 #endif > Note that the actual user-visible header is > sysdeps/unix/sysv/linux/sys/prctl.h, but it has the same issue. > >> If we calling prctl(PR_SET_TIMERSLACK, ULONG_MAX) and then calling prctl(PR_GET_TIMERSLACK), the value >> will be truncated into INT_MAX(or convered into unsinged,it is UINT_MAX) on 64bit machine. Or, this is a >> glibc limitation for prctl interfaces? > I think this is a glibc limitation/bug. The return type should probably > be __register_t (a type that is currently woefully underused). We > cannot simply change the return time because once applications are built > against the new prototype, we need to ensure that they also use the new > glibc. > > Would you please file a bug for this? > is our bug tracker. Hi Florian I create a bug and cc you, url as below: https://sourceware.org/bugzilla/show_bug.cgi?id=24850 Thanks Yang Xu > Thanks, > Florian > > >