View Issue Details

IDProjectCategoryView StatusLast Update
0014599CentOS-7kernelpublic2018-03-21 05:00
Reporternoloader Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platformppc64leOSCentOSOS Version7
Product Version7.4.1708 
Summary0014599: sysconf(_SC_LEVEL1_DCACHE_LINESIZE) returns 0 instead of 128
DescriptionI'm working on GCC112 from the Compile Farm (https://gcc.gnu.org/wiki/CompileFarm). The machine is a IBM POWER System S822.

The following returns 0:

    int n = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);

It is unusual because GCC119 is the same hardware running AIX. It returns 128 for the cache line size:

    int n = getsystemcfg(SC_L1C_DLS);

High integrity software, like Botan and Crypto++, makes use of the L1 data cache line size to [help] avoid timing attacks by forcing L1 evictions. They need an accurate size to ensure the stride is long enough.

My apologies if this is not a bug. I tried to get some help with the issue at "sysconf and _SC_LEVEL1_DCACHE_LINESIZE returns 0?" (https://lists.centos.org/pipermail/centos/2017-September/166236.html).

**************************************************

$ cat /etc/centos-release
CentOS Linux release 7.4.1708 (AltArch)

$ uname -a
Linux gcc2-power8.osuosl.org 3.10.0-514.10.2.el7.ppc64le #1 SMP Fri Mar 3 16:16:38 GMT 2017 ppc64le ppc64le ppc64le GNU/Linux
Steps To ReproduceUsing Linux (GCC112):

#include <sys/sysconf.h>
int cacheLineSize = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);

Using AIX (GCC119):

#include <sys/systemcfg.h>
int cacheLineSize = getsystemcfg(SC_L1C_DLS);
TagsNo tags attached.
abrt_hash
URL

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2018-03-21 05:00 noloader New Issue