Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-18 Thread Eric Biggers
)`` and ``pr_warn*()`` > +issue warnings but do **not** cause the kernel to crash. Use these if you > +want to prevent such panics. > Nacked-by: Eric Biggers WARN*() are for recoverable assertions, i.e. situations where the condition being true can only happen due to a kernel bug but whe

Re: [RFC 01/10] crypto: factor async completion for general use

2017-05-10 Thread Eric Biggers
Hi Gilad, On Sat, May 06, 2017 at 03:59:50PM +0300, Gilad Ben-Yossef wrote: > Invoking a possibly async. crypto op and waiting for completion > while correctly handling backlog processing is a common task > in the crypto API implementation and outside users of it. > > This patch re-factors one of

Re: [RFC 07/10] fscrypt: move to generic async completion

2017-05-10 Thread Eric Biggers
Hi Gilad, On Sat, May 06, 2017 at 03:59:56PM +0300, Gilad Ben-Yossef wrote: > int fscrypt_do_page_crypto(const struct inode *inode, fscrypt_direction_t rw, > u64 lblk_num, struct page *src_page, > struct page *dest_page, unsigned int len, > @@ -15

Re: [RFC 01/10] crypto: factor async completion for general use

2017-05-11 Thread Eric Biggers
On Thu, May 11, 2017 at 10:29:47AM +0300, Gilad Ben-Yossef wrote: > > With regards to the wait being uninterruptible, I agree that this should be > > the > > default behavior, because I think users waiting for specific crypto > > requests are > > generally not prepared to handle the wait actually

Re: [PATCH 2/4] crypto: drbg wait for crypto op not signal safe

2017-05-16 Thread Eric Biggers
rrupting the output buffer. > > Resolve this by using wait_for_completion() instead. > > Reported-by: Eric Biggers > Signed-off-by: Gilad Ben-Yossef > CC: sta...@vger.kernel.org > --- > crypto/drbg.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > &g

Re: [PATCH 4/4] crypto: Documentation: fix none signal safe sample

2017-05-16 Thread Eric Biggers
MA from/into the buffers. > > Resolve this by using wait_for_completion() instead. > > Reported-by: Eric Biggers > Signed-off-by: Gilad Ben-Yossef > --- > Documentation/crypto/api-samples.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a

Re: [PATCH 3/3] encrypted-keys: document new fscrypt key format

2018-01-10 Thread Eric Biggers
Hi André, On Wed, Jan 10, 2018 at 12:44:18PM +, André Draszik wrote: > diff --git a/Documentation/security/keys/fscrypt.rst > b/Documentation/security/keys/fscrypt.rst > new file mode 100644 > index ..e4a29592513e > --- /dev/null > +++ b/Documentation/security/keys/fscrypt.rst > @

Re: [keyutils PATCH v2] man: keyctl_read(3): fix documentation for short buffer case

2018-02-20 Thread Eric Biggers
On Thu, Nov 02, 2017 at 11:06:05AM -0700, Eric Biggers wrote: > From: Eric Biggers > > When keyctl_read() is passed a buffer that is too small, the behavior is > inconsistent. Some key types will fill as much of the buffer as > possible, while others won't copy anythin

Re: [PATCH V2 1/7] ext4: use IS_ENCRYPTED() to check encryption status

2018-12-04 Thread Eric Biggers
On Tue, Dec 04, 2018 at 03:26:44PM +0530, Chandan Rajendra wrote: > This commit removes the ext4 specific ext4_encrypted_inode() and makes > use of the generic IS_ENCRYPTED() macro to check for the encryption > status of an inode. > > Signed-off-by: Chandan Rajendra Reviewed-b

Re: [PATCH V2 2/7] f2fs: use IS_ENCRYPTED() to check encryption status

2018-12-04 Thread Eric Biggers
On Tue, Dec 04, 2018 at 03:26:45PM +0530, Chandan Rajendra wrote: > This commit removes the f2fs specific f2fs_encrypted_inode() and makes > use of the generic IS_ENCRYPTED() macro to check for the encryption > status of an inode. > > Acked-by: Chao Yu > Signed-off-by: Chandan Rajendra This com

Re: [PATCH V2 3/7] fscrypt: remove filesystem specific build config option

2018-12-04 Thread Eric Biggers
Hi Chandan, On Tue, Dec 04, 2018 at 03:26:46PM +0530, Chandan Rajendra wrote: > In order to have a common code base for fscrypt "post read" processing > for all filesystems which support encryption, this commit removes > filesystem specific build config option (e.g. CONFIG_EXT4_FS_ENCRYPTION) > an

Re: [PATCH V2 4/7] Add S_VERITY and IS_VERITY()

2018-12-04 Thread Eric Biggers
> #define IS_ENCRYPTED(inode) ((inode)->i_flags & S_ENCRYPTED) > +#define IS_VERITY(inode) ((inode)->i_flags & S_VERITY) > > #define IS_WHITEOUT(inode) (S_ISCHR(inode->i_mode) && \ >(inode)->i_rdev == WHITEOUT_DEV) > -- > 2.19.1 > Reviewed-by: Eric Biggers

Re: [PATCH V2 5/7] ext4: use IS_VERITY() to check inode's fsverity status

2018-12-04 Thread Eric Biggers
100644 > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c > @@ -1344,6 +1344,7 @@ static int ext4_set_verity(struct inode *inode, loff_t > data_i_size) > err = ext4_reserve_inode_write(handle, inode, &iloc); > if (err == 0) { > ext4_set_inode_flag(ino

Re: [PATCH V2 6/7] f2fs: use IS_VERITY() to check inode's fsverity status

2018-12-04 Thread Eric Biggers
Hi Chandan, On Tue, Dec 04, 2018 at 03:26:49PM +0530, Chandan Rajendra wrote: > This commit now uses IS_VERITY() macro to check if fsverity is > enabled on an inode. > > Acked-by: Chao Yu > Signed-off-by: Chandan Rajendra > --- > fs/f2fs/file.c | 6 +++--- > fs/f2fs/inode.c | 4 +++- > 2 file

Re: [PATCH V2 3/7] fscrypt: remove filesystem specific build config option

2018-12-04 Thread Eric Biggers
On Tue, Dec 04, 2018 at 03:26:46PM +0530, Chandan Rajendra wrote: > diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h > index 952ab97af325..6ba193c23f37 100644 > --- a/include/linux/fscrypt.h > +++ b/include/linux/fscrypt.h > @@ -2,9 +2,8 @@ > /* > * fscrypt.h: declarations for per-

Re: [PATCH V2 7/7] fsverity: Remove filesystem specific build config option

2018-12-04 Thread Eric Biggers
Hi Chandan, On Tue, Dec 04, 2018 at 03:26:50PM +0530, Chandan Rajendra wrote: > In order to have a common code base for fsverity "post read" processing > for all filesystems which support fsverity, this commit removes > filesystem specific build config option (e.g. CONFIG_EXT4_FS_VERITY) > and rep

Re: [PATCH V3 8/9] fsverity: Move verity status check to fsverity_file_open

2018-12-10 Thread Eric Biggers
Hi Chandan, On Sat, Dec 08, 2018 at 12:21:43PM +0530, Chandan Rajendra wrote: > Instead of conditionally checking for verity status of an inode before > invoking fsverity_file_open(), this commit moves the check inside the > definition of fsverity_file_open(). > > Signed-off-by: Chandan Rajendra

Re: [PATCH V2 3/7] fscrypt: remove filesystem specific build config option

2018-12-10 Thread Eric Biggers
On Sat, Dec 08, 2018 at 12:37:20PM +0530, Chandan Rajendra wrote: > On Wednesday, December 5, 2018 5:13:21 AM IST Eric Biggers wrote: > > Hi Chandan, > > > > On Tue, Dec 04, 2018 at 03:26:46PM +0530, Chandan Rajendra wrote: > > > In order to have a common co

Re: [PATCH V3 2/9] f2fs: use IS_ENCRYPTED() to check encryption status

2018-12-10 Thread Eric Biggers
: Chandan Rajendra Reviewed-by: Eric Biggers > --- > fs/f2fs/data.c | 4 ++-- > fs/f2fs/dir.c | 10 +- > fs/f2fs/f2fs.h | 7 +-- > fs/f2fs/file.c | 10 +- > fs/f2fs/inode.c | 4 ++-- > fs/f2fs/namei.c | 6 +++--- > 6 files changed, 18 insertions(+),

Re: [PATCH V3 3/9] fscrypt: remove filesystem specific build config option

2018-12-10 Thread Eric Biggers
ION) > and replaces it with a build option (i.e. CONFIG_FS_ENCRYPTION) whose > value affects all the filesystems making use of fscrypt. > > Signed-off-by: Chandan Rajendra Reviewed-by: Eric Biggers > --- > Documentation/filesystems/fscrypt.rst | 4 +- > arch/mips/config

Re: [PATCH V3 6/9] f2fs: use IS_VERITY() to check inode's fsverity status

2018-12-10 Thread Eric Biggers
On Sat, Dec 08, 2018 at 12:21:41PM +0530, Chandan Rajendra wrote: > This commit removes the f2fs specific f2fs_verity_file() and makes use > of the generic IS_VERITY() macro or file_is_verity() to check for the > verity status of an inode. > > Signed-off-by: Chandan Rajendra Re

Re: [PATCH V3 7/9] fsverity: Remove filesystem specific build config option

2018-12-10 Thread Eric Biggers
) > and replaces it with a build option (i.e. CONFIG_FS_VERITY) whose > value affects all the filesystems making use of fsverity. > > Signed-off-by: Chandan Rajendra Reviewed-by: Eric Biggers > --- > Documentation/filesystems/fsverity.rst | 4 ++-- > fs/

Re: [PATCH V2 3/7] fscrypt: remove filesystem specific build config option

2018-12-11 Thread Eric Biggers
On Tue, Dec 11, 2018 at 05:52:11PM -0800, Guenter Roeck wrote: > Hi, > > On Tue, Dec 04, 2018 at 03:26:46PM +0530, Chandan Rajendra wrote: > > In order to have a common code base for fscrypt "post read" processing > > for all filesystems which support encryption, this commit removes > > filesystem

[PATCH] fscrypt: add a documentation file for filesystem-level encryption

2017-08-18 Thread Eric Biggers
From: Eric Biggers Perhaps long overdue, add a documentation file for filesystem-level encryption, a.k.a. fscrypt or fs/crypto/, to the Documentation directory. The new file is based loosely on the latest version of the "EXT4 Encryption Design Document (public version)" Google Doc

Re: [PATCH] fscrypt: add a documentation file for filesystem-level encryption

2017-08-21 Thread Eric Biggers
On Sat, Aug 19, 2017 at 10:32:27PM -0400, Theodore Ts'o wrote: > On Fri, Aug 18, 2017 at 03:06:52PM -0600, Andreas Dilger wrote: > > On Aug 18, 2017, at 1:47 PM, Eric Biggers wrote: > > > +Key hierarchy > > > += > > > + > > > +Maste

Re: [PATCH] fscrypt: add a documentation file for filesystem-level encryption

2017-08-21 Thread Eric Biggers
On Mon, Aug 21, 2017 at 09:44:11PM +0800, Anand Jain wrote: > > > >+fscrypt is not guaranteed to protect confidentiality or authenticity > >+if an attacker is able to manipulate the filesystem offline prior to > >+an authorized user later accessing the filesystem. > > How does fscrypt / Android

Re: [PATCH] fscrypt: add a documentation file for filesystem-level encryption

2017-08-21 Thread Eric Biggers
On Tue, Aug 22, 2017 at 10:22:30AM +0800, Anand Jain wrote: > > Hi Eric, > > How about a section on the threat model specific to the file-name ? > > (Sorry if I am missing something). > > Thanks, Anand It's already mentioned that filenames are encrypted: "fscrypt protects the confidentiali

Re: [PATCH] fscrypt: add a documentation file for filesystem-level encryption

2017-08-21 Thread Eric Biggers
On Tue, Aug 22, 2017 at 10:22:13AM +0800, Anand Jain wrote: > > > > > > > +fscrypt is not guaranteed to protect confidentiality or authenticity > > > > +if an attacker is able to manipulate the filesystem offline prior to > > > > +an authorized user later accessing the filesystem. > > > > > >

Re: [PATCH] fscrypt: add a documentation file for filesystem-level encryption

2017-08-22 Thread Eric Biggers
On Tue, Aug 22, 2017 at 11:33:51PM +0800, Anand Jain wrote: > > > On 08/22/2017 10:55 AM, Eric Biggers wrote: > >On Tue, Aug 22, 2017 at 10:22:30AM +0800, Anand Jain wrote: > >> > >>Hi Eric, > >> > >> How about a section on the threat model

Re: [PATCH] fscrypt: add a documentation file for filesystem-level encryption

2017-08-22 Thread Eric Biggers
On Tue, Aug 22, 2017 at 11:35:20PM +0800, Anand Jain wrote: > >> > >> I think AE is the only good solution for this, File-name encryption at > >>this stage won't solve any kind of Evil Maid attack, (as it was quoted > >>somewhere else in ML). > >> > >> > >> Further, below, is define but not use

Re: [PATCH] fscrypt: add a documentation file for filesystem-level encryption

2017-08-31 Thread Eric Biggers
Hi Anand, On Mon, Aug 28, 2017 at 08:18:46PM +0800, Anand Jain wrote: > > > On 08/23/2017 01:07 AM, Eric Biggers wrote: > >On Tue, Aug 22, 2017 at 11:33:51PM +0800, Anand Jain wrote: > >> > >> > >>On 08/22/2017 10:55 AM, Eric Biggers wrote: > >&

Re: [PATCH] fscrypt: add a documentation file for filesystem-level encryption

2017-08-31 Thread Eric Biggers
Hi Anand, On Tue, Aug 29, 2017 at 11:54:47AM +0800, Anand Jain wrote: > > BTRFS has an experimental fscrypt implementation[1] which does not > include the file-name encryption part it should be included but as > an optional since not all uses cases saves sensitive information in > the file-name.

Re: [PATCH] fscrypt: add a documentation file for filesystem-level encryption

2017-08-31 Thread Eric Biggers
On Mon, Aug 28, 2017 at 08:18:55PM +0800, Anand Jain wrote: > > > On 08/23/2017 01:36 AM, Eric Biggers wrote: > >On Tue, Aug 22, 2017 at 11:35:20PM +0800, Anand Jain wrote: > >>>> > >>>> I think AE is the only good solution for this, File-name e

[PATCH v2] fscrypt: add a documentation file for filesystem-level encryption

2017-08-31 Thread Eric Biggers
From: Eric Biggers Perhaps long overdue, add a documentation file for filesystem-level encryption, a.k.a. fscrypt or fs/crypto/, to the Documentation directory. The new file is based loosely on the latest version of the "EXT4 Encryption Design Document (public version)" Google Doc

Re: [PATCH v2] fscrypt: add a documentation file for filesystem-level encryption

2017-09-05 Thread Eric Biggers
Hi Michael, On Fri, Sep 01, 2017 at 05:12:28PM -0700, Michael Halcrow wrote: > > +fscrypt is only resistant to side-channel attacks, such as timing or > > +electromagnetic attacks, to the extent that the underlying Linux > > +Cryptographic API algorithms are. If a vulnerable algorithm is used, >

[PATCH v3] fscrypt: add a documentation file for filesystem-level encryption

2017-09-08 Thread Eric Biggers
From: Eric Biggers Perhaps long overdue, add a documentation file for filesystem-level encryption, a.k.a. fscrypt or fs/crypto/, to the Documentation directory. The new file is based loosely on the latest version of the "EXT4 Encryption Design Document (public version)" Google Doc

Re: [PATCH v3] fscrypt: add a documentation file for filesystem-level encryption

2017-10-09 Thread Eric Biggers
On Fri, Sep 08, 2017 at 05:15:12PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Perhaps long overdue, add a documentation file for filesystem-level > encryption, a.k.a. fscrypt or fs/crypto/, to the Documentation > directory. The new file is based loosely on the latest

[PATCH] KEYS: fix in-kernel documentation for keyctl_read()

2017-10-26 Thread Eric Biggers
From: Eric Biggers When keyctl_read() is passed a buffer that is too small, the behavior is inconsistent. Some key types will fill as much of the buffer as possible, while others won't copy anything. Moreover, the in-kernel documentation contradicted the man page on this point. Update t

Re: [PATCH] KEYS: fix in-kernel documentation for keyctl_read()

2017-11-01 Thread Eric Biggers
On Wed, Nov 01, 2017 at 01:57:18PM +, David Howells wrote: > Eric Biggers wrote: > > > - As much of the data as can be fitted into the buffer will be copied to > > - userspace if the buffer pointer is not NULL. > > - > > - On a successful return, t

[PATCH v2] KEYS: fix in-kernel documentation for keyctl_read()

2017-11-02 Thread Eric Biggers
From: Eric Biggers When keyctl_read() is passed a buffer that is too small, the behavior is inconsistent. Some key types will fill as much of the buffer as possible, while others won't copy anything. Moreover, the in-kernel documentation contradicted the man page on this point. Update t

[keyutils PATCH v2] man: keyctl_read(3): fix documentation for short buffer case

2017-11-02 Thread Eric Biggers
From: Eric Biggers When keyctl_read() is passed a buffer that is too small, the behavior is inconsistent. Some key types will fill as much of the buffer as possible, while others won't copy anything. Moreover, the in-kernel documentation contradicted the man page on this point. Update th

[PATCH RESEND] crypto: doc - fix documentation for bulk registration functions

2016-09-14 Thread Eric Biggers
Update the documentation for crypto_register_algs() and crypto_unregister_algs() to match the actual behavior. Signed-off-by: Eric Biggers --- Documentation/DocBook/crypto-API.tmpl | 38 --- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a

Re: [keyutils PATCH v2] man: keyctl_read(3): fix documentation for short buffer case

2018-05-08 Thread Eric Biggers
On Tue, Feb 20, 2018 at 11:42:34AM -0800, Eric Biggers wrote: > On Thu, Nov 02, 2017 at 11:06:05AM -0700, Eric Biggers wrote: > > From: Eric Biggers > > > > When keyctl_read() is passed a buffer that is too small, the behavior is > > inconsistent. Some key types will

[PATCH] crypto: document correct return value for request allocation

2016-04-02 Thread Eric Biggers
Signed-off-by: Eric Biggers --- Documentation/DocBook/crypto-API.tmpl | 6 +++--- include/crypto/aead.h | 3 +-- include/crypto/hash.h | 3 +-- include/crypto/skcipher.h | 3 +-- include/linux/crypto.h| 3 +-- 5 files changed, 7

[PATCH] crypto: doc - fix documentation for bulk registration functions

2016-08-17 Thread Eric Biggers
Update the documentation for crypto_register_algs() and crypto_unregister_algs() to match the actual behavior. Signed-off-by: Eric Biggers --- Documentation/DocBook/crypto-API.tmpl | 38 --- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a