kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Invoke Firefox from kernel space
@ 2020-10-22 23:35 Sohaib Mhmd
  2020-10-23  4:38 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Sohaib Mhmd @ 2020-10-22 23:35 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 1805 bytes --]

Hello,

I tried to use: call_usermodehelper
It worked fine with
<https://github.com/smalinux/Kernel-hacking-101/blob/master/invoke-userlevel-app.c>
/sbin/shutdown and /bin/touch
but with /bin/firefox i got kernel oops:
Any clarification, thanks

[ 2258.760627] invoke_userlevel_app: module verification failed: signature
> and/or required key missing - tainting kernel
> [ 2258.918529] do_init_module: 'invoke_userlevel_app'->init suspiciously
> returned 256, it should follow 0/-E convention
>                do_init_module: loading module anyway...
> [ 2258.918543] CPU: 1 PID: 4454 Comm: insmod Tainted: G           OE
> 5.9.0-11953-g7cf726a59435 #2
> [ 2258.918544] Hardware name: Hewlett-Packard HP ProBook 450 G1/1942, BIOS
> L74 Ver. 01.07 01/24/2014
> [ 2258.918545] Call Trace:
> [ 2258.918554]  dump_stack+0x6b/0x83
> [ 2258.918559]  do_init_module.cold+0x21/0x26
> [ 2258.918563]  __do_sys_finit_module+0x98/0xe0
> [ 2258.918566]  do_syscall_64+0x33/0x40
> [ 2258.918568]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
> [ 2258.918570] RIP: 0033:0x7f39f031837d
> [ 2258.918572] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48
> 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05
> <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d eb 6a 0c 00 f7 d8 64 89 01 48
> [ 2258.918573] RSP: 002b:00007ffd4a6b4bf8 EFLAGS: 00000246 ORIG_RAX:
> 0000000000000139
> [ 2258.918576] RAX: ffffffffffffffda RBX: 0000562b8cc9c800 RCX:
> 00007f39f031837d
> [ 2258.918577] RDX: 0000000000000000 RSI: 0000562b8be25288 RDI:
> 0000000000000003
> [ 2258.918577] RBP: 0000000000000000 R08: 0000000000000000 R09:
> 00007f39f03e34a0
> [ 2258.918578] R10: 0000000000000003 R11: 0000000000000246 R12:
> 0000000000000000
> [ 2258.918579] R13: 0000562b8be25288 R14: 0000562b8cc9f040 R15:
> 00007ffd4a6b4da8
>

[-- Attachment #1.2: Type: text/html, Size: 2124 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* Re: Invoke Firefox from kernel space
  2020-10-22 23:35 Invoke Firefox from kernel space Sohaib Mhmd
@ 2020-10-23  4:38 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2020-10-23  4:38 UTC (permalink / raw)
  To: Sohaib Mhmd; +Cc: kernelnewbies

On Fri, Oct 23, 2020 at 01:35:53AM +0200, Sohaib Mhmd wrote:
> Hello,
> 
> I tried to use: call_usermodehelper
> It worked fine with
> <https://github.com/smalinux/Kernel-hacking-101/blob/master/invoke-userlevel-app.c>
> /sbin/shutdown and /bin/touch
> but with /bin/firefox i got kernel oops:
> Any clarification, thanks
> 
> [ 2258.760627] invoke_userlevel_app: module verification failed: signature
> > and/or required key missing - tainting kernel
> > [ 2258.918529] do_init_module: 'invoke_userlevel_app'->init suspiciously
> > returned 256, it should follow 0/-E convention
> >                do_init_module: loading module anyway...

The kernel module you wrote is not handling errors properly, why ignore
the kernel's messages here?

And how can the kernel invoke a graphical program?  Please look up how
these types of programs work to see that the kernel can not directly
call them, sorry.

good luck!

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

end of thread, other threads:[~2020-10-23  4:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22 23:35 Invoke Firefox from kernel space Sohaib Mhmd
2020-10-23  4:38 ` Greg KH

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 NNTP newsgroup(s).