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:	Mon,  8 Jun 2009 10:39:44 -0700 (PDT)
From:	Roland McGrath <roland@...hat.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	David Howells <dhowells@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: Q: PTRACE_ATTACH && -EINTR

> Or even -ERESTARTNOINTR ? Or just mutex_lock() ?

-ERESTARTNOINTR is right.  

There is nothing wrong with making it interruptible, and that might help
something or other overall, or even be important to avoid a deadlock or
something in some strange situation.  But since the call could never return
-EINTR before, we can't make it start now.

> Or ignore this problem since nobody complained?

There has barely been time for anyone to do something strange enough to hit
it, and they would probably not have realized what was going on even if it
did hit.  We know we broke the ABI contract, we have to fix it.

Note that every use of mutex_lock_interruptible and also down_interruptible
can return -EINTR.  This means these really should never be used in the way
where their return value is returned directly from some system call.  Every
user-visible call that gets interrupted needs to return some -ERESTART*
code and never -EINTR directly.


Thanks,
Roland
--
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