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:	Mon, 25 Aug 2008 12:30:37 +0200
From:	Louis Rilling <Louis.Rilling@...labs.com>
To:	Oren Laadan <orenl@...columbia.edu>
Cc:	dave@...ux.vnet.ibm.com, arnd@...db.de, jeremy@...p.org,
	linux-kernel@...r.kernel.org, containers@...ts.linux-foundation.org
Subject: Re: [RFC v2][PATCH 8/9] File descriprtors - dump state

On Sun, Aug 24, 2008 at 11:28:14PM -0400, Oren Laadan wrote:
>
>
> Louis Rilling wrote:
>> On Wed, Aug 20, 2008 at 11:07:16PM -0400, Oren Laadan wrote:
>>> Dump the files_struct of a task with 'struct cr_hdr_files', followed by
>>> all open file descriptors. Since FDs can be shared, they are assigned a
>>> tag and registered in the object hash.
>>>
>>> For each open FD there is a 'struct cr_hdr_fd_ent' with the FD, its tag
>>> and its close-on-exec property. If the FD is to be saved (first time)
>>> then this is followed by a 'struct cr_hdr_fd_data' with the FD state.
>>> Then will come the next FD and so on.
>>>
>>> This patch only handles basic FDs - regular files, directories and also
>>> symbolic links.
>>
>> [...]
>
> [...]
>
>>
>>> @@ -114,4 +125,24 @@ struct cr_hdr_vma {
>>>
>>>  } __attribute__ ((aligned (8)));
>>>
>>> +struct cr_hdr_files {
>>> +	__u32 tag;	/* sharing identifier */
>>> +	__u32 nfds;
>>> +} __attribute__ ((aligned (8)));
>>> +
>>> +struct cr_hdr_fd_ent {
>>> +	__u32 tag;
>>> +	__u16 fd;
>>> +	__u16 close_on_exec;
>>> +} __attribute__ ((aligned (8)));
>>> +
>>> +struct cr_hdr_fd_data {
>>> +	__u16 how;
>>> +	__u16 f_mode;
>>> +	__u32 f_flags;
>>> +	__u32 f_uid, f_gid;
>>
>> We are not at a 64bits boundary here. Should add one __32 padding or reorder the
>> fields.
>
> Actually this is ok - note there are two fields on fourth row. I'll
> change to one field per row so it's easily seen.

Have to revise my eyes, really ;) Sorry for the noise!

Louis

-- 
Dr Louis Rilling			Kerlabs - IRISA
Skype: louis.rilling			Campus Universitaire de Beaulieu
Phone: (+33|0) 2 99 84 71 52		Avenue du General Leclerc
Fax: (+33|0) 2 99 84 71 71		35042 Rennes CEDEX - France
http://www.kerlabs.com/

Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ