All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: davem@davemloft.net, linux-crypto@vger.kernel.org,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, ecryptfs@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] crypto: allow to assign gfp_t for __crypto_alloc_tfm
Date: Tue, 19 May 2015 13:49:45 +0800	[thread overview]
Message-ID: <20150519054945.GA28060@gondor.apana.org.au> (raw)
In-Reply-To: <1432014416-39326-1-git-send-email-jaegeuk@kernel.org>

On Mon, May 18, 2015 at 10:46:56PM -0700, Jaegeuk Kim wrote:
> This patch adds a parameter, gfp_t, for __crypto_alloc_tfm.
> Now EXT4 and F2FS use the crypto engine to encrypt a page when writing it to the
> disk.
> That happens during ->writepage and it needs to allocate memory with
> GFP_NOFS.
> 
> Otherwise, in the f2fs case, kernel reports such the following warning.

Normally crypto structures should only be allocated on control
paths where sleeping or swapping is not an issue.  Why is ext4
doing crypto allocations on the data path?

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

WARNING: multiple messages have this Message-ID (diff)
From: herbert@gondor.apana.org.au (Herbert Xu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] crypto: allow to assign gfp_t for __crypto_alloc_tfm
Date: Tue, 19 May 2015 13:49:45 +0800	[thread overview]
Message-ID: <20150519054945.GA28060@gondor.apana.org.au> (raw)
In-Reply-To: <1432014416-39326-1-git-send-email-jaegeuk@kernel.org>

On Mon, May 18, 2015 at 10:46:56PM -0700, Jaegeuk Kim wrote:
> This patch adds a parameter, gfp_t, for __crypto_alloc_tfm.
> Now EXT4 and F2FS use the crypto engine to encrypt a page when writing it to the
> disk.
> That happens during ->writepage and it needs to allocate memory with
> GFP_NOFS.
> 
> Otherwise, in the f2fs case, kernel reports such the following warning.

Normally crypto structures should only be allocated on control
paths where sleeping or swapping is not an issue.  Why is ext4
doing crypto allocations on the data path?

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2015-05-19  5:49 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19  5:46 [PATCH] crypto: allow to assign gfp_t for __crypto_alloc_tfm Jaegeuk Kim
2015-05-19  5:46 ` Jaegeuk Kim
2015-05-19  5:49 ` Herbert Xu [this message]
2015-05-19  5:49   ` Herbert Xu
2015-05-19  6:24   ` Jaegeuk Kim
2015-05-19  6:24     ` Jaegeuk Kim
2015-05-19  6:31     ` [f2fs-dev] [PATCH v2] " Jaegeuk Kim
2015-05-19  6:31       ` Jaegeuk Kim
2015-05-19  6:32       ` Herbert Xu
2015-05-19  6:32         ` [f2fs-dev] " Herbert Xu
2015-05-19  6:32         ` Herbert Xu
2015-05-19  6:32     ` [PATCH] " Herbert Xu
2015-05-19  6:32       ` Herbert Xu
2015-05-19  6:58       ` Jaegeuk Kim
2015-05-19  6:58         ` Jaegeuk Kim
2015-05-19  6:59         ` Herbert Xu
2015-05-19  6:59           ` Herbert Xu
2015-05-19  7:13           ` Jaegeuk Kim
2015-05-19  7:13             ` Jaegeuk Kim
2015-05-19  7:15             ` Herbert Xu
2015-05-19  7:15               ` Herbert Xu
2015-05-19  7:27               ` Jaegeuk Kim
2015-05-19  7:27                 ` Jaegeuk Kim
2015-05-19  7:30                 ` Herbert Xu
2015-05-19  7:30                   ` Herbert Xu
2015-05-19  7:59                   ` Jaegeuk Kim
2015-05-19  7:59                     ` Jaegeuk Kim
2015-05-19 14:14               ` Theodore Ts'o
2015-05-19 14:14                 ` Theodore Ts'o
2015-05-19 14:27                 ` Herbert Xu
2015-05-19 14:27                   ` Herbert Xu
2015-05-19 14:39                   ` Theodore Ts'o
2015-05-19 14:39                     ` Theodore Ts'o
2015-05-20  7:21                   ` Steffen Klassert
2015-05-20  7:21                     ` Steffen Klassert
2015-05-20  7:21                     ` Steffen Klassert
2015-05-20 14:59                     ` Theodore Ts'o
2015-05-20 14:59                       ` Theodore Ts'o
2015-05-20 15:30                       ` Ard Biesheuvel
2015-05-20 15:30                         ` Ard Biesheuvel
2015-05-20 15:30                         ` Ard Biesheuvel
2015-05-20 15:42                         ` Herbert Xu
2015-05-20 15:42                           ` Herbert Xu
2015-05-20 15:42                           ` Herbert Xu

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=20150519054945.GA28060@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=ecryptfs@vger.kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.