LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [axboe:for-7.0/block 19/138] block/blk-crypto-fallback.c:154:17: sparse: sparse: cast from restricted blk_status_t
       [not found] <202606012339.rZAl6Xq8-lkp@intel.com>
@ 2026-06-01 15:29 ` Christoph Hellwig
  2026-08-13  8:20   ` Christophe Leroy (CS GROUP)
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2026-06-01 15:29 UTC (permalink / raw)
  To: kernel test robot
  Cc: Christoph Hellwig, oe-kbuild-all, Jens Axboe, Eric Biggers,
	Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy (CS GROUP), linuxppc-dev

I think powerpc really need to pick the tricks from other architectures
to make cmpxchg work on __bitwise fields.

On Mon, Jun 01, 2026 at 11:26:16PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git for-7.0/block
> head:   72f4d6fca699a1e35b39c5e5dacac2926d254135
> commit: b37fbce460ad60b0c4449c1c7566cf24f3016713 [19/138] blk-crypto: optimize bio splitting in blk_crypto_fallback_encrypt_bio
> config: powerpc64-randconfig-r111-20260601 (https://download.01.org/0day-ci/archive/20260601/202606012339.rZAl6Xq8-lkp@intel.com/config)
> compiler: powerpc64-linux-gcc (GCC) 8.5.0
> sparse: v0.6.5-rc1
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260601/202606012339.rZAl6Xq8-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202606012339.rZAl6Xq8-lkp@intel.com/
> 
> sparse warnings: (new ones prefixed by >>)
> >> block/blk-crypto-fallback.c:154:17: sparse: sparse: cast from restricted blk_status_t
> >> block/blk-crypto-fallback.c:154:17: sparse: sparse: cast from restricted blk_status_t
>    block/blk-crypto-fallback.c:154:17: sparse: sparse: cast to restricted blk_status_t
> 
> vim +154 block/blk-crypto-fallback.c
> 
>    143	
>    144	static void blk_crypto_fallback_encrypt_endio(struct bio *enc_bio)
>    145	{
>    146		struct bio *src_bio = enc_bio->bi_private;
>    147		int i;
>    148	
>    149		for (i = 0; i < enc_bio->bi_vcnt; i++)
>    150			mempool_free(enc_bio->bi_io_vec[i].bv_page,
>    151				     blk_crypto_bounce_page_pool);
>    152	
>    153		if (enc_bio->bi_status)
>  > 154			cmpxchg(&src_bio->bi_status, 0, enc_bio->bi_status);
>    155	
>    156		bio_put(enc_bio);
>    157		bio_endio(src_bio);
>    158	}
>    159	
> 
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
---end quoted text---


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [axboe:for-7.0/block 19/138] block/blk-crypto-fallback.c:154:17: sparse: sparse: cast from restricted blk_status_t
  2026-06-01 15:29 ` [axboe:for-7.0/block 19/138] block/blk-crypto-fallback.c:154:17: sparse: sparse: cast from restricted blk_status_t Christoph Hellwig
@ 2026-08-13  8:20   ` Christophe Leroy (CS GROUP)
  0 siblings, 0 replies; 2+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-08-13  8:20 UTC (permalink / raw)
  To: Christoph Hellwig, kernel test robot
  Cc: oe-kbuild-all, Jens Axboe, Eric Biggers, Madhavan Srinivasan,
	Michael Ellerman, Nicholas Piggin, linuxppc-dev

Hi,

Le 01/06/2026 à 17:29, Christoph Hellwig a écrit :
> I think powerpc really need to pick the tricks from other architectures
> to make cmpxchg work on __bitwise fields.

Thanks,

Should be fixed by 
https://lore.kernel.org/all/289a7ffac9cb5b6d26a57fdc26605bf725285302.1786608980.git.chleroy@kernel.org/

Based on commit 212dd8477653 ("arm64: Silence sparse warnings caused by 
the type casting in (cmp)xchg")

Christophe

> 
> On Mon, Jun 01, 2026 at 11:26:16PM +0800, kernel test robot wrote:
>> tree:   https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Faxboe%2Flinux.git&data=05%7C02%7Cchristophe.leroy%40csgroup.eu%7Cb09ed76c517f4ac2a96a08debff29913%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639159245835365955%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=SCrQIL52YejLyMbT487%2Fu4y7bDdqD3W0NISJGASlqnI%3D&reserved=0 for-7.0/block
>> head:   72f4d6fca699a1e35b39c5e5dacac2926d254135
>> commit: b37fbce460ad60b0c4449c1c7566cf24f3016713 [19/138] blk-crypto: optimize bio splitting in blk_crypto_fallback_encrypt_bio
>> config: powerpc64-randconfig-r111-20260601 (https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdownload.01.org%2F0day-ci%2Farchive%2F20260601%2F202606012339.rZAl6Xq8-lkp%40intel.com%2Fconfig&data=05%7C02%7Cchristophe.leroy%40csgroup.eu%7Cb09ed76c517f4ac2a96a08debff29913%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639159245835742509%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=mcTjhCA7fN2FQAsYEiRRY3xTOyBg%2BNJxAwMqeSERPG4%3D&reserved=0)
>> compiler: powerpc64-linux-gcc (GCC) 8.5.0
>> sparse: v0.6.5-rc1
>> reproduce (this is a W=1 build): (https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdownload.01.org%2F0day-ci%2Farchive%2F20260601%2F202606012339.rZAl6Xq8-lkp%40intel.com%2Freproduce&data=05%7C02%7Cchristophe.leroy%40csgroup.eu%7Cb09ed76c517f4ac2a96a08debff29913%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639159245835767299%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=3IobnZTPyXIEKog3PvyDf%2Bti4W%2F4jFM8O5QZG%2FVn%2Bkw%3D&reserved=0)
>>
>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>> the same patch/commit), kindly add following tags
>> | Reported-by: kernel test robot <lkp@intel.com>
>> | Closes: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Foe-kbuild-all%2F202606012339.rZAl6Xq8-lkp%40intel.com%2F&data=05%7C02%7Cchristophe.leroy%40csgroup.eu%7Cb09ed76c517f4ac2a96a08debff29913%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639159245835785008%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=dkHYbj0M7dRIfeyg8uLlJgQlMYbYi91eHIOx5FZOpJ0%3D&reserved=0
>>
>> sparse warnings: (new ones prefixed by >>)
>>>> block/blk-crypto-fallback.c:154:17: sparse: sparse: cast from restricted blk_status_t
>>>> block/blk-crypto-fallback.c:154:17: sparse: sparse: cast from restricted blk_status_t
>>     block/blk-crypto-fallback.c:154:17: sparse: sparse: cast to restricted blk_status_t
>>
>> vim +154 block/blk-crypto-fallback.c
>>
>>     143	
>>     144	static void blk_crypto_fallback_encrypt_endio(struct bio *enc_bio)
>>     145	{
>>     146		struct bio *src_bio = enc_bio->bi_private;
>>     147		int i;
>>     148	
>>     149		for (i = 0; i < enc_bio->bi_vcnt; i++)
>>     150			mempool_free(enc_bio->bi_io_vec[i].bv_page,
>>     151				     blk_crypto_bounce_page_pool);
>>     152	
>>     153		if (enc_bio->bi_status)
>>   > 154			cmpxchg(&src_bio->bi_status, 0, enc_bio->bi_status);
>>     155	
>>     156		bio_put(enc_bio);
>>     157		bio_endio(src_bio);
>>     158	}
>>     159	
>>
>> --
>> 0-DAY CI Kernel Test Service
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fintel%2Flkp-tests%2Fwiki&data=05%7C02%7Cchristophe.leroy%40csgroup.eu%7Cb09ed76c517f4ac2a96a08debff29913%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639159245835802872%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=4Iyio2M%2Fz52Q9ilcjHSE%2Fmy98xR53NJQm%2FzwwXDH1qo%3D&reserved=0
> ---end quoted text---



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-13  8:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <202606012339.rZAl6Xq8-lkp@intel.com>
2026-06-01 15:29 ` [axboe:for-7.0/block 19/138] block/blk-crypto-fallback.c:154:17: sparse: sparse: cast from restricted blk_status_t Christoph Hellwig
2026-08-13  8:20   ` Christophe Leroy (CS GROUP)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox