I need to send a string from kernel to a user space function without asking for it in particular from the user space, sort of triggering a function or application in the use
Signals. User process defines a signal handler, and kernel signals the user process upon receipt of an event. This works well, but requires that the handling code run in an async signal handler (which makes it trickier to write correct code). The downside is that the amount of data you can transmit using a signal handler is somewhat limited. Make sure to use a signal that can be queued (e.g. a realtime signal) so you don't lose messages when the process is in the middle of handling a signal.
Blocking system call or file access. User process executes a system call (or reads/writes a file) which puts it to sleep. The kernel driver for the call maintains a queue of events, and dequeues events when they arrive and when a blocked waiter exists (this avoids losing events when the user process is unblocked).
Create a system call which configures a sigevent. On the kernel side, create a sigqueue to fire the relevant events.