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]
Date:	Fri, 17 Jan 2014 16:13:21 +0100
From:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:	Nicholas Mc Guire <der.herr@...r.at>
CC:	linux-rt-users@...r.kernel.org,
	Sami Pietikainen <Sami.Pietikainen@...ice.com>,
	Jouko Haapaluoma <jouko.haapaluoma@...ice.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH RT] add missing local serialization in ip_output.c

On 01/17/2014 03:59 PM, Nicholas Mc Guire wrote:
> On Fri, 17 Jan 2014, Sebastian Andrzej Siewior wrote:
> 
>> This is what I am going to apply. It also dropped the get_cpu_light()
>> call which was added in a patch to remove the get_cpu_var() and is now
>> no longer required since we have the get_locked_var() thingy now.
>>
> 
> I do not think you can drop that - what is preventing migration now ?

Nothing but I do not see the need for it.

> 
> #define get_locked_var(lvar, var)                                       \
>         (*({                                                            \
>                 local_lock(lvar);                                       \
>                 &__get_cpu_var(var);                                    \
>         }))
> 
> No migrate_disable here - so how is this protected against migration ?

It does not. If you get here on CPU0, you the variable from CPU0. If
you get migrated to CPU1 you still use the variable from CPU0. If
another task is active on CPU0 then it will be blocked until the other
now running on CPU1 completes and releases the lock.

> Note that I did send out mail on this because I believe get_locked_var
> should actually be doing a a migrate_disable/enable but got no feedback on that
> yet.

I don't see a reason why you should not leave the CPU on which you got
access to the variable as long as you do not do any further assumption
regarding the CPU number. I don't see that this happens here.

> So for now I think you need to retain the get_cpu_light/put_cpu_light

Are you still sure?

>    
> thx!
> hofrat

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ