Re: [PATCH 28/44] Add translate_signal() helper

2014-03-04 Thread Christoph Hellwig
On Tue, Mar 04, 2014 at 09:43:10PM +0100, Richard Weinberger wrote:
> I remember a discussion with Al where he noted that register_exec_domain()
> is currently only used by out of tree horrors. B-)
> 
> I'm sure we can rip it out of most archs. They seem to have it only because
> they've copy it from i386.

We do have a few in-tree uses obviously.  Would be good to know how much
of that actuall is used.

Except for that the major users is iBCS which became linux-abi long time
ago.  I think someone is still keeing it on life support and
occasionally forward porting it, but that's not a reason to keep any of
this in tree.  Back when I maintained it linux-abi already was a large
patch to core code and not just modules, and I doubt that has changed in
the last 10 years.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 28/44] Add translate_signal() helper

2014-03-04 Thread Richard Weinberger
Am 04.03.2014 19:41, schrieb Oleg Nesterov:
> On 03/03, Richard Weinberger wrote:
>>
>> +static inline int translate_signal(int sig)
>> +{
>> +struct thread_info *info = current_thread_info();
>> +
>> +if (info->exec_domain
> 
> Afaics it can't be NULL.

Good point. Will change.

>> && info->exec_domain->signal_invmap && sig < 32)
>> +return info->exec_domain->signal_invmap[sig];
>> +
> 
> And why default_exec_domain has .signal_invmap = ident_map ?
> translate_signal-like code should check ->signal_invmap != NULL
> anyway.
> 
> Off topic, but can't we kill exec_domain->signal_map ? it seems that
> it is unused.
> 
> Hmm. And who actually uses exec_domain->handler() ?? asm-offsets.c,
> but I do not see any usage of TI_EXEC_DOMAIN.
> 
> In short: I agree with this change but I am totally confused. To the
> point, I am not sure I even understand ->signal_invmap. I mean, it
> seems that only arthur_exec_domain has a non-ident map. Why, say,
> x86 does signr_convert() ? and only if CONFIG_X86_32? Is there any
> external module which does register_exec_domain(strange_invmap) ?

I remember a discussion with Al where he noted that register_exec_domain()
is currently only used by out of tree horrors. B-)

I'm sure we can rip it out of most archs. They seem to have it only because
they've copy it from i386.

Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 28/44] Add translate_signal() helper

2014-03-04 Thread Oleg Nesterov
On 03/03, Richard Weinberger wrote:
>
> +static inline int translate_signal(int sig)
> +{
> + struct thread_info *info = current_thread_info();
> +
> + if (info->exec_domain

Afaics it can't be NULL.

> && info->exec_domain->signal_invmap && sig < 32)
> + return info->exec_domain->signal_invmap[sig];
> +

And why default_exec_domain has .signal_invmap = ident_map ?
translate_signal-like code should check ->signal_invmap != NULL
anyway.

Off topic, but can't we kill exec_domain->signal_map ? it seems that
it is unused.

Hmm. And who actually uses exec_domain->handler() ?? asm-offsets.c,
but I do not see any usage of TI_EXEC_DOMAIN.

In short: I agree with this change but I am totally confused. To the
point, I am not sure I even understand ->signal_invmap. I mean, it
seems that only arthur_exec_domain has a non-ident map. Why, say,
x86 does signr_convert() ? and only if CONFIG_X86_32? Is there any
external module which does register_exec_domain(strange_invmap) ?

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 28/44] Add translate_signal() helper

2014-03-04 Thread Oleg Nesterov
On 03/03, Richard Weinberger wrote:

 +static inline int translate_signal(int sig)
 +{
 + struct thread_info *info = current_thread_info();
 +
 + if (info-exec_domain

Afaics it can't be NULL.

  info-exec_domain-signal_invmap  sig  32)
 + return info-exec_domain-signal_invmap[sig];
 +

And why default_exec_domain has .signal_invmap = ident_map ?
translate_signal-like code should check -signal_invmap != NULL
anyway.

Off topic, but can't we kill exec_domain-signal_map ? it seems that
it is unused.

Hmm. And who actually uses exec_domain-handler() ?? asm-offsets.c,
but I do not see any usage of TI_EXEC_DOMAIN.

In short: I agree with this change but I am totally confused. To the
point, I am not sure I even understand -signal_invmap. I mean, it
seems that only arthur_exec_domain has a non-ident map. Why, say,
x86 does signr_convert() ? and only if CONFIG_X86_32? Is there any
external module which does register_exec_domain(strange_invmap) ?

Oleg.

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 28/44] Add translate_signal() helper

2014-03-04 Thread Richard Weinberger
Am 04.03.2014 19:41, schrieb Oleg Nesterov:
 On 03/03, Richard Weinberger wrote:

 +static inline int translate_signal(int sig)
 +{
 +struct thread_info *info = current_thread_info();
 +
 +if (info-exec_domain
 
 Afaics it can't be NULL.

Good point. Will change.

  info-exec_domain-signal_invmap  sig  32)
 +return info-exec_domain-signal_invmap[sig];
 +
 
 And why default_exec_domain has .signal_invmap = ident_map ?
 translate_signal-like code should check -signal_invmap != NULL
 anyway.
 
 Off topic, but can't we kill exec_domain-signal_map ? it seems that
 it is unused.
 
 Hmm. And who actually uses exec_domain-handler() ?? asm-offsets.c,
 but I do not see any usage of TI_EXEC_DOMAIN.
 
 In short: I agree with this change but I am totally confused. To the
 point, I am not sure I even understand -signal_invmap. I mean, it
 seems that only arthur_exec_domain has a non-ident map. Why, say,
 x86 does signr_convert() ? and only if CONFIG_X86_32? Is there any
 external module which does register_exec_domain(strange_invmap) ?

I remember a discussion with Al where he noted that register_exec_domain()
is currently only used by out of tree horrors. B-)

I'm sure we can rip it out of most archs. They seem to have it only because
they've copypasted it from i386.

Thanks,
//richard
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 28/44] Add translate_signal() helper

2014-03-04 Thread Christoph Hellwig
On Tue, Mar 04, 2014 at 09:43:10PM +0100, Richard Weinberger wrote:
 I remember a discussion with Al where he noted that register_exec_domain()
 is currently only used by out of tree horrors. B-)
 
 I'm sure we can rip it out of most archs. They seem to have it only because
 they've copypasted it from i386.

We do have a few in-tree uses obviously.  Would be good to know how much
of that actuall is used.

Except for that the major users is iBCS which became linux-abi long time
ago.  I think someone is still keeing it on life support and
occasionally forward porting it, but that's not a reason to keep any of
this in tree.  Back when I maintained it linux-abi already was a large
patch to core code and not just modules, and I doubt that has changed in
the last 10 years.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/