[lkml]   [2008]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 1/2] x86, ptrace: add version and last remaining size to status command

* Markus Metzger <> wrote:

> Return the API version and the size of a bts_struct in the
> PTRACE_BTS_STATUS command. This might be handy in case other archs
> want to use and extend the interface. It allows users to program
> against one version and continue to work for newer versions (they have
> to discard everything they don't understand, of course).

i think this will be quite handy. But:

+ /* actual size of bts_struct in bytes */
+ unsigned short bts_size;
+ /* interface version */
+ unsigned short version;

please dont use shorts. Lets just us bts_size and no version at all, ok?
Any change to the ABI will be extension and that can be done by changing
the size of the data structure. We try to avoid doing versioned APIs in
Linux syscalls.

and while at it, how about using u32/u64 for the fields (that's how we
expose ABIs, even if we know that 'unsigned int' is always 32-bit on
x86), and add support for COMPAT as well?


 \ /
  Last update: 2008-01-08 10:53    [W:0.028 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site