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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 28 Aug 2013 17:54:24 +0000
From:	Christoph Lameter <cl@...ux.com>
To:	Chris Metcalf <cmetcalf@...era.com>
cc:	Tejun Heo <tj@...nel.org>, akpm@...uxfoundation.org,
	linux-arch@...r.kernel.org, Steven Rostedt <srostedt@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [guv v2 23/31] tile: Replace __get_cpu_var uses

On Wed, 28 Aug 2013, Chris Metcalf wrote:

> Taken into the tile tree, with one extra change; in
> arch/tile/kernel/messaging.c, using "__this_cpu_read(msg_state)"
> generated warnings ("'pscr_ret__.opaque[1u]' is used uninitialized in
> this function", etc), since msg_state is a struct, so I changed it to be
> "*__this_cpu_ptr(&msg_state)".  Interrupts are disabled here so
> preemption is not a concern.

Well yes. __this_cpu_read can only be used to read scalars. If you want to
transfer a struct then memcpy needs to be used (or the compiler can do
that for you like above).

> In addition, I applied the following commit to clean up the remaining
> uses that are currently only being carried in the linux-tile tree.

You are going to merge these changes right? I can drop the tile patch from
my series?


One small issue below:

> diff --git a/arch/tile/kernel/time.c b/arch/tile/kernel/time.c
> index a7a41a1..30c2c34 100644
> --- a/arch/tile/kernel/time.c
> +++ b/arch/tile/kernel/time.c
> @@ -286,7 +286,7 @@ static int _set_clock_rate_barrier;
>  static int _set_clock_rate(void *arg)
>  {
>         struct _set_clock_rate_args *args = arg;
> -       struct clock_event_device *evt = &__get_cpu_var(tile_timer);
> +       struct clock_event_device *evt = get_cpu_ptr(&tile_timer);
					^^^^ this_cpu_ptr


--
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