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:   Fri, 17 Jun 2022 15:38:40 +0800
From:   Leo Yan <leo.yan@...aro.org>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...nel.org>, Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Ian Rogers <irogers@...gle.com>,
        linux-perf-users@...r.kernel.org,
        John Garry <john.garry@...wei.com>,
        Will Deacon <will@...nel.org>,
        James Clark <james.clark@....com>,
        Mike Leach <mike.leach@...aro.org>,
        German Gomez <german.gomez@....com>
Subject: Re: [PATCH v2] perf test: Add ARM SPE system wide test

Hi Namhyung,

On Thu, Jun 16, 2022 at 04:05:46PM -0700, Namhyung Kim wrote:

[...]

> +arm_spe_system_wide_test() {
> +	echo "Recording trace with system-wide mode $perfdata"
> +	perf record -o ${perfdata} -e arm_spe// -a \
> +		-- dd if=/dev/zero of=/dev/null count=100000 > /dev/null 2>&1
> +
> +	if [ $? != 0 ]; then
> +		arm_spe_report "SPE system-wide testing" 2
> +		return
> +	fi

I am awared the root permission issue after I saw German's suggestion.

If the snapshot test is passed, no matter the system wide test is passed
or not, we will always return 0 for 'passed' result.  But we might miss
to capture the system-wide testing failure.

How about use 'dummy' event to verіfy the root permission?
(actually I referred to intel-pt test):

        perf record -o ${tmpfile} -B -N --no-bpf-event -e dummy:u -a true 2>&1 >/dev/null
        if [ $? != 0 ]; then
        	arm_spe_report "SPE system-wide testing" 2
        	return
        fi

        perf record -o ${perfdata} -e arm_spe// -a \
                  -- dd if=/dev/zero of=/dev/null count=100000 > /dev/null 2>&1

Thanks,
Leo

> +	perf_script_samples dd &&
> +	perf_report_samples dd
> +
> +	err=$?
> +	arm_spe_report "SPE system-wide testing" $err
> +}
> +
>  arm_spe_snapshot_test
> +arm_spe_system_wide_test
> +
>  exit $glb_err
> -- 
> 2.36.1.476.g0c4daa206d-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ