[Devel] [PATCH hci-8.1] fs/fuse/kio: do not panic on unaligned memory access in cs accel

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Tue Dec 1 04:06:33 MSK 2026


> Actually, this assertion was deliberate and served its purpose.
> We were not supposed to arrive at this place ever. Nevertheless,
> new kernels have allowed O_DIRECT access to tmpfs
> (e88e0d366f9c "tmpfs: trivial support for direct IO"), which does
> not imply any memory alignment constraints. Our tests really use
> tmpfs.
> 
> Notes:
> 
> - vstorage deliberately does not check memory alignment anywhere.
>   The fact that linux fs used to reject unaligned direct io is considered
>   as a kernel flaw, which is going to be fixed one day, so that we do not
>   pollute our code with such checks. Cf. #VSTOR-53260 where
>   the investigation has been undertaken
> - alignment check in decrypt protects deficient algorithm
>   in decrypt_data(), which is not able to handle a 512-byte crypto sector
>   split over 2 pages. We could repair this instead of rejection,
>   but it would complicate code significantly, and
>   until this is required in production we do not want this.
> - it is safe to fail any operation in cs accel with an error:
>   any error condition causes fallback to slow path and
>   as long as the condition is truly exceptional, it is all right.
> 
> Fixes: 5acc64b761cd ("fuse: implement fast access to encrypted CSes")
> https://virtuozzo.atlassian.net/browse/VSTOR-157924
> 
> Affects: #VSTOR-157924
> 
> Signed-off-by: Alexey Kuznetsov <kuznet at virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/aw2OzUHFpvEwwuS5@mops2?part=1




More information about the Devel mailing list