Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2366542ybi; Thu, 20 Jun 2019 13:54:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBj/d6589UL+4O8ag2GMuSTrPpIJDTfqVWCNJ3seZo88oTMQBw/Rcwmx+ijjzb6UH4lq3J X-Received: by 2002:a63:1d10:: with SMTP id d16mr14324176pgd.446.1561064049398; Thu, 20 Jun 2019 13:54:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561064049; cv=none; d=google.com; s=arc-20160816; b=SpkahBhcPaOdBAQfGQPXA/0NmRfcT4YqZIvgbrx/Lbv+t805UdrsQYwn5bEnI1A+yc ErWKvM+Em41QwJdsQWGp5EP37v6IpsuZ6ofZAxBSvUepHbTEPGNqNhPysqwWBqziK60N H/ECVXj5tK4+jFfdJuS2JhMX3vG8Y31A+2woctZQgtAXuxxzCluqfllBnjwUrc1HIowN 6qByjHs5mtp8FVFsvpdhAQzq1I5pZzPX8Lo3MkvqjjJAL2TfV+IvE+f0QFEOMeqnwNLX QSC3LkTQaZO5KyIXB+zOGtub4GRy/n6wuKJETQUUVCOYdJH1qnGDNRNOBD2q5P0vvYTS hZOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eeDoAFUJ+dj2T1j56lDGn2RIHb0v/e0XqQHBpr2jzd0=; b=0Ew3HBafU5FS8Dbh722WpGgz6mDrDq48iVAdLnZwxPyWrH1JWzMJ3SRSd4NrOfYNb1 AF6FWXCwEaDkHIhgzD4QMyfizNlatFIBWNPCN1z4OS5xLHTBEccrk5Y5XT72GS0xj+dJ RYItOhDR/g1IqE5XAx2a3/kTq9EQ33Itvpfs54o0H9a3X4VOFJ/QH7uUrWIJJhpCJNcC EPEXjuLzIYCNGcZImTsb6+gwV9dFIxXqgyzAvwSR8bfFg/aJQIpmLiroA/g4aDCgYxmm khESavvdYLxoepCjYW+aW4enoSSQlBzDDANyVyMqo2vYglF5yj1XWKDIbG43oAUQps0H fKuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lnZsaHaX; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e184si471632pgc.429.2019.06.20.13.53.53; Thu, 20 Jun 2019 13:54:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lnZsaHaX; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726385AbfFTUxq (ORCPT + 99 others); Thu, 20 Jun 2019 16:53:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:56566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725913AbfFTUxo (ORCPT ); Thu, 20 Jun 2019 16:53:44 -0400 Received: from ebiggers-linuxstation.mtv.corp.google.com (unknown [104.132.1.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3A4BA208CA; Thu, 20 Jun 2019 20:53:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561064023; bh=lz5JpkYzmpTTBeM2ob3LBdeWeHwnBEIFX+pUx3P6ez4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lnZsaHaXbNKvT+ATrs0zKxozNjZv/Hg/rnmBxsdpINoJfiHKbEVWuedfwkHFjDO3b v92007qO4SnUWdrLWatHtt/yrEZVNIwKm9s87Rw6HQVOwj2doilz8oHoV+9DZcPdIK Algk5EzI33ZCevsITsLQRzwIdOKQKNQsJTuv70gY= From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-integrity@vger.kernel.org, Jaegeuk Kim , "Theodore Y . Ts'o" , Victor Hsieh , Chandan Rajendra , Dave Chinner , Christoph Hellwig , "Darrick J . Wong" , Linus Torvalds Subject: [PATCH v5 04/16] fs: uapi: define verity bit for FS_IOC_GETFLAGS Date: Thu, 20 Jun 2019 13:50:31 -0700 Message-Id: <20190620205043.64350-5-ebiggers@kernel.org> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog In-Reply-To: <20190620205043.64350-1-ebiggers@kernel.org> References: <20190620205043.64350-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Eric Biggers Add FS_VERITY_FL to the flags for FS_IOC_GETFLAGS, so that applications can easily determine whether a file is a verity file at the same time as they're checking other file flags. This flag will be gettable only; FS_IOC_SETFLAGS won't allow setting it, since an ioctl must be used instead to provide more parameters. This flag matches the on-disk bit that was already allocated for ext4. Reviewed-by: Theodore Ts'o Signed-off-by: Eric Biggers --- include/uapi/linux/fs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index 59c71fa8c553a3..df261b7e0587ed 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h @@ -306,6 +306,7 @@ struct fscrypt_key { #define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ #define FS_HUGE_FILE_FL 0x00040000 /* Reserved for ext4 */ #define FS_EXTENT_FL 0x00080000 /* Extents */ +#define FS_VERITY_FL 0x00100000 /* Verity protected inode */ #define FS_EA_INODE_FL 0x00200000 /* Inode used for large EA */ #define FS_EOFBLOCKS_FL 0x00400000 /* Reserved for ext4 */ #define FS_NOCOW_FL 0x00800000 /* Do not cow file */ -- 2.22.0.410.gd8fdbe21b5-goog