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:   Wed, 14 Sep 2016 16:16:29 +0530
From:   "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
To:     "Wangnan (F)" <wangnan0@...wei.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        linux-kernel@...r.kernel.org, lizefan@...wei.com, pi3orama@....com
Subject: Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

On 2016/09/14 06:23PM, Wang Nan wrote:
> 
> 
> On 2016/9/14 18:00, Naveen N. Rao wrote:
> > On 2016/09/14 05:36PM, Wang Nan wrote:
> > > 
> > > On 2016/9/14 17:28, Naveen N. Rao wrote:
> > > > On 2016/09/12 06:15PM, Arnaldo Carvalho de Melo wrote:
> > > > > Em Mon, Sep 12, 2016 at 04:07:42PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > > > > Em Mon, Sep 12, 2016 at 12:54:29PM +0000, Wang Nan escreveu:
> > > > > > > Some mmap related macros have different values for different
> > > > > > > architectures. This patch introduces uapi mman.h for each
> > > > > > > architectures.
> > > > > > > 
> > > > > > > Three headers are cloned from kernel include to tools/include:
> > > > > > > 
> > > > > > >    tools/include/uapi/asm-generic/mman-common.h
> > > > > > >    tools/include/uapi/asm-generic/mman.h
> > > > > > >    tools/include/uapi/linux/mman.h
> > > > > > Cool, the above was done as copies, why not the rest? IIRC you mentioned
> > > > > > some reasoning behind that decision, but we need it spelled out here.
> > > > > > 
> > > > > > For instance, I went on and look at arch/xtensa/include/uapi/asm/mman.h,
> > > > > > and couldn't find why we shouldn't copy it just like the three files
> > > > > > above.
> > > > > > 
> > > > > > I'm looking now at why the build breaks in so many systems, first hunch
> > > > > > is that bits/ part (the ones without the failure details probably have
> > > > > > the same errors), alpine uses musl libc, but some that broke are glibc
> > > > > > based.
> > > > > So, please take a look at my perf/core branch, I applied 1/3 and 3/3,
> > > > > but took a different path for 2/3, now it builds for all systems I have
> > > > > containers for:
> > > > This still fails for me on ppc64. Perhaps we should guard
> > > > P_MMAP_FLAG(32BIT) and potentially others with a #ifdef, which was
> > > > earlier reverted by commit 256763b0 ("perf trace beauty mmap: Add more
> > > > conditional defines")?
> > > Perhaps we should set all non-exist flag to 0 in each uapi mman.h?
> > Will that work for MADV_* since the macro there is for a case statement?
> 
> Then fall back to include/uapi/asm-generic/mman-common.h. And I

mman-common.h is already included on powerpc:

# cat tools/arch/powerpc/include/uapi/asm/mman.h 
#ifndef TOOLS_ARCH_POWERPC_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_POWERPC_UAPI_ASM_MMAN_FIX_H
#define MAP_DENYWRITE	0x0800
#define MAP_EXECUTABLE	0x1000
#define MAP_GROWSDOWN	0x0100
#define MAP_HUGETLB	0x40000
#define MAP_LOCKED	0x80
#define MAP_NONBLOCK	0x10000
#define MAP_NORESERVE   0x40
#define MAP_POPULATE	0x8000
#define MAP_STACK	0x20000
#include <uapi/asm-generic/mman-common.h>
#endif

> realized the missing of MADV_FEEE in tools/perf/trace/beauty/mmap.c.
> Is that intentionally?

Not sure, Arnaldo should know.

Thanks,
Naveen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ