public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* undefined references
@ 2005-01-25  0:04 John Richard Moser
  2005-01-25  2:04 ` Valdis.Kletnieks
  0 siblings, 1 reply; 3+ messages in thread
From: John Richard Moser @ 2005-01-25  0:04 UTC (permalink / raw)
  To: linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

icebox linux-2.6.10-grs # make
  CHK     include/linux/version.h
make[1]: `arch/x86_64/kernel/asm-offsets.s' is up to date.
  CHK     include/linux/compile.h
  CHK     usr/initramfs_list
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
fs/built-in.o(.text+0xe413): In function `link_path_walk':
: undefined reference to `gr_inode_follow_link'
fs/built-in.o(.text+0xe933): In function `link_path_walk':
: undefined reference to `gr_inode_follow_link'
fs/built-in.o(.text+0x10c28): In function `sys_link':
: undefined reference to `gr_inode_hardlink'
fs/built-in.o(.text+0x10c52): In function `sys_link':
: undefined reference to `gr_inode_handle_create'
make: *** [.tmp_vmlinux1] Error 1

What would cause this kind of error?

I'm messing with reimplementing LSM from scratch and have a patch for
what I'm doing if anyone wants to communicate on this; it's pretty much
an academic endeavor (learn to code in the kernel, learn how lsm was
created, learn how GrSecurity's codebase works).
- --
All content of all messages exchanged herein are left in the
Public Domain, unless otherwise explicitly stated.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB9Y0lhDd4aOud5P8RAmGxAJ9XZESD1nHO7mEIA7Bw0YCC/ns3KACfSgLF
4XRkAjHoayXprZR1Ma/0doI=
=LqFc
-----END PGP SIGNATURE-----

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

* Re: undefined references
  2005-01-25  0:04 undefined references John Richard Moser
@ 2005-01-25  2:04 ` Valdis.Kletnieks
  2005-01-25  4:15   ` John Richard Moser
  0 siblings, 1 reply; 3+ messages in thread
From: Valdis.Kletnieks @ 2005-01-25  2:04 UTC (permalink / raw)
  To: John Richard Moser; +Cc: linux-kernel

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

On Mon, 24 Jan 2005 19:04:53 EST, John Richard Moser said:

> fs/built-in.o(.text+0xe413): In function `link_path_walk':
> : undefined reference to `gr_inode_follow_link'
> fs/built-in.o(.text+0xe933): In function `link_path_walk':
> : undefined reference to `gr_inode_follow_link'
> fs/built-in.o(.text+0x10c28): In function `sys_link':
> : undefined reference to `gr_inode_hardlink'
> fs/built-in.o(.text+0x10c52): In function `sys_link':
> : undefined reference to `gr_inode_handle_create'
> make: *** [.tmp_vmlinux1] Error 1
> 
> What would cause this kind of error?

link_path_walk() still has a reference to gr_inode_follow_link (the code
you probably want to move to an LSM exit), and sys_ling() still calls
gr_inode_hardlink() and gr_inode_handle_create() - but the actual functions
you're calling either don't exist anymore, or they didn't get compiled and linked
in.  If those functions are supposed to exist, you need to get them into a .o.
If those are (as I suspect) becoming LSM exit hooks, then you need to clean up
the direct calls in link_path_walk() and sys_link().

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

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

* Re: undefined references
  2005-01-25  2:04 ` Valdis.Kletnieks
@ 2005-01-25  4:15   ` John Richard Moser
  0 siblings, 0 replies; 3+ messages in thread
From: John Richard Moser @ 2005-01-25  4:15 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Valdis.Kletnieks@vt.edu wrote:
> On Mon, 24 Jan 2005 19:04:53 EST, John Richard Moser said:
> 
> 
>>fs/built-in.o(.text+0xe413): In function `link_path_walk':
>>: undefined reference to `gr_inode_follow_link'
>>fs/built-in.o(.text+0xe933): In function `link_path_walk':
>>: undefined reference to `gr_inode_follow_link'
>>fs/built-in.o(.text+0x10c28): In function `sys_link':
>>: undefined reference to `gr_inode_hardlink'
>>fs/built-in.o(.text+0x10c52): In function `sys_link':
>>: undefined reference to `gr_inode_handle_create'
>>make: *** [.tmp_vmlinux1] Error 1
>>
>>What would cause this kind of error?
> 
> 
> link_path_walk() still has a reference to gr_inode_follow_link (the code
> you probably want to move to an LSM exit), and sys_ling() still calls
> gr_inode_hardlink() and gr_inode_handle_create() - but the actual functions
> you're calling either don't exist anymore, or they didn't get compiled and linked
> in.  If those functions are supposed to exist, you need to get them into a .o.
> If those are (as I suspect) becoming LSM exit hooks, then you need to clean up
> the direct calls in link_path_walk() and sys_link().

I figured it out.

I had in the makefile

subdir-$(CONFIG_GRSECURITY) += grsecurity/

I had to use obj- instead.


This is just an academic thing-- I'm rewriting GrSecurity's invasive
code as a bunch of hooks, collapsing what I can down, and making a
stackable (easy) security framework from scratch (what the hell am I
doing?).  I'm not modifying LSM, though I did rip off the
security_initcall things (did I just create a new .text section in
vmlinuz?  o.o).

Thanks for your comments though.  I'll look to them if I have trouble in
the future.
- --
All content of all messages exchanged herein are left in the
Public Domain, unless otherwise explicitly stated.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB9cf7hDd4aOud5P8RAtfbAJ9eaHGZpl2DXoqSJBlPVgBnnI7ivACfdw3H
xQuH4N3DOwWgBtkKQWpDOhA=
=U7C8
-----END PGP SIGNATURE-----

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

end of thread, other threads:[~2005-01-25  4:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-25  0:04 undefined references John Richard Moser
2005-01-25  2:04 ` Valdis.Kletnieks
2005-01-25  4:15   ` John Richard Moser

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