lkml.org 
[lkml]   [2008]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: capget() overflows buffers.
* Andrew G. Morgan (morgan@kernel.org) wrote:
> Chris Wright wrote:
> | Hmm, it would be kind of nice to have a formalized way get the size,
> | perhaps it would help with KaiGai's request for caps printed out.
> | Something that tells us either the number of u32s, or the max bit
> | supported?
>
> Serge has already provided one with the call,
>
> ~ sys_prctl(PR_CAPBSET_READ, x);
>
> returns -EINVAL if (x > max-supported-capability).
>
> (Ref: 3b7391de67da515c91f48aa371de77cb6cc5c07e)

Yeah, that's a little roundabout..

> Just to be clear, you are not referring to a warning that the
> application is stuck in a 32-bit capability world, because we already
> have one of those: warn_legacy_capability_use(). You are referring to a
> warning that might indicate a problem with code like that given in your
> example - in which case I'll respond to that part of the thread...

Yes, like the one in the patch I sent that added a
warn_broken_capability_use().

thanks,
-chris


\
 
 \ /
  Last update: 2008-05-24 10:21    [W:0.053 / U:2.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site