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: <1aa47806-30a7-9a23-7c16-5a1665d20469@arm.com>
Date:   Tue, 14 Sep 2021 10:08:49 +0100
From:   Suzuki K Poulose <suzuki.poulose@....com>
To:     Leo Yan <leo.yan@...aro.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Mike Leach <mike.leach@...aro.org>,
        Michael Petlan <mpetlan@...hat.com>,
        "Frank Ch. Eigler" <fche@...hat.com>,
        Song Liu <songliubraving@...com>, x86@...nel.org,
        Daniel Díaz <daniel.diaz@...aro.org>,
        Andrii Nakryiko <andriin@...com>,
        Alexei Starovoitov <ast@...nel.org>,
        Sedat Dilek <sedat.dilek@...il.com>,
        Andi Kleen <ak@...ux.intel.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        coresight@...ts.linaro.org
Subject: Re: [PATCH v5 2/9] coresight: tmc-etr: Add barrier after updating AUX
 ring buffer

On 29/08/2021 11:55, Leo Yan wrote:
> Hi Mathieu, Suzuki,
> 
> On Mon, Aug 09, 2021 at 07:14:00PM +0800, Leo Yan wrote:
>> Since a memory barrier is required between AUX trace data store and
>> aux_head store, and the AUX trace data is filled with memcpy(), it's
>> sufficient to use smp_wmb() so can ensure the trace data is visible
>> prior to updating aux_head.
>>
>> Signed-off-by: Leo Yan <leo.yan@...aro.org>
>> Reviewed-by: Suzuki K Poulose <suzuki.poulose@....com>
> 
> Could you pick up patches 02 and 03 in this series?  Please note,
> patch 02 has the review tag from Suzuki, but I didn't receive the
> review tag for patch 03.
> 
> If anything need to follow up, just let me know.  Thanks!

I have picked up both the patches.

Thanks
Suzuki

> 
>> ---
>>   drivers/hwtracing/coresight/coresight-tmc-etr.c | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c
>> index acdb59e0e661..13fd1fc730ed 100644
>> --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c
>> +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c
>> @@ -1563,6 +1563,14 @@ tmc_update_etr_buffer(struct coresight_device *csdev,
>>   	 */
>>   	if (etr_perf->snapshot)
>>   		handle->head += size;
>> +
>> +	/*
>> +	 * Ensure that the AUX trace data is visible before the aux_head
>> +	 * is updated via perf_aux_output_end(), as expected by the
>> +	 * perf ring buffer.
>> +	 */
>> +	smp_wmb();
>> +
>>   out:
>>   	/*
>>   	 * Don't set the TRUNCATED flag in snapshot mode because 1) the
>> -- 
>> 2.25.1
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ