Re: 答复: [External Mail]Re: zram decompress support for gcore/crash-utility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I got little problem to compile 32-bit on my x86-64 host..
 96 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a when searching for -lgcc
 97 /usr/bin/ld: cannot find -lgcc
 98 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc_s.so when searching for -lgcc_s
 99 /usr/bin/ld: cannot find -lgcc_s

I think i have fixed the build warning,but failed rebuild in 32-bit since above error,please help confirm,and move log to try_zram_decompress,please check the attachment.

________________________________________
From: Dave Anderson <anderson@xxxxxxxxxx>
Sent: Friday, April 10, 2020 1:00
To: 赵乾利
Cc: d hatayama; Discussion list for crash utility usage, maintenance and development
Subject: Re: 答复: [External Mail]Re: [Crash-utility] zram decompress support for gcore/crash-utility

----- Original Message -----
> Hi,Dave
>
> I modified RETURN_ON_ERROR to FAULT_ON_ERROR in all readmem,patch has > attached.
> The reason for adding "decompress success"  is that i want indicate that zram
> address is different from the normal address,and calling zram_decompress not
> only readmem failures,but also decompression failures etc.i add "This page
> has swaped to zram"/"zram decompress success" as the signature log,and these
> log only printed when pc->debug >= 2.
>
> When gcore read UVA address,there may be many page fault happened,we can only
> deal with zram swap,"not mapped" and other types of swap will not be
> processed.For debug request,we may need the signature log for zram.
> so i think it's better to keep this log.

OK fine, but please move the message out of readmem(), and put it at the end of
try_zram_decompress() where it really belongs.  You'll have to replace the
"PAGEOFFSET(addr)" argument with "ulonglong addr", and then do the PAGEOFFSET()
in try_zram_decompress().

Also, this doesn't compile cleanly on 32-bit architectures:

$ make warn
TARGET: X86
 CRASH: 7.2.9rc10
   GDB: 7.6

...
cc -c -g -DX86 -m32 -D_FILE_OFFSET_BITS=64 -DLZO -DSNAPPY -DGDB_7_6  diskdump.c -Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -fstack-protector -Wformat-security
diskdump.c: In function 'lookup_swap_cache':
diskdump.c:2657:2: warning: right shift count >= width of type [enabled by default]
  swp_type = __swp_type(pte_val);
  ^
diskdump.c:2659:3: warning: right shift count >= width of type [enabled by default]
   swp_offset = (ulonglong)__swp_offset(pte_val);
   ^
diskdump.c: In function 'try_zram_decompress':
diskdump.c:2709:3: warning: right shift count >= width of type [enabled by default]
   swap_info += (__swp_type(pte_val) * sizeof(void *));
   ^
diskdump.c:2713:3: warning: right shift count >= width of type [enabled by default]
   swap_info += (SIZE(swap_info_struct) * __swp_type(pte_val));
   ^
diskdump.c:2745:4: warning: right shift count >= width of type [enabled by default]
    swp_offset = (ulonglong)__swp_offset(pte_val);
...

Thanks,
  Dave

#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

<<attachment: crash-zram0410.zip>>

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux