From: Dan Carpenter <dan.carpenter@oracle.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org
Subject: re: ext4 crypto: add ciphertext_access mount option
Date: Sat, 12 Dec 2015 17:24:56 +0300 [thread overview]
Message-ID: <20151212142456.GA24945@mwanda> (raw)
Hello Theodore Ts'o,
The patch 843848f73114: "ext4 crypto: add ciphertext_access mount
option" from Dec 10, 2015, leads to the following static checker
warning:
fs/ext4/inode.c:3349 ext4_direct_IO()
warn: we tested '(()->type & (1 << 0)) == (1 << 0)' before and it was 'false'
fs/ext4/inode.c
3336 static ssize_t ext4_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
3337 loff_t offset)
3338 {
3339 struct file *file = iocb->ki_filp;
3340 struct inode *inode = file->f_mapping->host;
3341 size_t count = iov_iter_count(iter);
3342 ssize_t ret;
3343
3344 if (ext4_encrypted_inode(inode) && S_ISREG(inode->i_mode)) {
3345 if (iov_iter_rw(iter) == WRITE)
^^^^^^^^^^^^^^^^^^^^^^^^^^
Checked.
3346 return 0;
3347 if (test_opt(inode->i_sb, CIPHERTEXT_ACCESS) &&
3348 capable(CAP_SYS_ADMIN)) {
3349 if (iov_iter_rw(iter) == WRITE)
^^^^^^^^^^^^^^^^^^^^^^^^^^
Checked again but we know that it's not true.
3350 return -EPERM;
3351 } else
3352 return 0;
3353 }
regards,
dan carpenter
reply other threads:[~2015-12-12 14:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151212142456.GA24945@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).