From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10962 Path: news.gmane.org!.POSTED!not-for-mail From: Andrei Vagin Newsgroups: gmane.linux.lib.musl.general Subject: Re: Need to zero pads in msghdr Date: Wed, 25 Jan 2017 10:56:22 -0800 Message-ID: References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1485370607 18092 195.159.176.226 (25 Jan 2017 18:56:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Jan 2017 18:56:47 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10977-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jan 25 19:56:41 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1cWSkC-0003hr-OU for gllmg-musl@m.gmane.org; Wed, 25 Jan 2017 19:56:32 +0100 Original-Received: (qmail 22440 invoked by uid 550); 25 Jan 2017 18:56:36 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 22399 invoked from network); 25 Jan 2017 18:56:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=FW5XiIy0sZVYvhWWacpNYNtWRNJB1nuQVIqLB5jz9fk=; b=jN2zzjOokfYCAza5zFi+WdhqEkC5fiepJLZL0t+oQWLoNqIOjapyQdtZPa2Ekdzhqh CJe6dsbYK+/0TbrJO07qXN2n75SW6aFedfakTzKKgeUFbYwugz45Q1ZO3vUrGDS3Jtlq XW+ZXHFIapxA2wJJTTdCZEyQ2ZokoFiYwbf5ErrEUvSlnKdCDLb7a70mQNi2lvCp0uaw riCXylloO/sEUlY6h6S1KL6+NpPJ8vHlnVfbZrIlGJPK/i+ZTVee/uhhhUyrDVv1toLx cxJYGes0rgFVRn7RrAUQbN6Ti6qL2vVfT0sX2pTCcXiylkHvsyu4LCtoX8SqutwU2RCl q+9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=FW5XiIy0sZVYvhWWacpNYNtWRNJB1nuQVIqLB5jz9fk=; b=NXgcHoISWWYUwYaMFh4XOTxeLuBOjw720h2Cli52ieWSIfhGZfbcv2+jIJ2D7A718L u8GvyLdtoUOy138Kkq1n5N9qrKkYm4R/tHA108kBo0hr9riPuJ1kqbpTOvFB+K236AaK 1mXoqQLNPiH4tvqJwU36NjjodxW20UBM5N2kxVSy7w1AuGjdhbEFvSvjPU2199g/athB K05RTkibPTGzGYluJRTlk+uNM3ajcjvH/gdFWRd1+iZO3iDPW2tYPtvkiyKDpK+iz2kQ HDx7C0L0cg9TcvrdZeOlAk9YCJ2ImIOgwNYip85YL/EjoePH8dD1FmxNCeHQzNU4xzjl CV8w== X-Gm-Message-State: AIkVDXK77qJ11qw9bm8+CheAnCh6gaxTfWtjZLsIWy2LuJdugbfrtqv3unc0dTCbTnrtWZwGtxWegxT+OpK0ow== X-Received: by 10.157.35.98 with SMTP id k31mr18079985otd.109.1485370582595; Wed, 25 Jan 2017 10:56:22 -0800 (PST) In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:10962 Archived-At: On Wed, Jan 25, 2017 at 8:42 AM, Andrei Vagin wrote: > Hi, > > In this patch > http://git.musl-libc.org/cgit/musl/commit/arch/x86_64/bits/socket.h?id=7168790763cdeb794df52be6e3b39fbb021c5a64 > you suppose that the kernel ignores the upper 32 bits of msg_iovlen, > but it doesn't, so pads in msghdr structures have to be zeroed before > calling sendmsg and recvmsg syscalls. Actually the problem is a bit different. In CRIU we use the msghdr structure from musl-libc, but in some cases we have to call raw system calls. We don't expect to have pads in structures and so we don't zero them. I understand that it is not a bug for many users of mucl-libc, but in case of CRIU we see this issue. > https://github.com/xemul/criu/issues/276 > > Thanks, > Andrei