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, 7 Feb 2024 09:13:51 -0800
From: Doug Anderson <dianders@...omium.org>
To: Bitao Hu <yaoma@...ux.alibaba.com>
Cc: akpm@...ux-foundation.org, pmladek@...e.com, kernelfans@...il.com, 
	liusong@...ux.alibaba.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv5 1/3] watchdog/softlockup: low-overhead detection of interrupt

Hi,

On Tue, Feb 6, 2024 at 10:18 PM Bitao Hu <yaoma@...ux.alibaba.com> wrote:
>
> >> +static void print_cpustat(void)
> >> +{
> >> +       int i, group;
> >> +       u8 tail = __this_cpu_read(cpustat_tail);
> >
> > Sorry for not noticing before, but why are you using
> > "__this_cpu_read()" instead of "this_cpu_read()"? In other words, why
> > do you need the double-underscore version everywhere? I don't think
> > you do, do you?
> I also struggled with which version of the operation to use. The one
> without double-underscores provides preemption/interrupt protection,
> but in watchdog.c, the version with double-underscores is used. I
> analyzed that it is also safe to use the version without
> preemption/interrupt protection in my code, so to maintain consistency
> with watchdog.c, I ues the version with double-underscores.
>
> Is my approach reasonable? If not, I will switch to using the
> non-underscored version.

Ah, OK. I hadn't followed the macros all the way through to the
arch-specific defines and I didn't see the preemption disable. OK,
what you have seems fine to me, especially since the double-underscore
version still has double-checks that preemption is disabled. Thanks
for explaining!

-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ