[PATCH v1] changing mmap flags and memfd_create flags to print abbreviated values under -Xraw

shankarapailoor shankarapailoor at gmail.com
Sun Dec 9 17:18:29 UTC 2018


Hi Dmitry,

I am a little confused. For example, under -Xraw couldn't we just
print the  values in the array shown here:
https://github.com/strace/strace/blob/master/signal.c#L266 (after the
umoven) and then only under -Xabbrev or -Xverbose would we execute
sprintsigmask_n? There are other places we might need to change. Any
clarification would be appreciated.

Regards,
Shankara
On Tue, Nov 27, 2018 at 6:50 PM shankarapailoor
<shankarapailoor at gmail.com> wrote:
>
> Hi Dmitry,
>
> I believe the following are the functions/macros that need to be
> replaced with just the raw values:  htons, htonl, inet_addr, makedev,
> if_nametoindex, inet_pton, kernel_version, QCMD.
>
> I'm not sure if I will be able to do all of them so are there some
> which you would be willing to convert? I know you are quite busy so no
> worries if not.
>
> Regards,
> Shankara
> On Tue, Nov 27, 2018 at 5:38 PM Dmitry V. Levin <ldv at altlinux.org> wrote:
> >
> > On Mon, Nov 26, 2018 at 09:50:03PM -0600, shankarapailoor wrote:
> > > >However, other signals are still printed in traditional symbolic form
> > > despite of -X raw and -X verbose settings, this has to be fixed.
> > > The same could be said about signal masks.  I'm not sure what's the best
> > > raw representation for signal masks, maybe it's an array of hex bytes.
> > >
> > > Seems reasonable to me. Looking at
> > > https://elixir.bootlin.com/linux/latest/source/include/uapi/asm-generic/signal.h#L91
> > > it seems that the mask is just an array of unsigned longs so that
> > > would probably be best.
> >
> > This is somewhat complicated by the fact that strace still supports
> > architectures with legacy syscalls that operate with 32-bit signal masks,
> > e.g. i386 personality on x86_64.  You can have a look at
> > signal.c:sprintsigmask_n() and its users to get an idea.
> >
> > > >Maybe print sin_addr as %#x?
> > >
> > > Yeah I think so
> > >
> > > >What do you think is the appropriate raw representation for IPv6 addresses?
> > >
> > > Good question. Maybe a 16 byte hex string or an array of hex values of
> > > length 16?
> >
> > IPv6 address is not really a string, so I'd rather go for an array of hex bytes.
> >
> >
> > --
> > ldv
> > --
> > Strace-devel mailing list
> > Strace-devel at lists.strace.io
> > https://lists.strace.io/mailman/listinfo/strace-devel
>
>
>
> --
> Regards,
> Shankara Pailoor



-- 
Regards,
Shankara Pailoor


More information about the Strace-devel mailing list