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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <283df638-2300-e723-f0dd-b0672170537f@huawei.com>
Date:   Fri, 26 Feb 2021 09:14:34 +0000
From:   John Garry <john.garry@...wei.com>
To:     Jiri Olsa <jolsa@...hat.com>
CC:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: perf test for daemon

On 25/02/2021 19:35, Jiri Olsa wrote:
> On Thu, Feb 25, 2021 at 08:13:07PM +0100, Jiri Olsa wrote:
>> On Thu, Feb 25, 2021 at 06:39:22PM +0000, John Garry wrote:
>>> Hi,
>>>
>>> I notice that "perf test" when run without root priviledges now hangs at the
>>> daemon test - is this expected behaviour? Can we skip and warn the user
>>> instead?
>>>
>>> I'm checking acme perf/core today.
>> ugh, I'll check.. looks like control fifo files are created with wrong permissions
> could you please try the fix below? it's passing with non-root user for me
> 
> thanks,
> jirka
> 

ok, it completes now. thanks

Tested-by: John Garry <john.garry@...wei.com>

> 
> ---
> diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c
> index 617feaf020f6..8f0ed2e59280 100644
> --- a/tools/perf/builtin-daemon.c
> +++ b/tools/perf/builtin-daemon.c
> @@ -373,12 +373,12 @@ static int daemon_session__run(struct daemon_session *session,
>   	dup2(fd, 2);
>   	close(fd);
>   
> -	if (mkfifo(SESSION_CONTROL, O_RDWR) && errno != EEXIST) {
> +	if (mkfifo(SESSION_CONTROL, 0600) && errno != EEXIST) {
>   		perror("failed: create control fifo");
>   		return -1;
>   	}
>   
> -	if (mkfifo(SESSION_ACK, O_RDWR) && errno != EEXIST) {
> +	if (mkfifo(SESSION_ACK, 0600) && errno != EEXIST) {
>   		perror("failed: create ack fifo");
>   		return -1;
>   	}
> diff --git a/tools/perf/tests/shell/daemon.sh b/tools/perf/tests/shell/daemon.sh
> index e5b824dd08d9..5ad3ca8d681b 100755

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ