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:	Thu, 19 Jul 2007 17:46:48 +0530
From:	"Satyam Sharma" <satyam.sharma@...il.com>
To:	"Andi Kleen" <ak@...e.de>
Cc:	patches@...-64.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [19/58] x86_64: Don't use softirq save locks in smp_call_function

On 7/19/07, Andi Kleen <ak@...e.de> wrote:
>
> It is not fully softirq safe anyways.

Ack

[ sorry, I remember having promised to send such a patch myself
some time ago, but just forgot about it ... ]

> Can't do a WARN_ON unfortunately because it could trigger in the
> panic case.

But this is not true at all. This function doesn't come anywhere
on the panic codepath.

> +++ linux/arch/x86_64/kernel/smp.c
> @@ -386,9 +386,9 @@ int smp_call_function_single (int cpu, v
>                 return 0;
>         }

So I'd say we do need a:

WARN_ON(irqs_disabled() || in_interrupt());

or something right about here ...

> -       spin_lock_bh(&call_lock);
> +       spin_lock(&call_lock);
>         __smp_call_function_single(cpu, func, info, nonatomic, wait);
> -       spin_unlock_bh(&call_lock);
> +       spin_unlock(&call_lock);
>         put_cpu();
>         return 0;
>  }

And oh, by the way, you can safely go ahead and put that warning
in smp_call_function() *also*.

Note that panic() -> smp_send_stop() -> calls into the lower-level
__smp_call_function() directly.

So neither smp_call_function() nor smp_call_function_single() come
in the panic codepath -- the warnings there would be okay.

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