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]
Message-ID: <4F83F7EF.4030700@parallels.com>
Date:	Tue, 10 Apr 2012 13:05:51 +0400
From:	Stanislav Kinsbursky <skinsbursky@...allels.com>
To:	Pavel Emelyanov <xemul@...allels.com>
CC:	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"serge.hallyn@...onical.com" <serge.hallyn@...onical.com>,
	"criu@...nvz.org" <criu@...nvz.org>,
	"arnd@...db.de" <arnd@...db.de>,
	"lucas.demarchi@...fusion.mobi" <lucas.demarchi@...fusion.mobi>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"dhowells@...hat.com" <dhowells@...hat.com>,
	"mtk.manpages@...il.com" <mtk.manpages@...il.com>
Subject: Re: [CRIU] [PATCH 2/4] ipc: move all checkpoint-restore code under
 appropriate define

09.04.2012 23:47, Pavel Emelyanov пишет:
> On 04/09/2012 09:54 PM, Stanislav Kinsbursky wrote:
>> All new checkpoint/restore code parts are now covered with
>> CONFIG_CHECKPOINT_RESTORE marco. So it would be easy to remove them, in case
>> the whole project fails.
>>
>> ---
>>   ipc/compat.c |    9 ++++++---
>>   ipc/msg.c    |   15 ++++++++++++++-
>>   2 files changed, 20 insertions(+), 4 deletions(-)
>>
>> @@ -387,8 +388,10 @@ long compat_sys_msgrcv(int first, int second, int msgtyp, int third,
>>   		msgtyp = ipck.msgtyp;
>>   	}
>>   	return do_msgrcv(first, uptr, second, msgtyp, third,
>> -			 (third&  MSG_PEEK_ALL) ? compat_do_msg_peek_all
>> -						: compat_do_msg_fill);
>> +#ifdef CONFIG_CHECKPOINT_RESTORE
>> +			 (third&  MSG_PEEK_ALL) ? compat_do_msg_peek_all :
>> +#endif
>> +						compat_do_msg_fill);
>
> These ifdefs in the middle of the code look not very elegant. Is there a way
> to replace the checks they surround with static inline function (reporting
> 0 when CHECKPOINT_RESTORE is off) potentially letting the compiler optimize
> out the code sitting under if (0) ?
>

Yes, sure. I'll do this.

-- 
Best regards,
Stanislav Kinsbursky
--
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