Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1674656
| From | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/1] futex: remove duplicated code and fix UB |
| Date | 2017-06-26 14:10 +0200 |
| Message-ID | <tWB05-2bS-3@gated-at.bofh.it> (permalink) |
| References | <tUMsF-5CH-15@gated-at.bofh.it> <tVrFw-7Pz-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/23/2017, 09:51 AM, Thomas Gleixner wrote:
> On Wed, 21 Jun 2017, Jiri Slaby wrote:
>> diff --git a/arch/arm64/include/asm/futex.h b/arch/arm64/include/asm/futex.h
>> index f32b42e8725d..5bb2fd4674e7 100644
>> --- a/arch/arm64/include/asm/futex.h
>> +++ b/arch/arm64/include/asm/futex.h
>> @@ -48,20 +48,10 @@ do { \
>> } while (0)
>>
>> static inline int
>> -futex_atomic_op_inuser(unsigned int encoded_op, u32 __user *uaddr)
>
> That unsigned int seems to be a change from the arm64 tree in next. It's
> not upstream and it'll cause a (easy to resolve) conflict.
Ugh, I thought the arm64 is in upstream already. Note that this patch
just takes what is in this arm64 fix and makes it effective for all
architectures. So I will wait with v2 until it merges upstream.
So, Will, will you incorporate Thomas' comments into your arm64 fix?
...
> Yes, we probably can't change that anymore, but at least we should make it
> very explicit and add a comment to that effect.
Something like this or do you want a comment yet?
unsigned int op = (encoded_op & 0x70000000) >> 28;
unsigned int cmp = (encoded_op & 0x0f000000) >> 24;
int oparg = sign_extend32((encoded_op & 0x00fff000) >> 12, 12);
int cmparg = sign_extend32(encoded_op & 0x00000fff, 12);
thanks,
--
js
suse labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/1] futex: remove duplicated code and fix UB Jiri Slaby <jslaby@suse.cz> - 2017-06-21 14:00 +0200
Re: [PATCH 1/1] futex: remove duplicated code and fix UB Darren Hart <dvhart@infradead.org> - 2017-06-22 06:00 +0200
Re: [PATCH 1/1] futex: remove duplicated code and fix UB Thomas Gleixner <tglx@linutronix.de> - 2017-06-23 10:00 +0200
Re: [PATCH 1/1] futex: remove duplicated code and fix UB Will Deacon <will.deacon@arm.com> - 2017-06-26 14:10 +0200
Re: [PATCH 1/1] futex: remove duplicated code and fix UB Jiri Slaby <jslaby@suse.cz> - 2017-06-26 14:10 +0200
Re: [PATCH 1/1] futex: remove duplicated code and fix UB Thomas Gleixner <tglx@linutronix.de> - 2017-07-03 12:30 +0200
csiph-web