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:   Tue, 21 Mar 2017 19:03:19 -0700
From:   Eric Dumazet <>
To:     Kees Cook <>
Cc:     Peter Zijlstra <>,
        Herbert Xu <>,
        David Miller <>,
        "Reshetova, Elena" <>,
        Network Development <>,,
        LKML <>,
        Alexey Kuznetsov <>,
        James Morris <>,
        Patrick McHardy <>,
        Stephen Hemminger <>,
        Hans Liljestrand <>,
        David Windsor <>,
        Andrew Morton <>
Subject: Re: [PATCH 07/17] net: convert sock.sk_refcnt from atomic_t to

On Tue, 2017-03-21 at 16:51 -0700, Kees Cook wrote:

> Am I understanding you correctly that you'd want something like:
> refcount.h:
> #define refcount_inc(x)   atomic_inc(x)
> ...
> #else
> void refcount_inc(...
> ...
> #endif
> some/net.c:
> #include <refcount.h>
> or similar?

At first, it could be something simple like that yes.

Note that we might define two refcount_inc()  : One that does whole
tests, and refcount_inc_relaxed() that might translate to atomic_inc()
on non debug kernels.

Then later, maybe provide a dynamic infrastructure so that we can
dynamically force the full checks even for refcount_inc_relaxed() on say
1% of the hosts, to get better debug coverage ?

Powered by blists - more mailing lists