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: <20200923043907.GA5146@codeaurora.org>
Date:   Wed, 23 Sep 2020 12:39:07 +0800
From:   Tingwei Zhang <tingweiz@...eaurora.org>
To:     Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc:     Tingwei Zhang <tingwei@...eaurora.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...com>,
        tsoni@...eaurora.org,
        Sai Prakash Ranjan <saiprakash.ranjan@...eaurora.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Mao Jinlong <jinlmao@...eaurora.org>,
        linux-kernel@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 6/6] stm class: ftrace: use different channel
 accroding to CPU

On Fri, Sep 18, 2020 at 08:45:52PM +0800, Alexander Shishkin wrote:
> Tingwei Zhang <tingwei@...eaurora.org> writes:
> 
> > @@ -63,6 +65,7 @@ static int __init stm_ftrace_init(void)
> >  {
> >  	int ret;
> >  
> > +	stm_ftrace.data.nr_chans = num_possible_cpus();
> 
> Not a problem with this patch necesarily, but this made me realize that
> .nr_chans may be larger than:
> 
>  (1) what the policy permits,
>  (2) what the stm device can handle.
> 
> While (1) the user can fix in the policy, they won't be able to fix (2),
> in which case they won't be able to use stm_ftrace at all. I'm thinking
> if a link-time callback would be good enough.
>

Hi Alex,

I'm not sure if I understand this correct. If the nr_chans requested by
stm_ftrace is larger than policy permits or stm device can handle,
stm_assign_first_policy() returns with error so stm_source_link_add()
will fail. User would notice that when link happens.  There's not much
we can do if resource is not enough.
 
> Another thing is that .nr_chans needs to be a power of 2 at the moment.
> 
I'll change to below.
stm_ftrace.data.nr_chans = roundup_pow_of_two(num_possible_cpus());
> Regards,
> --
> Alex
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ