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]
Message-ID: <55775F3A.9080204@plumgrid.com>
Date:	Tue, 09 Jun 2015 14:48:42 -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 24/32] perf record: Compile scriptlets if pass
 '.c' to --event

On 6/8/15 10:50 PM, Wang Nan wrote:
> +struct bpf_param bpf_param = {
> +	.clang_path = "clang",
> +	.llc_path = "llc",
> +	.clang_opt = "",
> +	.llc_opt = "",
> +};

the defaults are ok-ish, but llc is never in PATH.
So most likely it won't work out of the box.
I think the cleanest option is too wait a little bit
until we finish clang integration.
(hopefully few more days)

we've quite been busy on llvm side
and I'm excited to announce that BPF backend finally
graduated from experimental.
So now anyone can just pull the latest llvm and
bpf will be present by default.
No more cmake -DLLVM_EXPERIMENTAL...

Once clang integration is complete. One can pull
upsteam llvm and clang and just use 'clang -O2 -c -march=bpf file.c'

> +	err = WEXITSTATUS(pclose(file));
> +	if (err || read_sz <= 0) {
> +		err = -EINVAL;
> +		pr_err("Error:\tsomething went wrong when compiling %s\n",
> +		       filename);
> +		pr_err("Hint:\tTry manually run following command and check:\n");
> +		pr_err("  # " CMD_FMT "\n\n",
> +		       clang_path, bpf_param.clang_opt, filename,
> +		       llc_path, bpf_param.llc_opt, "/dev/null");

not terribly informative hint.
I think would be good to point to some readme or at least mention
that only the latest clang/llvm support bpf.
Either svn/git trunk or upcoming 3.7
May be a link to llvm.org?

--
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