Re: How to signal kernel that shared library is not in use by any process anymore ?

2018-12-21 Thread Bernd Petrovitsch
Hi all! On 21/12/2018 15:20, Lev Olshvang wrote: [...] > I have an executable (C++) which is the exclusive user of the some shared > library that it uses only during the initialization phase. > > I would like to free memory used by this shared library, because I am running > on embedded

Re: In a process context kernel_read returns -EINTR, how to proceed?

2018-12-21 Thread valdis . kletnieks
On Fri, 21 Dec 2018 16:51:29 +0300, Lev Olshvang said: > I need to read file inside LSM hook and I can not do it in user space Why? And which LSM hook are you trying to do this? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org

Re: How to signal kernel that shared library is not in use by any process anymore ?

2018-12-21 Thread Greg KH
On Fri, Dec 21, 2018 at 05:20:36PM +0300, Lev Olshvang wrote: > > Hi All, > > I have an executable (C++) which is the exclusive user of the some shared > library that it uses only during the initialization phase. > > I would like to free memory used by this shared library, because I am

How to signal kernel that shared library is not in use by any process anymore ?

2018-12-21 Thread Lev Olshvang
Hi All, I have an executable (C++) which is the exclusive user of the some shared library that it uses only during the initialization phase. I would like to free memory used by this shared library, because I am running on embedded system. How can I achieve this? I know that dlopen() will

Re: In a process context kernel_read returns -EINTR, how to proceed?

2018-12-21 Thread Greg KH
On Fri, Dec 21, 2018 at 04:51:29PM +0300, Lev Olshvang wrote: > Hi Valdis, > > I need to read file inside LSM hook and I can not do it in user space > I forgot o mention that same error occurried both in 4.4 and 4.13 kernels > What alternative you can recommend to read file in kernel and avoid

Re: In a process context kernel_read returns -EINTR, how to proceed?

2018-12-21 Thread Lev Olshvang
Hi Valdis, I need to read file inside LSM hook and I can not do it in user space I forgot o mention that same error occurried both in 4.4 and 4.13 kernels What alternative you can recommend to read file in kernel and avoid -EINTR? Is vfs_read() different from kernel_read() ? ThanX Lev