Re: platform device as parent of a miscdevice

2021-03-30 Thread Greg KH
On Tue, Mar 30, 2021 at 09:27:17PM +0200, Martin Kaiser wrote: > > What in-kernel misc drivers do not do that that you feel should? > > My misunderstanding was that quite a few drivers set the parent pointer > but hardly anyone uses the parent pointer in the file_operations. What parent pointer

Re: platform device as parent of a miscdevice

2021-03-30 Thread Martin Kaiser
Hi Greg and all, Thus wrote Greg KH (g...@kroah.com): > Not at all, this is what you should be done, and is what many misc > devices do, that's why the parent pointer is there :) thanks for the confirmation. > What in-kernel misc drivers do not do that that you feel should? My

Re: Notify special task kill using wait* functions

2021-03-30 Thread Valdis Klētnieks
On Tue, 30 Mar 2021 19:34:59 +0200, John Wood said: > The question is: How can I notify to wait* functions that the task has > been killed by the "Brute" LSM. What wait* functions even *care* that your LSM was what killed it? If you're caring about somehow notifying userspace that it was your

Notify special task kill using wait* functions

2021-03-30 Thread John Wood
Hi, I'm working in a LSM whose goal is to detect and mitigate fork brute force attacks against vulnerable userspace applications. The detection and mitigation works as expected by I'm stuck at this point. The mitigation method used is to kill all the offending tasks involved in the attack. To do

Re: platform device as parent of a miscdevice

2021-03-30 Thread Greg KH
On Tue, Mar 30, 2021 at 06:04:09PM +0200, Martin Kaiser wrote: > Yet again, this seems to work ok. I was surprised to see that there's > very few (if any) mainline drivers that do something similar. Does this > approach make sense? Does it have any implications that I should be > aware of (e.g.

platform device as parent of a miscdevice

2021-03-30 Thread Martin Kaiser
Hi all, I have a driver that is bound to a platform device. It creates a miscdevice to interact with user space. And it has a "global" structure that stores info which are used throughout the driver. This works ok as far as I can see. The only issue is how to make the "global" struct available

Re: Compiling kernel-3.4.xxx with gcc-9.x. Need some help.

2021-03-30 Thread Greg KH
On Tue, Mar 30, 2021 at 03:23:10PM +0200, Fawad Lateef wrote: > So can I still use kernel-3.4 compiled with gcc-5.5, and boot full > user-space with gcc-9.1? Yes, of course. > I was expecting it to be possible but might not work due to > incompatibility? As I know that when I tried to compile

Re: Compiling kernel-3.4.xxx with gcc-9.x. Need some help.

2021-03-30 Thread Fawad Lateef
Hi Arnd, On Mon, 29 Mar 2021 at 22:06, Arnd Bergmann wrote: > > On Mon, Mar 29, 2021 at 9:23 PM Fawad Lateef wrote: > > > > On Mon, 29 Mar 2021 at 06:57, Greg KH wrote: > > > > > > On Sun, Mar 28, 2021 at 10:20:50PM +0200, Fawad Lateef wrote: > > > > Hi > > > > > > > > I am using an Olimex

Unable to boot to kernel built from stable 5.11.y

2021-03-30 Thread Andrew Adamson
Hi Everyone, I tried to build the kernel myself for the first a few days ago. While the build was successful, I am unable to boot to it. After grub I get a blinking cursor for 15 to 30 minutes, and then a message that says "Please reboot and select proper boot device." Since ubuntu ships with a