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  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:	Mon, 19 Oct 2009 21:30:58 +0200
From:	Sebastian Andrzej Siewior <>
To:	Roland McGrath <>
Cc:	Ingo Molnar <>, Oleg Nesterov <>,
	"H. Peter Anvin" <>,
	Thomas Gleixner <>,,
	Haavard Skinnemoen <>
Subject: Re: [PATCH] consider stack access while checking for alternate
 signal stack

* Roland McGrath | 2009-10-19 11:08:10 [-0700]:

>AFAICT all you want is the following, and I'm not sure it requires all that
>much explanation.  I've probably missed some subtlety.

>--- a/include/linux/sched.h
>+++ b/include/linux/sched.h
>@@ -2090,7 +2090,13 @@ static inline int is_si_special(const struct siginfo *info)
> static inline int on_sig_stack(unsigned long sp)
> {
>-	return (sp - current->sas_ss_sp < current->sas_ss_size);
>+	return sp >= current->sas_ss_sp &&
>+		sp - current->sas_ss_sp < current->sas_ss_size;

CONFIG_STACK_GROWSUP is wrong: If your stack grows up and sp ==
sas_ss_sp + size than you are using the last entry in your sig stack
which will be not recognized correctly. The case where sp == sas_ss_sp
is also not detected correctly but this should not happen in real life.

>+	return sp > current->sas_ss_sp &&
>+		sp - current->sas_ss_sp <= current->sas_ss_size;
That is the PRE case which is the only relevant since we don't have any
POST architectures. The check here produces the same results as my
variant so it is okay :)
So you prefer the smaller patch with comments around it?
> }

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists