lkml.org 
[lkml]   [2010]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch v2 4/4] ptrace: Add support for generic PTRACE_GETREGSET/PTRACE_SETREGSET
Date
> Allowing a larger size for get seems very sane.  Allowing a smaller size
> would be ok iff we make sure we handle corner cases right (i.e. a
> partially overwritten subregister.)

It should enforce the static constraints of the user_regset, which include
a starting position that's 0 % .align (if we had non-zero starting position
in the request) and a size that's 0 % .size. The arch code sets those and
then is not obliged to handle requests outside those constraints. It's
already documented that the arch code is obliged to handle any partial
regset access that meets them.

The usual thing is to set .size and .align to the size of a register.
This is exactly so that the arch code does not need to add gratuitous
corner case complications such as "partially overwritten subregister".


Thanks,
Roland


\
 
 \ /
  Last update: 2010-02-11 04:33    [W:0.038 / U:4.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site