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:	Thu, 14 Feb 2013 15:57:59 -0800
From:	Andy Lutomirski <luto@...capital.net>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Martin Sustrik <sustrik@...bpm.com>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Sha Zhengju <handai.szj@...bao.com>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, Michael Kerrisk <mtk.manpages@...il.com>,
	Davide Libenzi <davidel@...ilserver.org>,
	Eric Wong <normalperson@...t.net>
Subject: Re: [PATCH v2 1/1] eventfd: implementation of EFD_MASK flag

On Thu, Feb 14, 2013 at 2:54 PM, Andrew Morton
<akpm@...ux-foundation.org> wrote:
> On Fri,  8 Feb 2013 09:11:17 +0100
> Martin Sustrik <sustrik@...bpm.com> wrote:
>
>> When implementing network protocols in user space, one has to implement
>> fake user-space file descriptors to represent the sockets for the protocol.

>
>>       if (count < sizeof(ucnt))
>>               return -EINVAL;
>> @@ -293,8 +351,13 @@ static int eventfd_show_fdinfo(struct seq_file *m, struct file *f)
>>       int ret;
>>
>>       spin_lock_irq(&ctx->wqh.lock);
>> -     ret = seq_printf(m, "eventfd-count: %16llx\n",
>> -                      (unsigned long long)ctx->count);
>> +     if (ctx->flags & EFD_MASK) {
>> +             ret = seq_printf(m, "eventfd-mask: %x\n",
>> +                              (unsigned)ctx->mask.events);
>> +     } else {
>> +             ret = seq_printf(m, "eventfd-count: %16llx\n",
>> +                              (unsigned long long)ctx->count);
>> +     }
>>       spin_unlock_irq(&ctx->wqh.lock);
>
> This is a non-back-compatible userspace interface change.  A procfs
> file which previously displayed
>
>         eventfd-count: nnnn
>
> can now also display
>
>         eventfd-mask: nnnn
>
> So existing userspace could misbehave.
>
> Please fully describe the proposed interface change in the changelog.
> That description should include the full pathname of the procfs file
> and example before-and-after output and a discussion of whether and why
> the risk to existing userspace is acceptable.

I suspect that the fdinfo stuff is only used by criu, which will need
to be updated regardless.  (If the kernel adopts the policy "don't
break criu", then that may be the end of new kernel features.)

--Andy
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ