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: <e4200636-90b1-419f-a4c7-61766eac3b9a@linux.intel.com>
Date: Wed, 20 Mar 2024 13:12:31 -0400
From: "Liang, Kan" <kan.liang@...ux.intel.com>
To: Raghavendra Rao Ananta <rananta@...gle.com>,
 Xiong Zhang <xiong.y.zhang@...ux.intel.com>
Cc: seanjc@...gle.com, pbonzini@...hat.com, peterz@...radead.org,
 mizhang@...gle.com, kan.liang@...el.com, zhenyuw@...ux.intel.com,
 dapeng1.mi@...ux.intel.com, jmattson@...gle.com, kvm@...r.kernel.org,
 linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
 zhiyuan.lv@...el.com, eranian@...gle.com, irogers@...gle.com,
 samantha.alt@...el.com, like.xu.linux@...il.com, chao.gao@...el.com
Subject: Re: [RFC PATCH 02/41] perf: Support guest enter/exit interfaces



On 2024-03-20 12:40 p.m., Raghavendra Rao Ananta wrote:
> Hi Kan,
> 
>>
>> +static void __perf_force_exclude_guest_pmu(struct perf_event_pmu_context *pmu_ctx,
>> +                                          struct perf_event *event)
>> +{
>> +       struct perf_event_context *ctx = pmu_ctx->ctx;
>> +       struct perf_event *sibling;
>> +       bool include_guest = false;
>> +
>> +       event_sched_out(event, ctx);
>> +       if (!event->attr.exclude_guest)
>> +               include_guest = true;
>> +       for_each_sibling_event(sibling, event) {
>> +               event_sched_out(sibling, ctx);
>> +               if (!sibling->attr.exclude_guest)
>> +                       include_guest = true;
>> +       }
>> +       if (include_guest) {
>> +               perf_event_set_state(event, PERF_EVENT_STATE_ERROR);
>> +               for_each_sibling_event(sibling, event)
>> +                       perf_event_set_state(event, PERF_EVENT_STATE_ERROR);
>> +       }
> Does the perf core revert the PERF_EVENT_STATE_ERROR state somewhere
> from the perf_guest_exit() path, or is it expected to remain in this
> state?
> IIUC, in the perf_guest_exit() path, when we land into
> merge_sched_in(), we never schedule the event back if event->state <=
> PERF_EVENT_STATE_OFF.
> 

The perf doesn't revert event with the ERROR STATE. A user asks to
profile both guest and host, but the pass-through mode doesn't allow the
profiling of the guest. So it has to error out and remain the ERROR STATE.

Thanks,
Kan


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ