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: <20250121172202.GB416913@e132581.arm.com>
Date: Tue, 21 Jan 2025 17:22:02 +0000
From: Leo Yan <leo.yan@....com>
To: "mark.barnett@....com" <mark.barnett@....com>
Cc: peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
	namhyung@...nel.org, irogers@...gle.com, ben.gainey@....com,
	deepak.surti@....com, ak@...ux.intel.com, will@...nel.org,
	james.clark@....com, mark.rutland@....com,
	alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
	adrian.hunter@...el.com, linux-perf-users@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 5/5] perf: Record sample last_period before updating

On Mon, Jan 06, 2025 at 12:01:56PM +0000, mark.barnett@....com wrote:
> From: Mark Barnett <mark.barnett@....com>
> 
> This change alters the PowerPC and x86 driver implementations to record
> the last sample period before the event is updated for the next period.
> 
> A common pattern in PMU driver implementations is to have a
> "*_event_set_period" function which takes care of updating the various
> period-related fields in a perf_event structure. In most cases, the
> drivers choose to call this function after initializing a sample data
> structure with perf_sample_data_init. The x86 and PowerPC drivers
> deviate from this, choosing to update the period before initializing the
> sample data. When using an event with an alternate sample period, this
> causes an incorrect period to be written to the sample data that gets
> reported to userspace.

I found conflict when I applied this patch on linux-next [1], with the
commit below:

commit faac6f105ef169e2e5678c14e1ffebf2a7d780b6
Author: Yabin Cui <yabinc@...gle.com>
Date:   Wed May 15 12:36:09 2024 -0700

    perf/core: Check sample_type in perf_sample_save_brstack

    Check sample_type in perf_sample_save_brstack() to prevent
    saving branch stack data when it isn't required.

    Suggested-by: Namhyung Kim <namhyung@...nel.org>
    Signed-off-by: Yabin Cui <yabinc@...gle.com>
    Signed-off-by: Ingo Molnar <mingo@...nel.org>
    Reviewed-by: Ian Rogers <irogers@...gle.com>
    Acked-by: Namhyung Kim <namhyung@...nel.org>
    Link: https://lore.kernel.org/r/20240515193610.2350456-4-yabinc@google.com


Please consider to rebase the patch to fix conflict in next spin.

Thanks,
Leo

[1] git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ