Skip to content

Commit 4d67829

Browse files
committed
Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt
Pull fsverity updates from Eric Biggers: "Fix kerneldoc warnings and some coding style inconsistencies. This mirrors the similar cleanups being done in fs/crypto/" * tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fs-verity: remove unnecessary extern keywords fs-verity: fix all kerneldoc warnings
2 parents afdb0f2 + 9cd6b59 commit 4d67829

File tree

7 files changed

+24
-10
lines changed

7 files changed

+24
-10
lines changed

fs/verity/enable.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ static int enable_verity(struct file *filp,
329329

330330
/**
331331
* fsverity_ioctl_enable() - enable verity on a file
332+
* @filp: file to enable verity on
333+
* @uarg: user pointer to fsverity_enable_arg
332334
*
333335
* Enable fs-verity on a file. See the "FS_IOC_ENABLE_VERITY" section of
334336
* Documentation/filesystems/fsverity.rst for the documentation.

fs/verity/fsverity_private.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct merkle_tree_params {
6161
u64 level_start[FS_VERITY_MAX_LEVELS];
6262
};
6363

64-
/**
64+
/*
6565
* fsverity_info - cached verity metadata for an inode
6666
*
6767
* When a verity file is first opened, an instance of this struct is allocated
@@ -134,7 +134,7 @@ void __init fsverity_check_hash_algs(void);
134134

135135
/* init.c */
136136

137-
extern void __printf(3, 4) __cold
137+
void __printf(3, 4) __cold
138138
fsverity_msg(const struct inode *inode, const char *level,
139139
const char *fmt, ...);
140140

fs/verity/measure.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
/**
1313
* fsverity_ioctl_measure() - get a verity file's measurement
14+
* @filp: file to get measurement of
15+
* @_uarg: user pointer to fsverity_digest
1416
*
1517
* Retrieve the file measurement that the kernel is enforcing for reads from a
1618
* verity file. See the "FS_IOC_MEASURE_VERITY" section of

fs/verity/open.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ EXPORT_SYMBOL_GPL(fsverity_prepare_setattr);
330330

331331
/**
332332
* fsverity_cleanup_inode() - free the inode's verity info, if present
333+
* @inode: an inode being evicted
333334
*
334335
* Filesystems must call this on inode eviction to free ->i_verity_info.
335336
*/

fs/verity/signature.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ static struct key *fsverity_keyring;
2828

2929
/**
3030
* fsverity_verify_signature() - check a verity file's signature
31+
* @vi: the file's fsverity_info
32+
* @desc: the file's fsverity_descriptor
33+
* @desc_size: size of @desc
3134
*
3235
* If the file's fs-verity descriptor includes a signature of the file
3336
* measurement, verify it against the certificates in the fs-verity keyring.

fs/verity/verify.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ static bool verify_page(struct inode *inode, const struct fsverity_info *vi,
179179

180180
/**
181181
* fsverity_verify_page() - verify a data page
182+
* @page: the page to verity
182183
*
183184
* Verify a page that has just been read from a verity file. The page must be a
184185
* pagecache page that is still locked and not yet uptodate.
@@ -206,6 +207,7 @@ EXPORT_SYMBOL_GPL(fsverity_verify_page);
206207
#ifdef CONFIG_BLOCK
207208
/**
208209
* fsverity_verify_bio() - verify a 'read' bio that has just completed
210+
* @bio: the bio to verify
209211
*
210212
* Verify a set of pages that have just been read from a verity file. The pages
211213
* must be pagecache pages that are still locked and not yet uptodate. Pages
@@ -264,6 +266,7 @@ EXPORT_SYMBOL_GPL(fsverity_verify_bio);
264266

265267
/**
266268
* fsverity_enqueue_verify_work() - enqueue work on the fs-verity workqueue
269+
* @work: the work to enqueue
267270
*
268271
* Enqueue verification work for asynchronous processing.
269272
*/

include/linux/fsverity.h

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,23 @@ static inline struct fsverity_info *fsverity_get_info(const struct inode *inode)
121121

122122
/* enable.c */
123123

124-
extern int fsverity_ioctl_enable(struct file *filp, const void __user *arg);
124+
int fsverity_ioctl_enable(struct file *filp, const void __user *arg);
125125

126126
/* measure.c */
127127

128-
extern int fsverity_ioctl_measure(struct file *filp, void __user *arg);
128+
int fsverity_ioctl_measure(struct file *filp, void __user *arg);
129129

130130
/* open.c */
131131

132-
extern int fsverity_file_open(struct inode *inode, struct file *filp);
133-
extern int fsverity_prepare_setattr(struct dentry *dentry, struct iattr *attr);
134-
extern void fsverity_cleanup_inode(struct inode *inode);
132+
int fsverity_file_open(struct inode *inode, struct file *filp);
133+
int fsverity_prepare_setattr(struct dentry *dentry, struct iattr *attr);
134+
void fsverity_cleanup_inode(struct inode *inode);
135135

136136
/* verify.c */
137137

138-
extern bool fsverity_verify_page(struct page *page);
139-
extern void fsverity_verify_bio(struct bio *bio);
140-
extern void fsverity_enqueue_verify_work(struct work_struct *work);
138+
bool fsverity_verify_page(struct page *page);
139+
void fsverity_verify_bio(struct bio *bio);
140+
void fsverity_enqueue_verify_work(struct work_struct *work);
141141

142142
#else /* !CONFIG_FS_VERITY */
143143

@@ -200,13 +200,16 @@ static inline void fsverity_enqueue_verify_work(struct work_struct *work)
200200

201201
/**
202202
* fsverity_active() - do reads from the inode need to go through fs-verity?
203+
* @inode: inode to check
203204
*
204205
* This checks whether ->i_verity_info has been set.
205206
*
206207
* Filesystems call this from ->readpages() to check whether the pages need to
207208
* be verified or not. Don't use IS_VERITY() for this purpose; it's subject to
208209
* a race condition where the file is being read concurrently with
209210
* FS_IOC_ENABLE_VERITY completing. (S_VERITY is set before ->i_verity_info.)
211+
*
212+
* Return: true if reads need to go through fs-verity, otherwise false
210213
*/
211214
static inline bool fsverity_active(const struct inode *inode)
212215
{

0 commit comments

Comments
 (0)