From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B193FC55ABD for ; Mon, 16 Nov 2020 20:00:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5CC3E208C7 for ; Mon, 16 Nov 2020 20:00:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="XK+yWWrf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731370AbgKPUAO (ORCPT ); Mon, 16 Nov 2020 15:00:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727393AbgKPUAO (ORCPT ); Mon, 16 Nov 2020 15:00:14 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45F45C0613CF; Mon, 16 Nov 2020 12:00:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=z8OzNGspQXnwNNcU0w++SX1K+3G8m57VI2juCCZTgyU=; b=XK+yWWrfRuNhvqIpyTCVd2+tvD vWQWosYHC19Eca/wSVQOQMZb2zbMs8UoCYy1sM3fbI/sA95r8PcW8CR9s/E+o+j9ATkT6oVzWymrj XrhRKXfPPOtuNWlonuzskNrvQAp0RHk0KXvtMo5GmDCcj0OyPy5XlGZ64v8adFr3l8z8T3UnryyaM qvHf2HlqdbUXaUZ5jRdagxG89IyoN9og6kb7rcHheL0Ihff1Yhdm8VIwf25IcmKSEcElLwUrmiHcq 5Ek/GA7cp7K93BZZGRc2K4CH+trRpJDM5mLa15onBZYa/DFauROaUWnTvzBlag53u0jmCLXHGGftl F2cBjaXA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kekfZ-0002Di-VR; Mon, 16 Nov 2020 20:00:10 +0000 Date: Mon, 16 Nov 2020 20:00:09 +0000 From: Matthew Wilcox To: Willem de Bruijn Cc: David Laight , "linux-fsdevel@vger.kernel.org" , linux-kernel , Al Viro , Andrew Morton , Soheil Hassas Yeganeh , Arnd Bergmann , Shuo Chen Subject: Re: [PATCH v2] epoll: add nsec timeout support Message-ID: <20201116200009.GJ29991@casper.infradead.org> References: <20201116161001.1606608-1-willemdebruijn.kernel@gmail.com> <20201116161930.GF29991@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 16, 2020 at 02:54:17PM -0500, Willem de Bruijn wrote: > > You could also add a compile assert to check that the flag is reserved. > > Like this? > > /* Check the EPOLL_* constant for consistency. */ > BUILD_BUG_ON(EPOLL_CLOEXEC != O_CLOEXEC); > + BUILD_BUG_ON(EPOLL_NSTIMEO & EPOLL_RESERVED_FLAGS); i think you got the sense of that test wrong. but yes.