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: <66566792-58a4-bf65-6723-7d2887c84160@redhat.com>
Date:   Wed, 12 Feb 2020 09:31:32 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Stefan Hajnoczi <stefanha@...hat.com>,
        linux-fsdevel@...r.kernel.org
Cc:     kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Avi Kivity <avi@...lladb.com>,
        Davide Libenzi <davidel@...ilserver.org>,
        Alexander Viro <viro@...iv.linux.org.uk>
Subject: Re: [RFC] eventfd: add EFD_AUTORESET flag

On 29/01/20 18:20, Stefan Hajnoczi wrote:
> +	/* Semaphore semantics don't make sense when autoreset is enabled */
> +	if ((flags & EFD_SEMAPHORE) && (flags & EFD_AUTORESET))
> +		return -EINVAL;
> +

I think they do, you just want to subtract 1 instead of setting the
count to 0.  This way, writing 1 would be the post operation on the
semaphore, while poll() would be the wait operation.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ