* [uml-devel] 2.4.26 and strstr
@ 2004-09-20 0:29 Michael Richardson
2004-09-20 18:26 ` BlaisorBlade
0 siblings, 1 reply; 3+ messages in thread
From: Michael Richardson @ 2004-09-20 0:29 UTC (permalink / raw)
To: user-mode-linux-devel
-----BEGIN PGP SIGNED MESSAGE-----
I recently moved from 2.4.19 for the Openswan regression tests to
2.4.26. (a number of kernels in between were just not as stable)
I encountered a problem with strstr(). It was no longer available
to modules. It did link okay when I built our code statically.. I don't
know that is because it was linking (incorrectly) against libc, or what.
strstr() is an hand assembled in arch/i386/lib/strstr.c.
As far as I can see, there is nothing to build any of the code there.
I think that the answer is that arch/um/sys-i386 should have strstr.c
added to the Makefile, but I'm far from sure on this. In particular,
this does not seem to make the symbol available to modules.
(yes, I threw EXPORT_SYMTAB in).
{I don't honestly know why this routine isn't inlined with the rest of
the string.h routines.}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Finger me for keys
iQCVAwUBQU4kbYqHRg3pndX9AQGsfwP/Xl1BBOFH+2RzMatxY+t4FAecbyoqYZWu
mZhe6qft7+45eDkQUx+Pk4sfO2PSzryJJ8wxHjHPNkQeAby5y2Slzh8bJDseXu3D
vv7SadBQdKY2GByEaQOvU+Zz08nWM2K5XxxB4KxKdKnfv3Jr/A+aKDPnRn9A0qad
lu9fpEoRGik=
=zZGx
-----END PGP SIGNATURE-----
marajade-[openswan-2/nightly/UMLPOOL/plain] mcr 1019 %diff -u arch/um/sys-i386/Makefile~ arch/um/sys-i386/Makefile
--- arch/um/sys-i386/Makefile~ 2004-09-15 15:44:43.000000000 -0400
+++ arch/um/sys-i386/Makefile 2004-09-19 20:23:27.000000000 -0400
@@ -6,15 +6,16 @@
O_TARGET = built-in.o
obj-y = bugs.o checksum.o extable.o fault.o ksyms.o ldt.o ptrace.o \
- ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o
+ ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o strstr.o
export-objs = ksyms.o
USER_OBJS = bugs.o ptrace_user.o sigcontext.o fault.o
-SYMLINKS = semaphore.c extable.c
+SYMLINKS = semaphore.c extable.c strstr.c
semaphore.c-dir = kernel
extable.c-dir = mm
+strstr.c-dir = lib
include $(TOPDIR)/Rules.make
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [uml-devel] 2.4.26 and strstr
2004-09-20 0:29 [uml-devel] 2.4.26 and strstr Michael Richardson
@ 2004-09-20 18:26 ` BlaisorBlade
2004-09-21 17:07 ` Michael Richardson
0 siblings, 1 reply; 3+ messages in thread
From: BlaisorBlade @ 2004-09-20 18:26 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Michael Richardson
On Monday 20 September 2004 02:29, Michael Richardson wrote:
> I recently moved from 2.4.19 for the Openswan regression tests to
> 2.4.26. (a number of kernels in between were just not as stable)
> I encountered a problem with strstr(). It was no longer available
> to modules. It did link okay when I built our code statically.. I don't
> know that is because it was linking (incorrectly) against libc, or what.
No, that is not incorrect, for UML - at least it has always done things that
way. So it should suffice adding EXPORT_SYMBOL (and not EXPORT_SYMTAB) in the
right place (see below).
However, in this particular case, you should just edit
arch/um/kernel/user_ksyms.c and uncomment those EXPORT_SYMBOL at the top of
the file. Don't care about the comment "they caused problem", it's not true
in my experience.
> strstr() is an hand assembled in arch/i386/lib/strstr.c.
> As far as I can see, there is nothing to build any of the code there.
> I think that the answer is that arch/um/sys-i386 should have strstr.c
> added to the Makefile, but I'm far from sure on this. In particular,
> this does not seem to make the symbol available to modules.
> (yes, I threw EXPORT_SYMTAB in).
You mean EXPORT_SYMBOL, right? Remember to put it inside a file listed in
export-objs in its Makefile (which means that you should put it inside
arch/um/kernel/ksyms.c, or arch/um/sys-i386/ksyms.c).
> {I don't honestly know why this routine isn't inlined with the rest of
> the string.h routines.}
> marajade-[openswan-2/nightly/UMLPOOL/plain] mcr 1019 %diff -u
> arch/um/sys-i386/Makefile~ arch/um/sys-i386/Makefile ---
> arch/um/sys-i386/Makefile~ 2004-09-15 15:44:43.000000000 -0400 +++
> arch/um/sys-i386/Makefile 2004-09-19 20:23:27.000000000 -0400 @@ -6,15
> +6,16 @@
> O_TARGET = built-in.o
>
> obj-y = bugs.o checksum.o extable.o fault.o ksyms.o ldt.o ptrace.o \
> - ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o
> + ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o strstr.o
> export-objs = ksyms.o
>
> USER_OBJS = bugs.o ptrace_user.o sigcontext.o fault.o
> -SYMLINKS = semaphore.c extable.c
> +SYMLINKS = semaphore.c extable.c strstr.c
> semaphore.c-dir = kernel
> extable.c-dir = mm
> +strstr.c-dir = lib
Bye
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [uml-devel] 2.4.26 and strstr
2004-09-20 18:26 ` BlaisorBlade
@ 2004-09-21 17:07 ` Michael Richardson
0 siblings, 0 replies; 3+ messages in thread
From: Michael Richardson @ 2004-09-21 17:07 UTC (permalink / raw)
To: BlaisorBlade; +Cc: user-mode-linux-devel
-----BEGIN PGP SIGNED MESSAGE-----
>>>>> "BlaisorBlade" == BlaisorBlade <blaisorblade_spam@yahoo.it> writes:
>> I recently moved from 2.4.19 for the Openswan regression tests to
>> 2.4.26. (a number of kernels in between were just not as stable)
>> I encountered a problem with strstr(). It was no longer available
>> to modules. It did link okay when I built our code statically.. I
>> don't know that is because it was linking (incorrectly) against
>> libc, or what.
BlaisorBlade> No, that is not incorrect, for UML - at least it has
BlaisorBlade> always done things that way. So it should suffice
BlaisorBlade> adding EXPORT_SYMBOL (and not EXPORT_SYMTAB) in the
BlaisorBlade> right place (see below).
Oops, probably my brain-fart doing the wrong thing.
BlaisorBlade> However, in this particular case, you should just edit
BlaisorBlade> arch/um/kernel/user_ksyms.c and uncomment those
BlaisorBlade> EXPORT_SYMBOL at the top of the file. Don't care about
BlaisorBlade> the comment "they caused problem", it's not true in my
BlaisorBlade> experience.
Okay!
Will this be in the next patch?
Since I package up the testing environment that I use for Openswan,
and we have developers that want a quickstart script, it is important
that they don't have to do any extra patching.
>> strstr() is an hand assembled in arch/i386/lib/strstr.c. As far
>> as I can see, there is nothing to build any of the code there.
>> I think that the answer is that arch/um/sys-i386 should have
>> strstr.c added to the Makefile, but I'm far from sure on this. In
>> particular, this does not seem to make the symbol available to
>> modules. (yes, I threw EXPORT_SYMTAB in).
BlaisorBlade> You mean EXPORT_SYMBOL, right? Remember to put it
BlaisorBlade> inside a file listed in export-objs in its Makefile
BlaisorBlade> (which means that you should put it inside
BlaisorBlade> arch/um/kernel/ksyms.c, or arch/um/sys-i386/ksyms.c).
- --
] "Elmo went to the wrong fundraiser" - The Simpson | firewalls [
] Michael Richardson, Xelerance Corporation, Ottawa, ON |net architect[
] mcr@xelerance.com http://www.sandelman.ottawa.on.ca/mcr/ |device driver[
] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Finger me for keys
iQCVAwUBQVBfzoqHRg3pndX9AQGJBwP+LTEy3RVEjjZ2D+PKA8u28omukuK3o4ga
4YXkng5ZchDZQ5HzaClPd4HbgJ0a7s2Pywujv6MP9wZa6W8wvLLU2eL17V6sxsN7
Brxpt2FjTswlgTd3mIICsrP3KxLr6ZpTH34omZJaiDaQ1RQ9KV7UdwPI9EUj1SGG
eoNk5M8VwHI=
=4wtw
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-09-21 17:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-20 0:29 [uml-devel] 2.4.26 and strstr Michael Richardson
2004-09-20 18:26 ` BlaisorBlade
2004-09-21 17:07 ` Michael Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox