From patchwork Mon May 11 18:02:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 11541405 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 123E1912 for ; Mon, 11 May 2020 18:02:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0353C20736 for ; Mon, 11 May 2020 18:02:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731026AbgEKSCy (ORCPT ); Mon, 11 May 2020 14:02:54 -0400 Received: from mailrelay107.isp.belgacom.be ([195.238.20.134]:58645 "EHLO mailrelay107.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbgEKSCy (ORCPT ); Mon, 11 May 2020 14:02:54 -0400 IronPort-SDR: XGyN8aMpHJVF20AUpYqThvCEM0iidIWZczC07DEU8iDQKeZjEXAoCBe6IiOtV5lb7zT2vaYWkw SehvkoEODHErDt9cE+sGenJ7FPJfOJh0sltc0kuYpYIN1gzz3toHX//VVOfvUMJ/VQ+HkjxdW3 p+VYzIhF/qK5hx9VM1J5D4SpXnKQAn5V/L5a0NfJ/wlEJMVEe48HdaqS1aSf//Z+rhEEIf8HkU 8gATlECFt2b+uJqZrhVs7gL4nWRZaKoZN4Hyq4YTxwybw6ZVCf+icOq1KDBkt+iGNv8fX5AQYw Iug= X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:j7291x9jCe1CT/9uRHKM819IXTAuvvDOBiVQ1KB21+IcTK2v8tzYMVDF4r011RmVBNiduqoP0rOM+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4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EVBCsT4P1UnkKUtstzopWMA5GENK4g0Wb0g== X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CcDAACkrle/xCltltmHQEBPAEFBQECAQkBgV6CKIFkEiyNJYV6jBiRWAsBAQEBAQEBAQE0AQIEAQGERIINJzgTAgMBAQEDAgUBAQYBAQEBAQEEBAFsBAEBBwoCAYROIQEDAQEFCgFDgjsig00BIyNPcBKDJoJYKbB0hVGDVoFAgTgBh1yFAYFBP4RfhBWGLQSya4JUgnGVKwwdnTqQHZ87IoFWTSAYgyRQGA2fCkIwNwIGCAEBAwlXASIBi0OCRQEB X-IPAS-Result: A2CcDAACkrle/xCltltmHQEBPAEFBQECAQkBgV6CKIFkEiyNJYV6jBiRWAsBAQEBAQEBAQE0AQIEAQGERIINJzgTAgMBAQEDAgUBAQYBAQEBAQEEBAFsBAEBBwoCAYROIQEDAQEFCgFDgjsig00BIyNPcBKDJoJYKbB0hVGDVoFAgTgBh1yFAYFBP4RfhBWGLQSya4JUgnGVKwwdnTqQHZ87IoFWTSAYgyRQGA2fCkIwNwIGCAEBAwlXASIBi0OCRQEB Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO biggussolus.home) ([91.182.165.16]) by relay.skynet.be with ESMTP; 11 May 2020 20:02:51 +0200 From: Fabian Frederick To: jack@suse.cz, amir73il@gmail.com Cc: linux-fsdevel@vger.kernel.org, Fabian Frederick Subject: [PATCH 8/9 linux-next] fanotify: clarify mark type extraction Date: Mon, 11 May 2020 20:02:45 +0200 Message-Id: <20200511180245.215198-1-fabf@skynet.be> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org mark type is resolved from flags but is not itself bitwise. That means user could send a combination and never note only one value was taken in consideration. This patch clarifies that fact in bit definitions. Thanks to Amir for explanations. Signed-off-by: Fabian Frederick --- include/uapi/linux/fanotify.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/fanotify.h b/include/uapi/linux/fanotify.h index a88c7c6d0692..675bf6bbbe50 100644 --- a/include/uapi/linux/fanotify.h +++ b/include/uapi/linux/fanotify.h @@ -71,7 +71,12 @@ #define FAN_MARK_FLUSH 0x00000080 /* FAN_MARK_FILESYSTEM is 0x00000100 */ -/* These are NOT bitwise flags. Both bits can be used togther. */ +/* + * These are NOT bitwise flags. Both bits can be used together. + * IOW if someone does FAN_MARK_INODE | FAN_MARK_FILESYSTEM + * it will be considered FAN_MARK_FILESYSTEM and user won't be + * notified. + */ #define FAN_MARK_INODE 0x00000000 #define FAN_MARK_MOUNT 0x00000010 #define FAN_MARK_FILESYSTEM 0x00000100