This series of patches further integrates the refcount_t API into
the device-mapper layer. The refcount_t API works to prevent counter
overflows and use-after-free bugs, so should make the
mechanism more robust, and make troubleshooting easier. Adding here
to dm-thin and dm-zoned.
Refcounters
The API surrounding refcount_t should be used in place of atomic_t
when variables are being used as reference counters. This API can
prevent issues such as counter overflows and use-after-free
conditions. Within the dm zoned metadata stack, the atomic_t API
is used for mblk->ref and
The API surrounding refcount_t should be used in place of atomic_t
when variables are being used as reference counters. This API can
prevent issues such as counter overflows and use-after-free
conditions. Within the dm zoned target stack, the atomic_t API is
used for bioctx->ref and
The API surrounding refcount_t should be used in place of atomic_t
when variables are being used as reference counters. It can
potentially prevent reference counter overflows and use-after-free
conditions. In the dm thin layer, one such example is tc->refcount.
Change this from the atomic_t API
On Thu, Aug 23, 2018 at 04:39:23PM -0400, Mikulas Patocka wrote:
>
> 1. don't set CRYPTO_TFM_REQ_MAY_SLEEP in dm-crypt
> =
> If we don't set it, dm-crypt will use GFP_ATOMIC and GFP_ATOMIC may fail.
> The function init_crypt in xts.c handles the
Hi
There's a deadlock reported here:
https://bugzilla.kernel.org/show_bug.cgi?id=200835
* dm-crypt calls crypt_convert in xts mode
* init_crypt from xts.c calls kmalloc(GFP_KERNEL)
* kmalloc(GFP_KERNEL) recurses into the XFS filesystem, the filesystem
tries to submit some bios and wait
Sounds good Damien. Thanks for reviewing!
On Thu, Aug 23, 2018 at 6:12 PM, Damien Le Moal wrote:
> John,
>
> On 2018/08/23 10:37, John Pittman wrote:
>> The API surrounding refcount_t should be used in place of atomic_t
>> when variables are being used as reference counters. This API can
>>
John,
On 2018/08/23 10:37, John Pittman wrote:
> The API surrounding refcount_t should be used in place of atomic_t
> when variables are being used as reference counters. This API can
> prevent issues such as counter overflows and use-after-free
> conditions. Within the dm zoned metadata stack,
John,
On 2018/08/23 10:37, John Pittman wrote:
> The API surrounding refcount_t should be used in place of atomic_t
> when variables are being used as reference counters. This API can
> prevent issues such as counter overflows and use-after-free
> conditions. Within the dm zoned target stack,