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: <YE+op0MZKG41EALi@blackbook>
Date:   Mon, 15 Mar 2021 19:34:15 +0100
From:   Michal Koutný <mkoutny@...e.com>
To:     Vipin Sharma <vipinsh@...gle.com>
Cc:     tj@...nel.org, rdunlap@...radead.org, thomas.lendacky@....com,
        brijesh.singh@....com, jon.grimm@....com, eric.vantassell@....com,
        pbonzini@...hat.com, hannes@...xchg.org, frankja@...ux.ibm.com,
        borntraeger@...ibm.com, corbet@....net, seanjc@...gle.com,
        vkuznets@...hat.com, wanpengli@...cent.com, jmattson@...gle.com,
        joro@...tes.org, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, hpa@...or.com, gingell@...gle.com,
        rientjes@...gle.com, dionnaglaze@...gle.com, kvm@...r.kernel.org,
        x86@...nel.org, cgroups@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [Patch v3 1/2] cgroup: sev: Add misc cgroup controller

On Fri, Mar 12, 2021 at 11:07:14AM -0800, Vipin Sharma <vipinsh@...gle.com> wrote:
> We should be fine without atomic64_t because we are using unsigned
> long and not 64 bit explicitly. This will work on both 32 and 64 bit
> machines.
I see.

> But I will add READ_ONCE and WRITE_ONCE because of potential chances of
> load tearing and store tearing.
> 
> Do you agree?
Yes.

> This was only here to avoid multiple reads of capacity and making sure
> if condition and seq_print will see the same value.
Aha.

> Also, I was not aware of load and store tearing of properly aligned
> and machine word size variables. I will add READ_ONCE and WRITE_ONCE
> at other places.
Yeah, although it's theoretical, I think it also serves well to annotate
such unsychronized accesses.

Thanks,
Michal

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ