[Bug libc/24850] New: prctl return value type is int but it is long in kernel

xuyang2018.jy at cn dot fujitsu.com sourceware-bugzilla@sourceware.org
Thu Jul 25 07:49:00 GMT 2019


https://sourceware.org/bugzilla/show_bug.cgi?id=24850

            Bug ID: 24850
           Summary: prctl return value type is int but it is long in
                    kernel
           Product: glibc
           Version: 2.31
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: xuyang2018.jy at cn dot fujitsu.com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Hi

in glic, prctl function defined in sysdeps/unix/sysv/linux/sys/prctl as below:

#ifndef _SYS_PRCTL_H
#define _SYS_PRCTL_H    1

#include <features.h>
#include <linux/prctl.h>  /*  The magic values come from here  */

__BEGIN_DECLS

/* Control process execution.  */
extern int prctl (int __option, ...) __THROW;

__END_DECLS

#endif  /* sys/prctl.h */
~

When 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?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list