[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f2b3ae49-bc41-0061-e811-1a7e41040366@linuxfoundation.org>
Date: Thu, 12 Nov 2020 14:27:49 -0700
From: Shuah Khan <skhan@...uxfoundation.org>
To: Kees Cook <keescook@...omium.org>,
Greg KH <gregkh@...uxfoundation.org>
Cc: corbet@....net, peterz@...radead.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH 01/13] seqnum_ops: Introduce Sequence Number Ops
On 11/11/20 12:23 PM, Shuah Khan wrote:
> On 11/10/20 5:18 PM, Kees Cook wrote:
>> On Tue, Nov 10, 2020 at 09:43:02PM +0100, Greg KH wrote:
>>> On Tue, Nov 10, 2020 at 09:41:40PM +0100, Greg KH wrote:
>>>> On Tue, Nov 10, 2020 at 12:53:27PM -0700, Shuah Khan wrote:
>>>>> +Decrement interface
>>>>> +-------------------
>>>>> +
>>>>> +Decrements sequence number and doesn't return the new value. ::
>>>>> +
>>>>> + seqnum32_dec() --> atomic_dec()
>>>>> + seqnum64_dec() --> atomic64_dec()
>>>>
>>>> Why would you need to decrement a sequence number? Shouldn't they just
>>>> always go up?
>>>>
>>>> I see you use them in your patch 12/13, but I don't think that
>>>> really is
>>>> a sequence number there, but rather just some other odd value :)
>>
>> To that end, they should likely be internally cast to u32 and u64 (and
>> why is seqnum64 ifdef on CONFIG_64BIT?).
>>
>
atomic64_t depends on CONFIG_64BIT
include/linux/types.h
#ifdef CONFIG_64BIT
typedef struct {
s64 counter;
} atomic64_t;
#endif
thanks,
-- Shuah
Powered by blists - more mailing lists