On Wed, Jun 29, 2011 at 6:42 PM, Richard Weinberger <rich...@nod.at> wrote:
> Am Mittwoch 29 Juni 2011, 17:37:54 schrieb Vitaliy Ivanov:
>> On Tue, Jun 28, 2011 at 1:15 AM, Richard Weinberger <rich...@nod.at> wrote:
>> > When UML is compiled with _FORTIFY_SOURCE we have to
>> > export all _chk() functions which are used in modules.
>> > For now it's only the case for __sprintf_chk().
>> >
>> > Tested-by: Florian Fainelli <flor...@openwrt.org>
>> > Reported-by: Florian Fainelli <flor...@openwrt.org>
>> > Signed-off-by: Richard Weinberger <rich...@nod.at>
>> > ---
>> >  arch/um/os-Linux/user_syms.c |    5 +++++
>> >  1 files changed, 5 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c
>> > index 05f5ea8..45ffe46 100644
>> > --- a/arch/um/os-Linux/user_syms.c
>> > +++ b/arch/um/os-Linux/user_syms.c
>> > @@ -113,3 +113,8 @@ EXPORT_SYMBOL(__stack_smash_handler);
>> >
>> >  extern long __guard __attribute__((weak));
>> >  EXPORT_SYMBOL(__guard);
>> > +
>> > +#ifdef _FORTIFY_SOURCE
>> > +extern int __sprintf_chk(char *str, int flag, size_t strlen, const char
>> > *format); +EXPORT_SYMBOL(__sprintf_chk);
>> > +#endif
>> > --
>>
>> Can you please clarify why it's needed? I use FORTIFY_SOURCES on
>> Linus' tree UML on Ubuntu w/ no problems and w/o this patch...
>
> The problem appears only when a UML kernel module is using sprintf().
> E.g: CONFIG_UML_WATCHDOG.
> Then loading the module will fail because of the missing symbol 
> __sprintf_chk().

Thanks.

Acked-by: Vitaliy Ivanov <vitaliva...@gmail.com>

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to