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, 09 Jun 2015 16:43:19 -0700
From:	Alexei Starovoitov <ast@...mgrid.com>
To:	Wang Nan <wangnan0@...wei.com>, acme@...nel.org,
	brendan.d.gregg@...il.com, daniel@...earbox.net,
	namhyung@...nel.org, masami.hiramatsu.pt@...achi.com,
	paulus@...ba.org, a.p.zijlstra@...llo.nl, mingo@...hat.com,
	jolsa@...nel.org, dsahern@...il.com
CC:	linux-kernel@...r.kernel.org, lizefan@...wei.com,
	hekuang@...wei.com, xiakaixu@...wei.com, pi3orama@....com
Subject: Re: [RFC PATCH v6 25/32] perf tools: Add 'bpf.' config section to
 perf default config

On 6/8/15 10:50 PM, Wang Nan wrote:
> perf_bpf_config() is added to parse 'bpf' section in perf config file.
> Following is an example:
>
>   [bpf]
>     clang-path = /llvm/bin/x86_64-linux-clang"
>     llc-path = /llvm/bin/x86_64-linux-llc"
>     clang-opt = "-nostdinc -isystem /llvm/lib/clang/include -I/kernel/arch/x86/include ..."
>     llc-opt = ""

a section to specify -I flags to compile prog.c is useful,
but users shouldn't be populating it manually for kernel headers.
How about adding a script that can figure out $(LINUXINCLUDE)
automatically ?
You can even invoke such flag detector from perf via something like:
f = open /tmpdir/Makefile
fprintf(f, "obj-y := dummy.o\n");
fprintf(f, "$(obj)/%%.o: $(src)/%%.c\n");
fprintf(f, "\t@...o -n \"$(NOSTDINC_FLAGS) $(LINUXINCLUDE) 
$(EXTRA_CFLAGS)\" > %s\n", cachefile);
snprintf(cmd, "make -s -C /lib/modules/%s/build M=%s dummy.o",
    uts_release, tmpdir);
system(cmd);
read flags from cachefile and cache it for the future.
...
or as independent script that populates .perfconfig

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ