View previous topic :: View next topic |
Author |
Message |
hanj Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/104414163441b8c6c1a6b4e.gif)
Joined: 19 Aug 2003 Posts: 1496
|
Posted: Tue Dec 06, 2022 4:17 pm Post subject: |
|
|
mike155 wrote: | Okay, I think I know what's going on. Please try:
Code: | CFLAGS="-O2 -pipe -ggdb3 -march=native -mno-avx" |
|
Thanks. That compiled, and it's working. Is this a possible bug I need to report?
hanji _________________ Server Admin Blog - Uno-Code.com |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mike155 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Tue Dec 06, 2022 4:21 pm Post subject: |
|
|
@grknight: not on my machine. I have:
Code: | CFLAGS="-march=native -O2 -pipe -mno-avx" |
and that results in:
Code: | x86_64-pc-linux-gnu-gcc -I. -I./lib -Ilib -I./lib -Isrc -I./src -mavx -mpclmul -march=native -O2 -pipe -mno-avx -c -o src/libcksum_pclmul_a-cksum_pclmul.o `test -f 'src/cksum_pclmul.c' || echo './'`src/cksum_pclmul.c |
"-mno-avx" is still there.
@hanj: Please make another test with:
Code: | CFLAGS="-O2 -pipe -ggdb3 -march=native" |
Does that work as well? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hanj Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/104414163441b8c6c1a6b4e.gif)
Joined: 19 Aug 2003 Posts: 1496
|
Posted: Tue Dec 06, 2022 4:30 pm Post subject: |
|
|
mike155 wrote: |
@hanj: Please make another test with:
Code: | CFLAGS="-O2 -pipe -ggdb3 -march=native" |
Does that work as well? |
That did NOT work.
hanji _________________ Server Admin Blog - Uno-Code.com |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mike155 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hanj Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/104414163441b8c6c1a6b4e.gif)
Joined: 19 Aug 2003 Posts: 1496
|
Posted: Tue Dec 06, 2022 5:05 pm Post subject: |
|
|
Sounds good. I added it package.env to do this for coreutils. Thanks so much for the help!
hanji _________________ Server Admin Blog - Uno-Code.com |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mike155 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Tue Dec 06, 2022 5:41 pm Post subject: |
|
|
Why don't you want to use "-march=native -mno-avx -O2 -pipe" for all packages? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hanj Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/104414163441b8c6c1a6b4e.gif)
Joined: 19 Aug 2003 Posts: 1496
|
Posted: Tue Dec 06, 2022 5:52 pm Post subject: |
|
|
mike155 wrote: | Why don't you want to use "-march=native -mno-avx -O2 -pipe" for all packages? |
Not sure. Up to now, this is the first problem I've ever had with this.
hanji _________________ Server Admin Blog - Uno-Code.com |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mike155 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Tue Dec 06, 2022 5:59 pm Post subject: |
|
|
Well,
gives you only the basic x86_64 instruction set. No extensions at all. Portable, but slow...
Code: | CFLAGS="-march=native -O2 -pipe" |
gives you the basic x86_64 instruction set and additionally all extensions your processor supports. That's the recommended value. See: https://wiki.gentoo.org/wiki/Safe_CFLAGS
Unfortunately, you processor doesn't seem to support AVX when running in a virtualized environment. Therefore...
Code: | CFLAGS="-march=native -mno-avx -O2 -pipe" |
is necessary to give all supported extensions, with the exception of AVX. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hanj Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/104414163441b8c6c1a6b4e.gif)
Joined: 19 Aug 2003 Posts: 1496
|
Posted: Tue Dec 06, 2022 6:07 pm Post subject: |
|
|
mike155 wrote: | Unfortunately, you processor doesn't seem to support AVX when running in a virtualized environment. Therefore...
Code: | CFLAGS="-march=native -mno-avx -O2 -pipe" |
is necessary to give all supported extensions, with the exception of AVX. |
Cool. I'll update my make.conf. Thanks again for all the help!
hanji _________________ Server Admin Blog - Uno-Code.com |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mike155 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Tue Dec 06, 2022 6:17 pm Post subject: |
|
|
One more thing.
Your output of "emerge --info" shows many different versions of binutils, gcc, lvm.
Do you want all those versions to be installed? If you want them, that's fine.
If you don't want or need all those versions, it's time to clean up your system. Run "emerge --depclean".
If that doesn't help, look at your world file: /var/lib/portage/world. Remove everything you don't want to be installed and run "emerge --depclean". |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hanj Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/104414163441b8c6c1a6b4e.gif)
Joined: 19 Aug 2003 Posts: 1496
|
Posted: Tue Dec 06, 2022 7:39 pm Post subject: |
|
|
mike155 wrote: | One more thing.
Your output of "emerge --info" shows many different versions of binutils, gcc, lvm.
Do you want all those versions to be installed? If you want them, that's fine.
If you don't want or need all those versions, it's time to clean up your system. Run "emerge --depclean".
If that doesn't help, look at your world file: /var/lib/portage/world. Remove everything you don't want to be installed and run "emerge --depclean". |
Thanks! I've cleaned up binutils, and will be tackling gcc and lvm next. I had to use ccache to get my llvm up-to-date (finished this morning).
Thanks!
hanji _________________ Server Admin Blog - Uno-Code.com |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
sam_ Developer
![Developer Developer](/images/ranks/rank-dev.gif)
![](images/avatars/7738740495f7d1acc45bdb.jpg)
Joined: 14 Aug 2020 Posts: 1721
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
guid0 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/17878183343f07e13b47b9b.jpg)
Joined: 06 Jul 2003 Posts: 371 Location: The Netherlands / Nederland
|
Posted: Thu Dec 28, 2023 1:55 pm Post subject: |
|
|
Just adding some more feedback as I ran into a similar issue on a bare metal non-VM machine with below cpu:
Code: | processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 94
model name : Intel(R) Xeon(R) CPU E3-1260L v5 @ 2.90GHz
stepping : 3
microcode : 0xf0
cpu MHz : 3671.904
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl smx est tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d arch_capabilities
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit srbds mmio_stale_data retbleed gds
bogomips : 5799.77
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management: |
which looking at above available cpuflags has no support for avx2, however Intel claims otherwise at https://ark.intel.com/content/www/us/en/ark/products/88175/intel-xeon-processor-e3-1260l-v5-8m-cache-2-90-ghz.html so im assuming it can do avx instructions.
Nevertheless the only way for me to move past the cksum error was to:
Code: | CFLAGS="-O2 -pipe -march=native -mno-avx" |
and recompile coreutils. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 21918
|
Posted: Thu Dec 28, 2023 3:26 pm Post subject: |
|
|
guid0 wrote: | Code: |
model name : Intel(R) Xeon(R) CPU E3-1260L v5 @ 2.90GHz
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl smx est tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d arch_capabilities
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit srbds mmio_stale_data retbleed gds |
which looking at above available cpuflags has no support for avx2, however Intel claims otherwise at https://ark.intel.com/content/www/us/en/ark/products/88175/intel-xeon-processor-e3-1260l-v5-8m-cache-2-90-ghz.html so im assuming it can do avx instructions. | Your output states you are vulnerable to Gather Data Sampling. You may, depending on kernel version and options, be under the effect of the heavy handed GDS mitigation that disables AVX. However, it's my understanding that programs which probe for AVX "properly" should work fine anyway. See Documentation/admin-guide/hw-vuln/gather_data_sampling.rst for background on Gather Data Sampling. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
guid0 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/17878183343f07e13b47b9b.jpg)
Joined: 06 Jul 2003 Posts: 371 Location: The Netherlands / Nederland
|
Posted: Thu Dec 28, 2023 7:52 pm Post subject: |
|
|
sorry, to steel the topic here.
Hu wrote: | Your output states you are vulnerable to Gather Data Sampling. You may, depending on kernel version and options, be under the effect of the heavy handed GDS mitigation that disables AVX. However, it's my understanding that programs which probe for AVX "properly" should work fine anyway. See Documentation/admin-guide/hw-vuln/gather_data_sampling.rst for background on Gather Data Sampling. |
Thanks for this. Interesting read. I simply follow the microcode updates Gentoo brings in.
Code: | [ 0.000000] microcode: microcode updated early to revision 0xf2, date = 2023-01-02
[ 0.000000] Linux version 6.1.67-gentoo (root@ag1) (gcc (Gentoo Hardened 13.2.1_p20230826 p7) 13.2.1 20230826, GNU ld (Gentoo 2.40 p7) 2.40.0) #1 SMP Mon Dec 18 12:14:09 CET 2023
|
Which is currently provided through sys-firmware/intel-microcode-20231114_p20231114. Could this microcode not be protecting against gds?
When looking at /sys/devices/system/cpu/vulnerabilities/gather_data_sampling i get:
Code: | Mitigation: AVX disabled, no microcode |
Processor is vulnerable and microcode is missing mitigation. AVX disabled as mitigation. (Documentation/admin-guide/hw-vuln/gather_data_sampling.rst)
Am i using the wrong microcode or is this up to Intel to provide fixes?
cheers,
guid0 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 21918
|
Posted: Thu Dec 28, 2023 8:19 pm Post subject: |
|
|
Microcode is extremely closed source and proprietary. If you are using current microcode, which it looks to me like you are, then yes, you are waiting for Intel to deign to provide updated microcode for your processor. Ark seems to be broken right now (it just returns "Access Denied"), so I cannot check details of your chip. I seem to recall that CPUs more than a few years old were in the unpleasant spot that they were new enough to have the defect, but old enough that Intel did not want to issue microcode for them. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|