public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Function send_a_relocation()
@ 2017-02-27 17:01 Arkady
  2017-03-01 11:29 ` Arkady
  0 siblings, 1 reply; 7+ messages in thread
From: Arkady @ 2017-02-27 17:01 UTC (permalink / raw)
  To: systemtap

Hi,

In the file staprun.c there is a comment
"We do this under protest.  The kernel ought expose this data to
modules such as ourselves"

Does not the function kallsyms_lookup_name() expose the exported symbols?

Thanks.

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

* Re: Function send_a_relocation()
  2017-02-27 17:01 Function send_a_relocation() Arkady
@ 2017-03-01 11:29 ` Arkady
  2017-03-01 14:07   ` David Smith
  0 siblings, 1 reply; 7+ messages in thread
From: Arkady @ 2017-03-01 11:29 UTC (permalink / raw)
  To: systemtap

I will add a background here. I was trying to insmod the precompiled
driver without reliance on systemtap_runtime package. I have had a
crazy idea to package the kernel module in an RPM without dependency
on systemtap_runtime.rpm

I come up with the following Python script
https://github.com/larytet/YALAS/blob/master/scripts/generate_messages.py
Essentially I send
    STP_READY
    STP_PRIVILEGE_CREDENTIALS
    STP_RELOCATION
    STAP_START

I wonder if it is possible to load the driver without a need to access
/proc/kallsyms first.

Thanks.

On Mon, Feb 27, 2017 at 7:01 PM, Arkady <arkady.miasnikov@gmail.com> wrote:
> Hi,
>
> In the file staprun.c there is a comment
> "We do this under protest.  The kernel ought expose this data to
> modules such as ourselves"
>
> Does not the function kallsyms_lookup_name() expose the exported symbols?
>
> Thanks.

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

* Re: Function send_a_relocation()
  2017-03-01 11:29 ` Arkady
@ 2017-03-01 14:07   ` David Smith
  2017-03-01 16:29     ` Arkady
  0 siblings, 1 reply; 7+ messages in thread
From: David Smith @ 2017-03-01 14:07 UTC (permalink / raw)
  To: Arkady, systemtap

On 03/01/2017 05:28 AM, Arkady wrote:
> I will add a background here. I was trying to insmod the precompiled
> driver without reliance on systemtap_runtime package. I have had a
> crazy idea to package the kernel module in an RPM without dependency
> on systemtap_runtime.rpm

What are your reasons for wanting to run systemtap modules without the
systemtap_runtime rpm?

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)

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

* Re: Function send_a_relocation()
  2017-03-01 14:07   ` David Smith
@ 2017-03-01 16:29     ` Arkady
  2017-03-01 18:27       ` David Smith
  0 siblings, 1 reply; 7+ messages in thread
From: Arkady @ 2017-03-01 16:29 UTC (permalink / raw)
  To: David Smith; +Cc: systemtap

There are some constraints I have to deal with in a commercial
product. My goal is to reduce the number of dependencies when I am
installing the driver generated by STAP. Replacing of
systemtap_runtime package is one of the things I am considering.

On Wed, Mar 1, 2017 at 4:07 PM, David Smith <dsmith@redhat.com> wrote:
> On 03/01/2017 05:28 AM, Arkady wrote:
>> I will add a background here. I was trying to insmod the precompiled
>> driver without reliance on systemtap_runtime package. I have had a
>> crazy idea to package the kernel module in an RPM without dependency
>> on systemtap_runtime.rpm
>
> What are your reasons for wanting to run systemtap modules without the
> systemtap_runtime rpm?
>

A commercial entity insists on making the deployment RPM as light as

> --
> David Smith
> dsmith@redhat.com
> Red Hat
> http://www.redhat.com
> 256.217.0141 (direct)
> 256.837.0057 (fax)

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

* Re: Function send_a_relocation()
  2017-03-01 16:29     ` Arkady
@ 2017-03-01 18:27       ` David Smith
  2017-03-01 18:42         ` Arkady
  0 siblings, 1 reply; 7+ messages in thread
From: David Smith @ 2017-03-01 18:27 UTC (permalink / raw)
  To: Arkady; +Cc: systemtap

On 03/01/2017 10:29 AM, Arkady wrote:
> There are some constraints I have to deal with in a commercial
> product. My goal is to reduce the number of dependencies when I am
> installing the driver generated by STAP. Replacing of
> systemtap_runtime package is one of the things I am considering.

Hmm. Have you instead thought of creating a mini systemtap-runtime
package instead? If you are just running systemtap kernel modules and
don't need man pages, etc., you most likely don't need anything other
than 'staprun' and 'stapio' from the systemtap-runtime rpm. Those are 2
fairly small C executables.

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)

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

* Re: Function send_a_relocation()
  2017-03-01 18:27       ` David Smith
@ 2017-03-01 18:42         ` Arkady
  2017-03-01 19:04           ` David Smith
  0 siblings, 1 reply; 7+ messages in thread
From: Arkady @ 2017-03-01 18:42 UTC (permalink / raw)
  To: David Smith; +Cc: systemtap

I have though that a Python script is easier than compiling and packaging.
It was a crazy idea, I agree.

On Wed, Mar 1, 2017 at 8:26 PM, David Smith <dsmith@redhat.com> wrote:
> On 03/01/2017 10:29 AM, Arkady wrote:
>> There are some constraints I have to deal with in a commercial
>> product. My goal is to reduce the number of dependencies when I am
>> installing the driver generated by STAP. Replacing of
>> systemtap_runtime package is one of the things I am considering.
>
> Hmm. Have you instead thought of creating a mini systemtap-runtime
> package instead? If you are just running systemtap kernel modules and
> don't need man pages, etc., you most likely don't need anything other
> than 'staprun' and 'stapio' from the systemtap-runtime rpm. Those are 2
> fairly small C executables.
>
> --
> David Smith
> dsmith@redhat.com
> Red Hat
> http://www.redhat.com
> 256.217.0141 (direct)
> 256.837.0057 (fax)

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

* Re: Function send_a_relocation()
  2017-03-01 18:42         ` Arkady
@ 2017-03-01 19:04           ` David Smith
  0 siblings, 0 replies; 7+ messages in thread
From: David Smith @ 2017-03-01 19:04 UTC (permalink / raw)
  To: Arkady; +Cc: systemtap

On 03/01/2017 12:42 PM, Arkady wrote:
> I have though that a Python script is easier than compiling and packaging.
> It was a crazy idea, I agree.

I wouldn't even recompile 'staprun' and 'stapio'. You could probably
write a script to use yum/dnf to download the binary systemtap-runtime
rpm, expand it, grab the part you need, and create a new
'systemtap-mini-runtime' rpm.

> On Wed, Mar 1, 2017 at 8:26 PM, David Smith <dsmith@redhat.com> wrote:
>> On 03/01/2017 10:29 AM, Arkady wrote:
>>> There are some constraints I have to deal with in a commercial
>>> product. My goal is to reduce the number of dependencies when I am
>>> installing the driver generated by STAP. Replacing of
>>> systemtap_runtime package is one of the things I am considering.
>>
>> Hmm. Have you instead thought of creating a mini systemtap-runtime
>> package instead? If you are just running systemtap kernel modules and
>> don't need man pages, etc., you most likely don't need anything other
>> than 'staprun' and 'stapio' from the systemtap-runtime rpm. Those are 2
>> fairly small C executables.

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)

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

end of thread, other threads:[~2017-03-01 19:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27 17:01 Function send_a_relocation() Arkady
2017-03-01 11:29 ` Arkady
2017-03-01 14:07   ` David Smith
2017-03-01 16:29     ` Arkady
2017-03-01 18:27       ` David Smith
2017-03-01 18:42         ` Arkady
2017-03-01 19:04           ` David Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).