This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH roland/nptl] NPTL: Don't (re)validate sched_priority in pthread_create.


On 11/20/2014 01:59 PM, Roland McGrath wrote:
>>> I've written up a test for the expected EINVAL diagnosis.  It depends
>>> on constructing a pthread_attr_t with invalid scheduling parameters,
>>> which AFAIK is possible only by using pthread_attr_setschedparam while
>>> the pthread_attr_t is set to one scheduling policy where a given
>>> struct sched_param is valid and then using pthread_attr_setschedpolicy
>>> to switch it to a policy where those values are invalid.  This
>>> requires some assumptions about the policies and their parameters, but
>>> those are predictable enough at least for Linux.
>>
>> Should this even be possible?
> 
> I can't see how it could be ruled out.  
> POSIX doesn't put any requirements on the order in which you call
> pthread_attr_setschedparam and pthread_attr_setschedpolicy.

Good point.

c.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]