Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Feb 2021 17:57:40 +0100
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org,  dev-commits-src-branches@freebsd.org
Subject:   Re: git: e92ab3adf4f9 - stable/13 - atomic: make atomic_store_ptr type-aware
Message-ID:  <CAGudoHFWJ9RT3BKKC6_tQcFR8f4%2B0j2EdsZmuSBk2z9DrQPq%2BA@mail.gmail.com>
In-Reply-To: <c8bd7ad4-0fa7-b75d-c2e2-84cd0930257b@FreeBSD.org>
References:  <202102011240.111CehGE094845@gitrepo.freebsd.org> <c8bd7ad4-0fa7-b75d-c2e2-84cd0930257b@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I thought I responded to this bit, I did not address the (in my
opinion incorrect) claim that a fence can't be avoided rendering
consume primitive pointless. I have a somewhat reply for this.

but tl;dr yes, I'll add validation for pointer types

A bug was reported in the namecache which I want to take care of
before I do other stuff.

On 2/2/21, John Baldwin <jhb@freebsd.org> wrote:
> On 2/1/21 4:40 AM, Mateusz Guzik wrote:
>> The branch stable/13 has been updated by mjg:
>>
>> URL:
>> https://cgit.FreeBSD.org/src/commit/?id=e92ab3adf4f9848933439c9c2fca36df290c0884
>>
>> commit e92ab3adf4f9848933439c9c2fca36df290c0884
>> Author:     Mateusz Guzik <mjg@FreeBSD.org>
>> AuthorDate: 2021-01-25 19:39:14 +0000
>> Commit:     Mateusz Guzik <mjg@FreeBSD.org>
>> CommitDate: 2021-02-01 12:39:16 +0000
>>
>>      atomic: make atomic_store_ptr type-aware
>>
>>      (cherry picked from commit cc96f92a570e05636a20fdd15d4616b127bb9ecc)
>
> A couple of folks expressed concerns about this commit when it landed
> in main due to it being too flexible (it allows you to store pointers
> to non-pointer types, e.g.:
>
>    char c;
>    uintptr_t p;
>
>    atomic_store_ptr(&c, p);
>
> Silently becomes:
>
>    atomic_store_char(&c, (char)p);
>
> Are you planning to address this?
>
> --
> John Baldwin
>


-- 
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHFWJ9RT3BKKC6_tQcFR8f4%2B0j2EdsZmuSBk2z9DrQPq%2BA>