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] [day] [month] [year] [list]
Message-ID: <895953fd-d462-2696-0ab3-72a069ba5a75@windriver.com>
Date:   Thu, 3 Jun 2021 18:29:16 +0800
From:   "Xu, Yanfei" <yanfei.xu@...driver.com>
To:     Will Deacon <will@...nel.org>
Cc:     Daniel Borkmann <daniel@...earbox.net>, ast@...nel.org,
        zlim.lnx@...il.com, catalin.marinas@....com, andrii@...nel.org,
        kafai@...com, songliubraving@...com, yhs@...com,
        john.fastabend@...il.com, kpsingh@...nel.org,
        netdev@...r.kernel.org, bpf@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] bpf: avoid unnecessary IPI in bpf_flush_icache



On 6/3/21 1:26 AM, Will Deacon wrote:
> [Please note: This e-mail is from an EXTERNAL e-mail address]
> 
> On Wed, Jun 02, 2021 at 07:26:03PM +0800, Xu, Yanfei wrote:
>>
>>
>> On 6/2/21 1:41 AM, Will Deacon wrote:
>>> [Please note: This e-mail is from an EXTERNAL e-mail address]
>>>
>>> On Tue, Jun 01, 2021 at 07:20:04PM +0200, Daniel Borkmann wrote:
>>>> On 6/1/21 5:06 PM, Yanfei Xu wrote:
>>>>> It's no need to trigger IPI for keeping pipeline fresh in bpf case.
>>>>
>>>> This needs a more concrete explanation/analysis on "why it is safe" to do so
>>>> rather than just saying that it is not needed.
>>>
>>> Agreed. You need to show how the executing thread ends up going through a
>>> context synchronizing operation before jumping to the generated code if
>>> the IPI here is removed.
>>
>> This patch came out with I looked through ftrace codes. Ftrace modify
>> the text code and don't send IPI in aarch64_insn_patch_text_nosync(). I
>> mistakenly thought the bpf is same with ftrace.
>>
>> But now I'm still not sure why the ftrace don't need the IPI to go
>> through context synchronizing, maybe the worst situation is omit a
>> tracing event?
> 
> I think ftrace handles this itself via ftrace_sync_ipi, no?

Ah, Yes! I missed this...

Anyway, thanks for your reminding and very sorry for my noise.

Regards,
Yanfei

> 
> Will
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ