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:   Wed, 3 Jun 2020 15:52:53 +0300
From:   Alexey Budankov <alexey.budankov@...ux.intel.com>
To:     "Hunter, Adrian" <adrian.hunter@...el.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Andi Kleen <ak@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 01/13] tools/libperf: introduce notion of static polled
 file descriptors


On 03.06.2020 15:30, Hunter, Adrian wrote:
> 
> 
>> -----Original Message-----
>> From: Hunter, Adrian <adrian.hunter@...el.com>
>> Sent: Wednesday, June 3, 2020 3:24 PM
>> To: Alexey Budankov <alexey.budankov@...ux.intel.com>
>> Cc: Arnaldo Carvalho de Melo <acme@...nel.org>; Jiri Olsa
>> <jolsa@...hat.com>; Namhyung Kim <namhyung@...nel.org>; Alexander
>> Shishkin <alexander.shishkin@...ux.intel.com>; Peter Zijlstra
>> <peterz@...radead.org>; Ingo Molnar <mingo@...hat.com>; Andi Kleen
>> <ak@...ux.intel.com>; linux-kernel <linux-kernel@...r.kernel.org>
>> Subject: Re: [PATCH v6 01/13] tools/libperf: introduce notion of static polled
>> file descriptors
>>
>> On 3/06/20 3:01 pm, Alexey Budankov wrote:
>>> Hi,
>>>
>>> On 03.06.2020 14:38, Adrian Hunter wrote:
>>>> On 1/06/20 11:05 pm, Alexey Budankov wrote:
>>>>>
>>>>> Implement adding of file descriptors by fdarray__add_stat() to
>>>>> fix-sized (currently 1) stat_entries array located at struct fdarray.
>>>>> Append added file descriptors to the array used by poll() syscall
>>>>> during fdarray__poll() call. Copy poll() result of the added
>>>>> descriptors from the array back to the storage for separate analysis.
>>>>
>>>> Why not instead call evlist__add_pollfd() before other fds are added,
>>>> so the fda->entries[] position is always fixed. Then this patch is not
>> needed.
>>>
>>> It then will block event consumption loop, at least in record mode,
>>> due to change sin initial assumptions behind fdarray__filter(). So
>>> extension of the API with 'static' fds looks safer w.r.t. possible
>>> functional regressions at the same time extending the API with ability
>>> to atomically wait for (poll()) not only event fds but also any other fds
>> during monitoring.
>>
>> So make fdarray__filter() return the number of filterable fds remaining.
>>
> 
> 
> Or perhaps simpler, compare the return value to the number of fds that are known not to be filterable

Well, various implementations are for sure possible but the proposed design
avoids implicit code assumptions and dependency on API calls order as in API
implementation as in client code and that is why it's been proposed this way.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ