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:	Tue, 9 Sep 2014 03:02:25 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Ley Foon Tan <lftan@...era.com>
Cc:	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org, lftan.linux@...il.com,
	cltang@...esourcery.com
Subject: Re: [PATCH v3 00/29] nios2 Linux kernel port

On Mon, Sep 08, 2014 at 05:22:11PM +0800, Ley Foon Tan wrote:
> This is the 3rd version of patchset adds the Linux kernel port for Nios II processor from
> Altera. All of the feedback from v2 patchseries has been addressed. Thanks to all who
> provided feedback on the previous version.

a) signal caught in rt_sigreturn() (e.g. from change of the set of blocked
signals) should *NOT* trigger syscall restart.  IOW, wrt syscall restart
logics, rt_sigreturn() acts as exception, not as a syscall.  You are
setting ->orig_r2 to -1, but that doesn't affect your syscall restart
logics.

As the matter of fact, your 'in_syscall' argument is bogus - it's always
1.  For return from interrupt as well as that from syscall.  And syscall
restart logics _really_ shouldn't apply to return from interrupts - it's
not only wrong, but very hard to debug.

b) multiple pending signals should be all handled before return to
userland.  Only the first one might have syscall restart logics triggered.
The effect should be identical to what you'd get if e.g. a timer interrupt
had hit just as you were returning to userland (possibly into handler)
after handling the first one, etc.  At the absolute least, SIGSEGV from
failing attempt to build a sigframe should be handled before returning
to userland.

c) rt_sigreturn() should reset ->restart_block.fn to do_no_restart_syscall

d) what's
+       regs->estatus = (regs->estatus & 0xffffffff);
in rt_restore_ucontext() about?

e) restart in handlerless case is better off without leaving the kernel
mode.  See what e.g. arm and s390 are doing.
--
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