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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 13 Mar 2018 13:10:03 -0700
From:   Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
To:     John Garry <john.garry@...wei.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        linux-kernel@...r.kernel.org, Michael Ellerman <mpe@...erman.id.au>
Subject: Re: perf-core build fails on powerpc

John Garry [john.garry@...wei.com] wrote:
> On 13/03/2018 19:17, Sukadev Bhattiprolu wrote:
> > 
> > 
> > Building perf on Powerpc seems broken when using Arnaldo's perf/core branch
> > with HEAD as:
> > 
> >     1b442ed ("perf test: Fix exit code for record+probe_libc_inet_pton.sh")
> > 
> > It maybe related to this commit:
> > 
> > 	commit d596299
> > 	Author: John Garry <john.garry@...wei.com>
> > 	Date:   Thu Mar 8 18:58:29 2018 +0800
> > 
> > 	    perf vendor events: Add support for pmu events vendor subdirectory
> > 
> > Reverting this hunk from tools/perf/pmu-events/jevents.c, seems to fix the
> > problem for me.
> > 

Hi John,

I have an xfs file system which seems to have d_type == DT_UNKNOWN for all
entries in 'tools/perf/pmu-events/arch/power8'! readdir(3) says ->d_type
may not be supported by all file systems.

Not relying on ->d_type seems to fix it:

@@ -873,26 +879,26 @@ static int is_leaf_dir(const char *fpath)
                return 0;
 
        while ((dir = readdir(d)) != NULL) {
-               if (dir->d_type == DT_DIR && dir->d_name[0] != '.') {
-                       res = 0;
-                       break;
-               } else if (dir->d_type == DT_UNKNOWN) {
-                       char path[PATH_MAX];
-                       struct stat st;
+               char path[PATH_MAX];
+               struct stat st;
 
-                       sprintf(path, "%s/%s", fpath, dir->d_name);
-                       if (stat(path, &st))
-                               break;
+               if (strcmp(dir->d_name, ".") == 0 ||
+                               strcmp(dir->d_name, "..") == 0)
+                       continue;
 
-                       if (S_ISDIR(st.st_mode)) {
-                               res = 0;
-                               break;
-                       }
+               sprintf(path, "%s/%s", fpath, dir->d_name);
+               if (stat(path, &st))
+                       break;
+
+               if (S_ISDIR(st.st_mode)) {
+                       res = 0;
+                       break;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ