44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
|
From 0fa61ea96be78697c69747e660b8dd81a26d4f26 Mon Sep 17 00:00:00 2001
|
|||
|
From: Carlos Llamas <cmllamas@google.com>
|
|||
|
Date: Thu, 15 Apr 2021 23:27:49 +0000
|
|||
|
Subject: [PATCH 20/31] ANDROID: Incremental fs: fix u64 integer cast to
|
|||
|
pointer
|
|||
|
MIME-Version: 1.0
|
|||
|
Content-Type: text/plain; charset=UTF-8
|
|||
|
Content-Transfer-Encoding: 8bit
|
|||
|
|
|||
|
Compiler (arm-linux-gnueabihf-gcc 8.3.0) complains about an invalid cast
|
|||
|
of an __aligned_u64 integer to a pointer on 32-bit architectures. Using
|
|||
|
u64_to_user_ptr() for the cast fixes the following warning:
|
|||
|
|
|||
|
fs/incfs/pseudo_files.c: In function ‘ioctl_create_file’:
|
|||
|
fs/incfs/pseudo_files.c:656:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
|
|||
|
656 | (u8 __user *)args.signature_info,
|
|||
|
| ^
|
|||
|
|
|||
|
Bug: 183339614
|
|||
|
Fixes: bc6a70e849cc (ANDROID: Incremental fs: Remove signature checks from kernel)
|
|||
|
Reported-by: kernelci.org bot <bot@kernelci.org>
|
|||
|
Signed-off-by: Carlos Llamas <cmllamas@google.com>
|
|||
|
Change-Id: I98a987fb83c160740796c0b4b3fdd7551880e12a
|
|||
|
---
|
|||
|
fs/incfs/pseudo_files.c | 2 +-
|
|||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|||
|
|
|||
|
diff --git a/fs/incfs/pseudo_files.c b/fs/incfs/pseudo_files.c
|
|||
|
index a804436c6bcf..8d2e4a26792e 100644
|
|||
|
--- a/fs/incfs/pseudo_files.c
|
|||
|
+++ b/fs/incfs/pseudo_files.c
|
|||
|
@@ -652,7 +652,7 @@ static long ioctl_create_file(struct file *file,
|
|||
|
/* Initializing a newly created file. */
|
|||
|
error = init_new_file(mi, index_file_dentry, &args.file_id, args.size,
|
|||
|
range(attr_value, args.file_attr_len),
|
|||
|
- (u8 __user *)args.signature_info,
|
|||
|
+ u64_to_user_ptr(args.signature_info),
|
|||
|
args.signature_size);
|
|||
|
if (error)
|
|||
|
goto out;
|
|||
|
--
|
|||
|
2.17.1
|
|||
|
|