vmcore-dmesg: struct_val_u64() not casting u64 to u32
Subsystems (2)
PATCH 1/1 vmcore-dmesg: struct_val_u64() not casting u64 to u32
It seems gcc doesn't check return type from inline function. struct_val_u64() should return u64 otherwise upper 32bit is lost.
--- vmcore-dmesg/vmcore-dmesg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
vmcore-dmesg/vmcore-dmesg.c +1 -1
@@ -529,7 +529,7 @@ static inline uint32_t struct_val_u32(char *ptr, unsigned int offset)return (file32_to_cpu (*(uint32_t *)(ptr + offset))); } -static inline uint32_t struct_val_u64 (char *ptr,unsigned int offset) +static inline uint64_t struct_val_u64 (char *ptr,unsigned int offset) {return (file64_to_cpu (*(uint64_t *)(ptr + offset))); }
Signature · 7 lines
1.8.4.2 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 4 lines · WANG Chao
It seems gcc doesn't check return type from inline function.
struct_val_u64()should return u64 otherwise upper 32bit is lost.Signed-off-by WANG Chao <[email protected]>
Vivek
Quoted 25 lines
--- vmcore-dmesg/vmcore-dmesg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)vmcore-dmesg/vmcore-dmesg.c +1
-1@@ -529,7 +529,7 @@ static inline uint32_t struct_val_u32(char *ptr, unsigned int offset)return (file32_to_cpu (*(uint32_t *)(ptr + offset))); } -static inline uint32_t struct_val_u64 (char *ptr,unsigned int offset) +static inline uint64_t struct_val_u64 (char *ptr,unsigned int offset) {return (file64_to_cpu (*(uint64_t *)(ptr + offset))); }Signature · 7 lines
1.8.4.2 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 9 lines · Vivek Goyal
Quoted 4 lines · WANG Chao
It seems gcc doesn't check return type from inline function.
struct_val_u64()should return u64 otherwise upper 32bit is lost.Signed-off-by WANG Chao <[email protected]>Acked-by Vivek Goyal <[email protected]>Vivek
Hi, Simon
Could you please pick up this one?
Thanks
WANG Chao
Quoted 22 lines
Quoted 22 lines
--- vmcore-dmesg/vmcore-dmesg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)vmcore-dmesg/vmcore-dmesg.c +1
-1@@ -529,7 +529,7 @@ static inline uint32_t struct_val_u32(char *ptr, unsigned int offset)return (file32_to_cpu (*(uint32_t *)(ptr + offset))); } -static inline uint32_t struct_val_u64 (char *ptr,unsigned int offset) +static inline uint64_t struct_val_u64 (char *ptr,unsigned int offset) {return (file64_to_cpu (*(uint64_t *)(ptr + offset))); }Signature · 1 line
1.8.4.2
Quoted 9 lines
Quoted 4 lines
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 7 lines · WANG Chao
Quoted 6 lines · Vivek Goyal
Quoted 4 lines · WANG Chao
It seems gcc doesn't check return type from inline function.
struct_val_u64()should return u64 otherwise upper 32bit is lost.Signed-off-by WANG Chao <[email protected]>
Quoted 7 lines
Quoted 3 lines
Acked-by Vivek Goyal <[email protected]>Vivek
Hi, Simon
Could you please pick up this one?
Done, thanks.
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec