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: <CAG_fn=VmddBTURnLESOQHEWYzsiUJCph9mVKS6W84TPqm3DCyw@mail.gmail.com>
Date: Wed, 18 Jun 2025 16:23:45 +0200
From: Alexander Potapenko <glider@...gle.com>
To: Marco Elver <elver@...gle.com>
Cc: quic_jiangenj@...cinc.com, linux-kernel@...r.kernel.org, 
	kasan-dev@...glegroups.com, Aleksandr Nogikh <nogikh@...gle.com>, 
	Andrey Konovalov <andreyknvl@...il.com>, Borislav Petkov <bp@...en8.de>, 
	Dave Hansen <dave.hansen@...ux.intel.com>, Dmitry Vyukov <dvyukov@...gle.com>, 
	Ingo Molnar <mingo@...hat.com>, Josh Poimboeuf <jpoimboe@...nel.org>, 
	Peter Zijlstra <peterz@...radead.org>, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 1/7] kcov: apply clang-format to kcov code

> > +static inline void kcov_remote_start(u64 handle)
> > +{
> > +}
> > +static inline void kcov_remote_stop(void)
> > +{
> > +}
>
> This excessive-new-line style is not an improvement over previously.
> But nothing we can do about I guess...

I think we'd better stick with whatever clang-format gives us.



> > @@ -728,13 +730,15 @@ static long kcov_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
> >                 spin_unlock_irqrestore(&kcov->lock, flags);
> >                 return 0;
> >         case KCOV_REMOTE_ENABLE:
> > -               if (get_user(remote_num_handles, (unsigned __user *)(arg +
> > -                               offsetof(struct kcov_remote_arg, num_handles))))
> > +               if (get_user(remote_num_handles,
> > +                            (unsigned __user *)(arg +
> > +                                                offsetof(struct kcov_remote_arg,
> > +                                                         num_handles))))
>
> Ouch. Maybe move the address calculation before and assign to
> temporary to avoid this mess?
I factored out offsetof(), because the address calculation looked all
the same after formatting.

> >         for_each_possible_cpu(cpu) {
> >                 void *area = vmalloc_node(CONFIG_KCOV_IRQ_AREA_SIZE *
> > -                               sizeof(unsigned long), cpu_to_node(cpu));
> > +                                                 sizeof(unsigned long),
> > +                                         cpu_to_node(cpu));
>
> Ouch.

Someday we'll probably switch clang-format to 100 columns

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ