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]
Message-ID: <54FDD041.3080500@codesourcery.com>
Date:	Tue, 10 Mar 2015 00:54:25 +0800
From:	Chung-Lin Tang <cltang@...esourcery.com>
To:	Ezequiel Garcia <ezequiel@...guardiasur.com.ar>,
	Arnd Bergmann <arnd@...db.de>,
	Tobias Klauser <tklauser@...tanz.ch>,
	Ley Foon Tan <lftan@...era.com>
CC:	Walter Goossens <waltergoossens@...e.nl>,
	<linux-arch@...r.kernel.org>,
	"nios2-dev@...ts.rocketboards.org" <nios2-dev@...ts.rocketboards.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: nios2: is the ptrace ABI correct?

On 2015/2/27 07:19 PM, Ezequiel Garcia wrote:
> Right now, my biggest problem is how to remove the pt_regs from being
> exported to userspace, without breaking things. The struct is defined
> and used in a few UAPI headers:
> 
> arch/nios2/include/uapi/asm/ptrace.h
> arch/nios2/include/uapi/asm/sigcontext.h
> arch/nios2/include/uapi/asm/elf.h
> 
> For ucontext, we would need to remove
> arch/nios2/include/uapi/asm/sigcontext.h and avoid using
> asm-generic/ucontext.h.
> 
> For ptrace, we could move pt_regs from the UAPI header to some internal
> header. That way userspace is not exposed the wrong struct.
> 
> For the elf coredump, I have no idea yet :)

It appears that some of the ways nios2 has organized the
ucontext/pt_regs/etc. are remnants of the pre-generic code, some
basically because the port was based off m68k.

I've re-organized the headers a bit: nios2/include/asm/ucontext.h is
deleted, and re-definition of struct sigcontext now allows use of
uapi/asm-generic/ucontext.h directly.  Note that the reorg, despite
effectively renaming some fields, is still binary compatible. I'll
probably update the corresponding glibc definitions later.

struct pt_regs is now not exported, and all exported register sets are
now supposed to follow the 49 register set defined as in GDB now.

Tobias, Ley Foon, how do you think this looks?

Thanks,
Chung-Lin


View attachment "x.diff" of type "text/plain" (6249 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ