lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 4 Oct 2008 09:20:00 +0200
From:	"stephane eranian" <eranian@...glemail.com>
To:	"David Gibson" <david@...son.dropbear.id.au>, eranian@...il.com,
	linux-kernel@...r.kernel.org,
	perfmon2-devel <perfmon2-devel@...ts.sourceforge.net>
Subject: Re: perfmon3 interface overview

David,

On Sat, Oct 4, 2008 at 8:05 AM, David Gibson
<david@...son.dropbear.id.au> wrote:
>>
>> If we wanted to go even further, we could combine start/stop, attach/detach
>> into  a single syscall:
>
> Well, you could.  But the attach/detach take a parameter which
> start/stop don't, making it a less obvious merge to make.
>
Unless you make the 3rd argument optional and hide this in a
user library. This is how this is handled for pfm_create_session()
for instance. The library would define this as follows:

   int pfm_control_session(int fd, int flags, ...);

Based upon flags, it would use va_arg() to get to the 3rd argument and
pass it to the syscall which implements the version below. A dummy value
would be passed with the flags is not equal to PFM_CTFL_ATTACH.

>>    int pfm_control_session(int fd, int flags, int target);
>>    With flags:
>>        PFM_CTFL_START  : start monitoring
>>        PFM_CTFL_STOP    : stop monitoring
>>        PFM_CTFL_RESTART: resume after overflow notification
>>
>>        PFM_CTFL_ATTACH: attach to thread or cpu designated by 'target'
>>        PFM_CTFL_DETACH: detach session
>>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ