2014-04-01 19:05:55

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [GIT PULL] x86 LTO changes for v3.15

On 03/31/2014 05:33 PM, Linus Torvalds wrote:
>
> I notice that there seems to be a handful of x86 system calls that
> don't use the SYSCALL_DEFINEx() macros to define the system call, some
> grepping finds at least ioperm(), modify_ldt(), sigreturn() and
> rt_sigreturn(). There are probably others. They should just be
> converted to SYSCALL_DEFINEx() while at it. No, x86 doesn't need the
> typecasting, but it won't hurt either, and it's good to be consistent.
>
> I'm not sure why those system calls didn't get converted (other
> x86-specific ones like vm86() _have_ gotten converted), maybe there's
> some reason for it. But I *think* the reason is "nobody noticed".
>

Pretty much. If nothing else, it breaks tracing.

-hpa


2014-04-01 19:15:11

by Linus Torvalds

[permalink] [raw]
Subject: Re: [GIT PULL] x86 LTO changes for v3.15

On Tue, Apr 1, 2014 at 11:54 AM, H. Peter Anvin <[email protected]> wrote:
>
> Pretty much. If nothing else, it breaks tracing.

Good point. And those [rt_]sigreturn() system calls might actually be
something you want to see in traces.

Although clearly nobody has noticed the lack so far, so nobody must
have cared all _that_ deeply about them so far ;)

Linus

2014-04-01 20:35:21

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [GIT PULL] x86 LTO changes for v3.15

Should be an easy fix through.

On April 1, 2014 12:15:05 PM PDT, Linus Torvalds <[email protected]> wrote:
>On Tue, Apr 1, 2014 at 11:54 AM, H. Peter Anvin <[email protected]>
>wrote:
>>
>> Pretty much. If nothing else, it breaks tracing.
>
>Good point. And those [rt_]sigreturn() system calls might actually be
>something you want to see in traces.
>
>Although clearly nobody has noticed the lack so far, so nobody must
>have cared all _that_ deeply about them so far ;)
>
> Linus

--
Sent from my mobile phone. Please pardon brevity and lack of formatting.

2014-04-02 00:01:54

by Steven Rostedt

[permalink] [raw]
Subject: Re: [GIT PULL] x86 LTO changes for v3.15

On Tue, 01 Apr 2014 11:54:23 -0700
"H. Peter Anvin" <[email protected]> wrote:

> On 03/31/2014 05:33 PM, Linus Torvalds wrote:
> >
> > I notice that there seems to be a handful of x86 system calls that
> > don't use the SYSCALL_DEFINEx() macros to define the system call, some
> > grepping finds at least ioperm(), modify_ldt(), sigreturn() and
> > rt_sigreturn(). There are probably others. They should just be
> > converted to SYSCALL_DEFINEx() while at it. No, x86 doesn't need the
> > typecasting, but it won't hurt either, and it's good to be consistent.
> >
> > I'm not sure why those system calls didn't get converted (other
> > x86-specific ones like vm86() _have_ gotten converted), maybe there's
> > some reason for it. But I *think* the reason is "nobody noticed".
> >
>
> Pretty much. If nothing else, it breaks tracing.

Why would they break tracing? I remember there was a issue with compat
calls, are these related to that?

-- Steve

2014-04-02 00:35:09

by Linus Torvalds

[permalink] [raw]
Subject: Re: [GIT PULL] x86 LTO changes for v3.15

On Tue, Apr 1, 2014 at 5:01 PM, Steven Rostedt <[email protected]> wrote:
>
> Why would they break tracing? I remember there was a issue with compat
> calls, are these related to that?

They "break" tracing by being invisible to syscall tracing. As you
really should know ;)

The syscall tracing feature depends on the wrappers that
SYSCALL_DEFINEx() creates. See the SYSCALL_TRACE_ENTER_EVENT() etc
crud in <linux/syscalls.h>

So there's no SYSCALL_METADATA for those system calls that weren't
created with the proper SYSCALL_DEFINE() wrappers.

Linus

2014-04-02 12:33:31

by Steven Rostedt

[permalink] [raw]
Subject: Re: [GIT PULL] x86 LTO changes for v3.15

On Tue, 1 Apr 2014 17:35:05 -0700
Linus Torvalds <[email protected]> wrote:

> On Tue, Apr 1, 2014 at 5:01 PM, Steven Rostedt <[email protected]> wrote:
> >
> > Why would they break tracing? I remember there was a issue with compat
> > calls, are these related to that?
>
> They "break" tracing by being invisible to syscall tracing. As you
> really should know ;)
>
> The syscall tracing feature depends on the wrappers that
> SYSCALL_DEFINEx() creates. See the SYSCALL_TRACE_ENTER_EVENT() etc
> crud in <linux/syscalls.h>
>
> So there's no SYSCALL_METADATA for those system calls that weren't
> created with the proper SYSCALL_DEFINE() wrappers.
>

Heh, I know that not having the SYSCALL_DEFINEx() wrappers means that
they wont be traced. I must have misunderstood Peter, as I thought he
meant if we added SYSCALL_DEFINEx(), that they would break tracing.

IIRC, the compat calls had some issues with the SYSCALL_DEFINE()
macros, and I was thinking theses functions would have some off the
wall issue as well.

Yeah, adding the SYSCALL_DEFINEx() macros around those functions would
be good for tracing as well.

Glad I understand you two now ;-)

I would have thought my jet lag would be over by now.

-- Steve

2014-04-02 17:33:00

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [GIT PULL] x86 LTO changes for v3.15

On 04/02/2014 05:33 AM, Steven Rostedt wrote:
> On Tue, 1 Apr 2014 17:35:05 -0700
>
> Heh, I know that not having the SYSCALL_DEFINEx() wrappers means that
> they wont be traced. I must have misunderstood Peter, as I thought he
> meant if we added SYSCALL_DEFINEx(), that they would break tracing.
>

No, I meant that them being missing breaks tracing.

>
> Yeah, adding the SYSCALL_DEFINEx() macros around those functions would
> be good for tracing as well.
>
> Glad I understand you two now ;-)
>

:)

Do you want to do the patch?

-hpa

2014-04-02 17:59:46

by Steven Rostedt

[permalink] [raw]
Subject: Re: [GIT PULL] x86 LTO changes for v3.15

On Wed, 02 Apr 2014 10:10:12 -0700
"H. Peter Anvin" <[email protected]> wrote:
)
>
> Do you want to do the patch?

Sure, I could probably whip something up.

-- Steve