All of lore.kernel.org
 help / color / mirror / Atom feed
* Generic syscall ABI support
@ 2013-03-28  3:09 ` Ley Foon Tan
  0 siblings, 0 replies; 15+ messages in thread
From: Ley Foon Tan @ 2013-03-28  3:09 UTC (permalink / raw)
  To: linux-kernel, arnd; +Cc: linux-arch

Need advise regarding the generic syscall ABI support.

We are planning to upstream our Nios II kernel (arch/nios2) to mainline.
But it doesn't support generic syscall ABI yet (It requires an updated
Glibc port as well). 

The question is, is it a requirement for new arch to support generic
syscall ABI when upstreaming? Can we upstream a non-generic syscall ABI
first and migrate to generic syscall ABI in future?
Thanks.

Regards
LFTAN




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Generic syscall ABI support
@ 2013-03-28  3:09 ` Ley Foon Tan
  0 siblings, 0 replies; 15+ messages in thread
From: Ley Foon Tan @ 2013-03-28  3:09 UTC (permalink / raw)
  To: linux-kernel, arnd; +Cc: linux-arch

Need advise regarding the generic syscall ABI support.

We are planning to upstream our Nios II kernel (arch/nios2) to mainline.
But it doesn't support generic syscall ABI yet (It requires an updated
Glibc port as well). 

The question is, is it a requirement for new arch to support generic
syscall ABI when upstreaming? Can we upstream a non-generic syscall ABI
first and migrate to generic syscall ABI in future?
Thanks.

Regards
LFTAN

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Generic syscall ABI support
  2013-03-28  3:09 ` Ley Foon Tan
  (?)
@ 2013-03-28  5:35 ` H. Peter Anvin
  2013-03-28  7:44   ` Arnd Bergmann
  -1 siblings, 1 reply; 15+ messages in thread
From: H. Peter Anvin @ 2013-03-28  5:35 UTC (permalink / raw)
  To: Ley Foon Tan; +Cc: linux-kernel, arnd, linux-arch

On 03/27/2013 08:09 PM, Ley Foon Tan wrote:
> Need advise regarding the generic syscall ABI support.
> 
> We are planning to upstream our Nios II kernel (arch/nios2) to mainline.
> But it doesn't support generic syscall ABI yet (It requires an updated
> Glibc port as well). 
> 
> The question is, is it a requirement for new arch to support generic
> syscall ABI when upstreaming? Can we upstream a non-generic syscall ABI
> first and migrate to generic syscall ABI in future?
> Thanks.
> 
> Regards
> LFTAN
> 

That would be extremely difficult.

In general, you should use the generic ABI for a new port unless you
have *very* strong and convincing reasons not to.

Given how long the Nios2 port has been in upstreaming (unfortunate, I
like to play with FPGAs ;) it seems worthwhile to adjust it before
pushing it.

	-hpa


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Generic syscall ABI support
  2013-03-28  5:35 ` H. Peter Anvin
@ 2013-03-28  7:44   ` Arnd Bergmann
  2013-03-28  8:32       ` Ley Foon Tan
  0 siblings, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2013-03-28  7:44 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Ley Foon Tan, linux-kernel, linux-arch

On Thursday 28 March 2013, H. Peter Anvin wrote:
> On 03/27/2013 08:09 PM, Ley Foon Tan wrote:

> > The question is, is it a requirement for new arch to support generic
> > syscall ABI when upstreaming? Can we upstream a non-generic syscall ABI
> > first and migrate to generic syscall ABI in future?
> > Thanks.
>
> In general, you should use the generic ABI for a new port unless you
> have very strong and convincing reasons not to.

Yes, absolutely. What a couple of the previous architectures have done is
to keep out of tree patches for their old ABI for a while, and to submit
only code that follows the generic ABI upstream. Usually it doesn't take
long for users to migrate to a new user space after that, but it gives
people a migration strategy. Normally you have other patches that are
required on top of the stuff that is already upstream while you are
getting everything merged, so this is not much different to a device
driver that needs to get rewritten to adapt to a new kernel subsystem.

	Arnd

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Generic syscall ABI support
  2013-03-28  7:44   ` Arnd Bergmann
@ 2013-03-28  8:32       ` Ley Foon Tan
  0 siblings, 0 replies; 15+ messages in thread
From: Ley Foon Tan @ 2013-03-28  8:32 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: H. Peter Anvin, linux-kernel, linux-arch

On Thu, 2013-03-28 at 07:44 +0000, Arnd Bergmann wrote:

> Yes, absolutely. What a couple of the previous architectures have done is
> to keep out of tree patches for their old ABI for a while, and to submit
> only code that follows the generic ABI upstream. Usually it doesn't take
> long for users to migrate to a new user space after that, but it gives
> people a migration strategy. Normally you have other patches that are
> required on top of the stuff that is already upstream while you are
> getting everything merged, so this is not much different to a device
> driver that needs to get rewritten to adapt to a new kernel subsystem.
> 
> 	Arnd
> 
Thanks for the reply. 
We will working on generic ABI for kernel and Glibc. This might take
some times.

Regards
LFTAN


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Generic syscall ABI support
@ 2013-03-28  8:32       ` Ley Foon Tan
  0 siblings, 0 replies; 15+ messages in thread
From: Ley Foon Tan @ 2013-03-28  8:32 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: H. Peter Anvin, linux-kernel, linux-arch

On Thu, 2013-03-28 at 07:44 +0000, Arnd Bergmann wrote:

> Yes, absolutely. What a couple of the previous architectures have done is
> to keep out of tree patches for their old ABI for a while, and to submit
> only code that follows the generic ABI upstream. Usually it doesn't take
> long for users to migrate to a new user space after that, but it gives
> people a migration strategy. Normally you have other patches that are
> required on top of the stuff that is already upstream while you are
> getting everything merged, so this is not much different to a device
> driver that needs to get rewritten to adapt to a new kernel subsystem.
> 
> 	Arnd
> 
Thanks for the reply. 
We will working on generic ABI for kernel and Glibc. This might take
some times.

Regards
LFTAN

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Generic syscall ABI support
  2013-03-28  8:32       ` Ley Foon Tan
  (?)
@ 2013-03-28 10:40       ` Arnd Bergmann
  2013-03-28 11:30           ` Ley Foon Tan
  -1 siblings, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2013-03-28 10:40 UTC (permalink / raw)
  To: Ley Foon Tan; +Cc: H. Peter Anvin, linux-kernel, linux-arch

On Thursday 28 March 2013, Ley Foon Tan wrote:
> We will working on generic ABI for kernel and Glibc. This might take
> some times.

Ok. Don't let that hold you up from submitting the kernel patches
for review though.

	Arnd

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Generic syscall ABI support
  2013-03-28 10:40       ` Arnd Bergmann
@ 2013-03-28 11:30           ` Ley Foon Tan
  0 siblings, 0 replies; 15+ messages in thread
From: Ley Foon Tan @ 2013-03-28 11:30 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: H. Peter Anvin, linux-kernel, linux-arch

On Thu, 2013-03-28 at 10:40 +0000, Arnd Bergmann wrote:
> On Thursday 28 March 2013, Ley Foon Tan wrote:
> > We will working on generic ABI for kernel and Glibc. This might take
> > some times.
> 
> Ok. Don't let that hold you up from submitting the kernel patches
> for review though.
> 
> 	Arnd
> 
Do you mean we can submit the patches for review before we got the
generic ABI support?

Regards
LFTAN


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Generic syscall ABI support
@ 2013-03-28 11:30           ` Ley Foon Tan
  0 siblings, 0 replies; 15+ messages in thread
From: Ley Foon Tan @ 2013-03-28 11:30 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: H. Peter Anvin, linux-kernel, linux-arch

On Thu, 2013-03-28 at 10:40 +0000, Arnd Bergmann wrote:
> On Thursday 28 March 2013, Ley Foon Tan wrote:
> > We will working on generic ABI for kernel and Glibc. This might take
> > some times.
> 
> Ok. Don't let that hold you up from submitting the kernel patches
> for review though.
> 
> 	Arnd
> 
Do you mean we can submit the patches for review before we got the
generic ABI support?

Regards
LFTAN

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Generic syscall ABI support
  2013-03-28 11:30           ` Ley Foon Tan
  (?)
@ 2013-03-28 11:42           ` Arnd Bergmann
  2013-03-29  4:41             ` Rob Landley
  -1 siblings, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2013-03-28 11:42 UTC (permalink / raw)
  To: Ley Foon Tan; +Cc: H. Peter Anvin, linux-kernel, linux-arch

On Thursday 28 March 2013, Ley Foon Tan wrote:
> On Thu, 2013-03-28 at 10:40 +0000, Arnd Bergmann wrote:
> > On Thursday 28 March 2013, Ley Foon Tan wrote:
> > > We will working on generic ABI for kernel and Glibc. This might take
> > > some times.
> > 
> > Ok. Don't let that hold you up from submitting the kernel patches
> > for review though.
>
> Do you mean we can submit the patches for review before we got the
> generic ABI support?

I mean you can send the other patches for review already. Changing
your implementtion to use the generic ABI will basically just mean
not sending the patches tht implement your own ABI, so that's not
hard. Of course until you also have a new glibc port, you won't be
able to test that it actually works, but that is not essential for
the reviewing stage.

	Arnd

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Generic syscall ABI support
  2013-03-28 11:42           ` Arnd Bergmann
@ 2013-03-29  4:41             ` Rob Landley
  2013-03-29  4:53               ` H. Peter Anvin
  0 siblings, 1 reply; 15+ messages in thread
From: Rob Landley @ 2013-03-29  4:41 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Ley Foon Tan, H. Peter Anvin, linux-kernel, linux-arch

On 03/28/2013 06:42:47 AM, Arnd Bergmann wrote:
> On Thursday 28 March 2013, Ley Foon Tan wrote:
> > On Thu, 2013-03-28 at 10:40 +0000, Arnd Bergmann wrote:
> > > On Thursday 28 March 2013, Ley Foon Tan wrote:
> > > > We will working on generic ABI for kernel and Glibc. This might  
> take
> > > > some times.
> > >
> > > Ok. Don't let that hold you up from submitting the kernel patches
> > > for review though.
> >
> > Do you mean we can submit the patches for review before we got the
> > generic ABI support?
> 
> I mean you can send the other patches for review already. Changing
> your implementtion to use the generic ABI will basically just mean
> not sending the patches tht implement your own ABI, so that's not
> hard. Of course until you also have a new glibc port, you won't be
> able to test that it actually works, but that is not essential for
> the reviewing stage.

You don't need a new glibc port, you need a new klibc or musl port.

   http://www.openwall.com/lists/musl/2012/07/08/1

Way less work than getting glibc working for your basic smoketest...

Rob

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Generic syscall ABI support
  2013-03-29  4:41             ` Rob Landley
@ 2013-03-29  4:53               ` H. Peter Anvin
  2013-03-29  9:49                   ` Ley Foon Tan
  0 siblings, 1 reply; 15+ messages in thread
From: H. Peter Anvin @ 2013-03-29  4:53 UTC (permalink / raw)
  To: Rob Landley; +Cc: Arnd Bergmann, Ley Foon Tan, linux-kernel, linux-arch

On 03/28/2013 09:41 PM, Rob Landley wrote:
> 
> You don't need a new glibc port, you need a new klibc or musl port.
> 
>   http://www.openwall.com/lists/musl/2012/07/08/1
> 
> Way less work than getting glibc working for your basic smoketest...
> 

Good point.  Average time to port klibc to a new architecture is about
four hours as long as the person porting knows the calling conventions
and assembly language involved.

	-hpa


-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Generic syscall ABI support
  2013-03-29  4:53               ` H. Peter Anvin
@ 2013-03-29  9:49                   ` Ley Foon Tan
  0 siblings, 0 replies; 15+ messages in thread
From: Ley Foon Tan @ 2013-03-29  9:49 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Rob Landley, Arnd Bergmann, linux-kernel, linux-arch

On Thu, 2013-03-28 at 21:53 -0700, H. Peter Anvin wrote:
> On 03/28/2013 09:41 PM, Rob Landley wrote:
> > 
> > You don't need a new glibc port, you need a new klibc or musl port.
> > 
> >   http://www.openwall.com/lists/musl/2012/07/08/1
> > 
> > Way less work than getting glibc working for your basic smoketest...
> > 
> 
> Good point.  Average time to port klibc to a new architecture is about
> four hours as long as the person porting knows the calling conventions
> and assembly language involved.
> 
> 	-hpa
> 
> 
Thanks for the suggestion.
Too bad we don't have in-house expert in klibc and musl port. 

Hi HPA,
I knew you are the developer of klibc. Do you have any documentation to
port a new architecture and also how to replace glibc with klibc in
build?

By the way, klibc or musl is easier to port?
Thanks.

Regards
lftan


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Generic syscall ABI support
@ 2013-03-29  9:49                   ` Ley Foon Tan
  0 siblings, 0 replies; 15+ messages in thread
From: Ley Foon Tan @ 2013-03-29  9:49 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Rob Landley, Arnd Bergmann, linux-kernel, linux-arch

On Thu, 2013-03-28 at 21:53 -0700, H. Peter Anvin wrote:
> On 03/28/2013 09:41 PM, Rob Landley wrote:
> > 
> > You don't need a new glibc port, you need a new klibc or musl port.
> > 
> >   http://www.openwall.com/lists/musl/2012/07/08/1
> > 
> > Way less work than getting glibc working for your basic smoketest...
> > 
> 
> Good point.  Average time to port klibc to a new architecture is about
> four hours as long as the person porting knows the calling conventions
> and assembly language involved.
> 
> 	-hpa
> 
> 
Thanks for the suggestion.
Too bad we don't have in-house expert in klibc and musl port. 

Hi HPA,
I knew you are the developer of klibc. Do you have any documentation to
port a new architecture and also how to replace glibc with klibc in
build?

By the way, klibc or musl is easier to port?
Thanks.

Regards
lftan

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Generic syscall ABI support
  2013-03-29  9:49                   ` Ley Foon Tan
  (?)
@ 2013-03-29 10:42                   ` Arnd Bergmann
  -1 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2013-03-29 10:42 UTC (permalink / raw)
  To: Ley Foon Tan; +Cc: H. Peter Anvin, Rob Landley, linux-kernel, linux-arch

On Friday 29 March 2013, Ley Foon Tan wrote:
> > 
> Thanks for the suggestion.
> Too bad we don't have in-house expert in klibc and musl port. 
> 
> Hi HPA,
> I knew you are the developer of klibc. Do you have any documentation to
> port a new architecture and also how to replace glibc with klibc in
> build?
> 
> By the way, klibc or musl is easier to port?

I have no experience with musl, but klibc is probably the easiest to
port that you can find. Doing a new port doesn't require any prior
knowledge of klibc itself, the code is so small that any experienced
C programmer can understand it entirely in short time and do a new
port. However, it is also not meant as a general purpose libc or a
glibc replacement, as there is a very limited set of code that can use
it. It's certainly complete enough to test that the ABI itself is
working.

	Arnd

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-03-29 10:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-28  3:09 Generic syscall ABI support Ley Foon Tan
2013-03-28  3:09 ` Ley Foon Tan
2013-03-28  5:35 ` H. Peter Anvin
2013-03-28  7:44   ` Arnd Bergmann
2013-03-28  8:32     ` Ley Foon Tan
2013-03-28  8:32       ` Ley Foon Tan
2013-03-28 10:40       ` Arnd Bergmann
2013-03-28 11:30         ` Ley Foon Tan
2013-03-28 11:30           ` Ley Foon Tan
2013-03-28 11:42           ` Arnd Bergmann
2013-03-29  4:41             ` Rob Landley
2013-03-29  4:53               ` H. Peter Anvin
2013-03-29  9:49                 ` Ley Foon Tan
2013-03-29  9:49                   ` Ley Foon Tan
2013-03-29 10:42                   ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.