Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 4 Feb 2020 09:31:36 -0500
From: Rich Felker <dalias@...c.org>
To: Mark Corbin <mark@...sco.co.uk>
Cc: musl@...ts.openwall.com
Subject: [PATCH] move riscv64 register index constants to signal.h

On Tue, Feb 04, 2020 at 09:26:31AM -0500, Rich Felker wrote:
> > > > I guess that it would probably be best to change the libsigsegv code to
> > > > use a value of '2' instead of the REG_SP definition. I'll look at
> > > > submitting a patch to the project.
> > > 
> > > I think using a symbolic name is both more informative and more
> > > portable (since the layout of the saved registers is an OS choice,
> > > nothing universal to the architecture). The question is just where the
> > > macro should be obtained from. As long as glibc (and any other
> > > platforms that might be relevant?) has a sys/reg.h, it wouldn't hurt
> > > to just add the include and continue using the macro, regardless of
> > > whether musl moves it later.
> > 
> > Glibc and uClibc don't have a sys/reg.h - is there a way that it could be 
> > included conditionally for musl only?
> 
> If you want a configure test to detect it the yes; otherwise no. But
> this suggests the way we did it is wrong. We should not be making this
> kind of mess. I should probably just move the definitions...

Patch attached. Any objections?

Rich

View attachment "0001-move-riscv64-register-index-constants-to-signal.h.patch" of type "text/plain" (1419 bytes)

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.