lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2313ee27-45e2-ea5e-140b-11be42e52809@linux.alibaba.com>
Date:   Sat, 19 Feb 2022 01:13:14 -0800
From:   Dan Li <ashimida@...ux.alibaba.com>
To:     gcc-patches@....gnu.org, richard.earnshaw@....com,
        marcus.shawcroft@....com, kyrylo.tkachov@....com, hp@....gnu.org,
        ndesaulniers@...gle.com, nsz@....gnu.org, pageexec@...il.com,
        qinzhao@....gnu.org, linux-hardening@...r.kernel.org,
        richard.sandiford@....com
Subject: Re: [PATCH] [PATCH,v5,1/1,AARCH64][PR102768] aarch64: Add compiler
 support for Shadow Call Stack



On 2/15/22 10:02, Richard Sandiford wrote:
> Dan Li <ashimida@...ux.alibaba.com> writes:
>> Shadow Call Stack can be used to protect the return address of a
> 
> Looks good, thanks.  However, when I bootstrap it on
> aarch64-linux-gnu I get:
> 
> .../gcc/ubsan.cc: In function ‘bool ubsan_expand_null_ifn(gimple_stmt_iterator*)’:
> .../gcc/ubsan.cc:835:50: error: enumerated and non-enumerated type in conditional expression [-Werror=extra]
>    835 |         = (flag_sanitize_recover & ((check_align ? SANITIZE_ALIGNMENT : 0)
>        |                                      ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
> .../gcc/ubsan.cc:836:51: error: enumerated and non-enumerated type in conditional expression [-Werror=extra]
>    836 |                                     | (check_null ? SANITIZE_NULL : 0)))
>        |                                        ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
> 
> I think this is because you're taking the last available bit
> of the enum :-)
> 
> A hacky fix is to add "+ 0" to SANITIZE_ALIGNMENT and SANITIZE_NULL
> in the code quoted above (i.e. the code in the error messages).
> That seems slightly more robust than a cast to unsigned int (say),
> since "+ 0" will work even if the values become 64-bit quantities
> in future.
> 
> Richard

Hi, Richard,
I have sent out the v6[1]. I re-tested native/cross-compile, and tested
all test cases in both cases (make -k check).

The test results of this patch are consistent with the current mainline
(but in my test environment there are some test cases that fail in both).

The current version seems fine to me, please let me know if I'm missing
something :)

[1]https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590602.html

Thanks,
Dan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ