public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] How to set/reset gp pointer : info needed
@ 2003-03-14 15:08 Raj Patil
  2003-03-14 16:52 ` Stephane Eranian
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Raj Patil @ 2003-03-14 15:08 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 1482 bytes --]


Hello,

I am not sure whether this is the right group for me to ask this or get the

kind of information I am looking for. I apologize if this is not the

right group. I am relatively new to Linux/ia64 and this question is related

to ia64. Hence, decided to post it here 

I am looking for some info on how to set/unset the gp pointer, locations/cases

where I need to set and any other issues I need to worry. Any pointers to

some documentation or sample code or notes will be really appreciated.

Reason: I am just trying to port an utility to ia64 based Linux platform from 

x86 platform. It adds an entry to syscall table to point to a function in 

a module. It is like adding a new temp syscall for a small duration. 

By looking at some documentation, I realized that I need to set 

the gp pointer correctly before calling the function (not sure exactly wehre

and how). So, I am looking for some docs/notes which clarify my doubts like

-what in general needs to be done to set/reset gp (where?).

-Does this need to be done if one is adding an entry to ia32 syscall 

table too? 

-If this new function in the module calls other kernel functions in between,

should it worry about gp pointer before calling the kernel functions etc.

I have access to RH Advanced Server 2.1 running on an HP Itanium-2 box.

Thank you very much for any pointers/info.

Regards,

Raj



---------------------------------
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online

[-- Attachment #2: Type: text/html, Size: 1734 bytes --]

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

* Re: [Linux-ia64] How to set/reset gp pointer : info needed
  2003-03-14 15:08 [Linux-ia64] How to set/reset gp pointer : info needed Raj Patil
@ 2003-03-14 16:52 ` Stephane Eranian
  2003-03-14 17:17 ` David Mosberger
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Stephane Eranian @ 2003-03-14 16:52 UTC (permalink / raw)
  To: linux-ia64

Raj,

Take a look at the software calling convention document at:

http://developer.intel.com/design/itanium/downloads/245358.htm



On Fri, Mar 14, 2003 at 07:08:51AM -0800, Raj Patil wrote:
> 
> Hello,
> 
> I am not sure whether this is the right group for me to ask this or get the
> 
> kind of information I am looking for. I apologize if this is not the
> 
> right group. I am relatively new to Linux/ia64 and this question is related
> 
> to ia64. Hence, decided to post it here 
> 
> I am looking for some info on how to set/unset the gp pointer, locations/cases
> 
> where I need to set and any other issues I need to worry. Any pointers to
> 
> some documentation or sample code or notes will be really appreciated.
> 
> Reason: I am just trying to port an utility to ia64 based Linux platform from 
> 
> x86 platform. It adds an entry to syscall table to point to a function in 
> 
> a module. It is like adding a new temp syscall for a small duration. 
> 
> By looking at some documentation, I realized that I need to set 
> 
> the gp pointer correctly before calling the function (not sure exactly wehre
> 
> and how). So, I am looking for some docs/notes which clarify my doubts like
> 
> -what in general needs to be done to set/reset gp (where?).
> 
> -Does this need to be done if one is adding an entry to ia32 syscall 
> 
> table too? 
> 
> -If this new function in the module calls other kernel functions in between,
> 
> should it worry about gp pointer before calling the kernel functions etc.
> 
> I have access to RH Advanced Server 2.1 running on an HP Itanium-2 box.
> 
> Thank you very much for any pointers/info.
> 
> Regards,
> 
> Raj
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online
-- 

-Stephane


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

* Re: [Linux-ia64] How to set/reset gp pointer : info needed
  2003-03-14 15:08 [Linux-ia64] How to set/reset gp pointer : info needed Raj Patil
  2003-03-14 16:52 ` Stephane Eranian
@ 2003-03-14 17:17 ` David Mosberger
  2003-03-14 17:56 ` Raj Patil
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: David Mosberger @ 2003-03-14 17:17 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Fri, 14 Mar 2003 07:08:51 -0800 (PST), Raj Patil <rpatil0296@yahoo.com> said:

  Raj> Reason: I am just trying to port an utility to ia64 based Linux
  Raj> platform from x86 platform. It adds an entry to syscall table
  Raj> to point to a function in a module. It is like adding a new
  Raj> temp syscall for a small duration.

Is the module open-source?  If not, you run the risk of violating the
kernel's GPL license (binary-only modules are OK but only as long as
they use "standard" kernel interfaces; planting a syscall-hook goes
beyond that).

	--david


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

* Re: [Linux-ia64] How to set/reset gp pointer : info needed
  2003-03-14 15:08 [Linux-ia64] How to set/reset gp pointer : info needed Raj Patil
  2003-03-14 16:52 ` Stephane Eranian
  2003-03-14 17:17 ` David Mosberger
@ 2003-03-14 17:56 ` Raj Patil
  2003-03-14 19:41 ` David Mosberger
  2003-03-15  1:27 ` Keith Owens
  4 siblings, 0 replies; 6+ messages in thread
From: Raj Patil @ 2003-03-14 17:56 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 893 bytes --]


I will check the source of this tool/module...... 
But, curious: You mean, one can not legally add a new syscall or hook? 
This process as such does not use/modify the kernel source.... 
Regards, 
Raj. 
 David Mosberger <davidm@napali.hpl.hp.com> wrote: >>>>> On Fri, 14 Mar 2003 07:08:51 -0800 (PST), Raj Patil said:

Raj> Reason: I am just trying to port an utility to ia64 based Linux
Raj> platform from x86 platform. It adds an entry to syscall table
Raj> to point to a function in a module. It is like adding a new
Raj> temp syscall for a small duration.

Is the module open-source? If not, you run the risk of violating the
kernel's GPL license (binary-only modules are OK but only as long as
they use "standard" kernel interfaces; planting a syscall-hook goes
beyond that).

--david


---------------------------------
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online

[-- Attachment #2: Type: text/html, Size: 1221 bytes --]

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

* Re: [Linux-ia64] How to set/reset gp pointer : info needed
  2003-03-14 15:08 [Linux-ia64] How to set/reset gp pointer : info needed Raj Patil
                   ` (2 preceding siblings ...)
  2003-03-14 17:56 ` Raj Patil
@ 2003-03-14 19:41 ` David Mosberger
  2003-03-15  1:27 ` Keith Owens
  4 siblings, 0 replies; 6+ messages in thread
From: David Mosberger @ 2003-03-14 19:41 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Fri, 14 Mar 2003 09:56:12 -0800 (PST), Raj Patil <rpatil0296@yahoo.com> said:

  Raj> I will check the source of this tool/module......  But,
  Raj> curious: You mean, one can not legally add a new syscall or
  Raj> hook?

I don't want to appear to be giving legal advise, so I'd recommend to
consult with your legal counsel to get a definite answer (or you can
ask for opinions on the lkml; preferably _after_ donning an asbestos
suit).

BTW: dynamically installing syscalls/hooks is a bad idea even for Open
Source modules.  It's just not a safe thing to do.  If you need a
syscall, argue why it's needed and why it's a good idea and if the
kernel developers concur, there will be no problem getting it
added/reserved.

	--david


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

* Re: [Linux-ia64] How to set/reset gp pointer : info needed
  2003-03-14 15:08 [Linux-ia64] How to set/reset gp pointer : info needed Raj Patil
                   ` (3 preceding siblings ...)
  2003-03-14 19:41 ` David Mosberger
@ 2003-03-15  1:27 ` Keith Owens
  4 siblings, 0 replies; 6+ messages in thread
From: Keith Owens @ 2003-03-15  1:27 UTC (permalink / raw)
  To: linux-ia64

On Fri, 14 Mar 2003 11:41:57 -0800, 
David Mosberger <davidm@napali.hpl.hp.com> wrote:
>>>>>> On Fri, 14 Mar 2003 09:56:12 -0800 (PST), Raj Patil <rpatil0296@yahoo.com> said:
>
>  Raj> I will check the source of this tool/module......  But,
>  Raj> curious: You mean, one can not legally add a new syscall or
>  Raj> hook?
>
>I don't want to appear to be giving legal advise, so I'd recommend to
>consult with your legal counsel to get a definite answer (or you can
>ask for opinions on the lkml; preferably _after_ donning an asbestos
>suit).

Even beyond legal - Linus has stated (several times) that he will not
accept code that patches the syscall table.  Linus hates the idea of
dynamic syscalls.



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

end of thread, other threads:[~2003-03-15  1:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-14 15:08 [Linux-ia64] How to set/reset gp pointer : info needed Raj Patil
2003-03-14 16:52 ` Stephane Eranian
2003-03-14 17:17 ` David Mosberger
2003-03-14 17:56 ` Raj Patil
2003-03-14 19:41 ` David Mosberger
2003-03-15  1:27 ` Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox