Re: Try/catch for modules?
On Thu, 17 Oct 2019 10:37:09 -0300, Martin Galvan said: > module does e.g. a NULL dereference. The (horribly hackish) way I'm > doing this right now is registering a die_notifier which will set the > 'panic_on_oops' variable to 0 if we detect that the current PID > corresponds to my module. However, this is ugly for many reasons. For starters, the *correct* in-kernel way to deal with this is: if (!ptr) { printk("You blew it!\n"); goto you_blew_it; } Also, "current PID" and "my module" aren't two things that can correspond For double bonus points - this sort of "ignore the error if it's my process" means that any other user can trigger the situation - and crash the system. pgprGx375JgMi.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
RE: BUG: Bad page state in process swapper on new imx8qm board
> -Original Message- > From: Oliver Graute > Sent: 2019年10月17日 15:34 > To: kernelnewbies@kernelnewbies.org; Aisheng Dong > ; Peng Fan > Subject: Re: BUG: Bad page state in process swapper on new imx8qm board > > On 16/10/19, Oliver Graute wrote: > > Hello list, > > > > I try to bootup up a new imx8qm congatec board and I have written a > > dts file for it and applied some imx8qm related patches which are not > > mainline yet but working fine on another imx8qm board (same cpu, > > different board vendor). > > > > The Kernel starts to boot. But unfortunately its stucked after few > > seconds with a lot memory/swapper issues. > > > > BUG: Bad page state in process swapper > > > > Some clue what`s going on here? > > So after some more digging I assume that this error is related to a missing > "reserved-memory" node in my devicetree. Now I need to find out how to > split up my memory the right way for this imx8qm congatec board. Which uboot release are you using? Did you include M4 image in flash.bin? Regards, Peng. > > Any hints? > > Best regards, > > Oliver ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Why linux kernel mailing list stop send email to me
On 10/17/19, Valentin Vidić wrote: > On Thu, Oct 17, 2019 at 01:29:04PM +0800, wuzhouhui wrote: >> Few days ago, I subscribe linux kernel mailing list >> (linux-ker...@vger.kernel.org). >> Subscription succeed and I got a lot of email from linux kernel. However, >> I don't >> get any new email since yesterday and it is impossible for linux kernel >> mailing >> list. So the reason should be that I have unsubscribed passively. >> >> I only receive email and never send email to linux kernel. So why I can't >> receive >> new emails? > > Maybe your mail account is over quota or blocked on the mail server > for some other reason? I was thinking similar. Something I learned on the fly is that some lists *will* silently unsubscribe us for too many bounces, soft or otherwise. I'm in my inbox ALL THE TIME. I think that's the culprit in my situation so I'm mentioning it in case that applies to anyone else's usage. The impression I'm getting is that actively using a *web based* email account while a notable quantity of email is incoming might jam up the flow. If that's what is happening, it could easily cause those "soft" bounces that high volume email lists understandably don't have the room to mitigate specifically because they *are* high volume. Just thinking out loud.. :) Cindy :) -- * runs with birdseed * ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Try/catch for modules?
you are going to use a try and catch in the kernel? On 10/17/19 9:42 AM, Maria Neptune wrote: > On Thu, Oct 17, 2019, 09:42 Maria Neptune wrote: > >> I hate to say it but honestly in a kernel module, your solution is not to >> do null dereferences. It's hard but you gotta. >> Otherwise I've seen quite a bit of error handling done with gotos (if >> ptr==0 goto error), which I believe compiles to similar code as try/except >> blocks. Unsure how you'd handle stuff that sends a signal like null >> dereferences in that way though. >> >> On Thu, Oct 17, 2019, 09:37 Martin Galvan wrote: >> >>> Hi all, >>> >>> I'm writing a kernel module, and am trying to implement some >>> exception-handling mechanism so that the system won't oops/panic if my >>> module does e.g. a NULL dereference. The (horribly hackish) way I'm >>> doing this right now is registering a die_notifier which will set the >>> 'panic_on_oops' variable to 0 if we detect that the current PID >>> corresponds to my module. However, this is ugly for many reasons. >>> >>> What would be the "standard" way of doing this? Is there something >>> like Window's try/except blocks, where I can get back control of the >>> execution flow, without having the process die? I'm aware of >>> _ASM_EXTABLE, but I understand this only works for a single >>> instruction and has other limitations. >>> >>> ___ >>> Kernelnewbies mailing list >>> Kernelnewbies@kernelnewbies.org >>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >>> >> > > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www.brooklyn-living.com Being so tracked is for FARM ANIMALS and extermination camps, but incompatible with living as a free human being. -RI Safir 2013 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Try/catch for modules?
On Thu, Oct 17, 2019, 09:42 Maria Neptune wrote: > I hate to say it but honestly in a kernel module, your solution is not to > do null dereferences. It's hard but you gotta. > Otherwise I've seen quite a bit of error handling done with gotos (if > ptr==0 goto error), which I believe compiles to similar code as try/except > blocks. Unsure how you'd handle stuff that sends a signal like null > dereferences in that way though. > > On Thu, Oct 17, 2019, 09:37 Martin Galvan wrote: > >> Hi all, >> >> I'm writing a kernel module, and am trying to implement some >> exception-handling mechanism so that the system won't oops/panic if my >> module does e.g. a NULL dereference. The (horribly hackish) way I'm >> doing this right now is registering a die_notifier which will set the >> 'panic_on_oops' variable to 0 if we detect that the current PID >> corresponds to my module. However, this is ugly for many reasons. >> >> What would be the "standard" way of doing this? Is there something >> like Window's try/except blocks, where I can get back control of the >> execution flow, without having the process die? I'm aware of >> _ASM_EXTABLE, but I understand this only works for a single >> instruction and has other limitations. >> >> ___ >> Kernelnewbies mailing list >> Kernelnewbies@kernelnewbies.org >> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Try/catch for modules?
Hi all, I'm writing a kernel module, and am trying to implement some exception-handling mechanism so that the system won't oops/panic if my module does e.g. a NULL dereference. The (horribly hackish) way I'm doing this right now is registering a die_notifier which will set the 'panic_on_oops' variable to 0 if we detect that the current PID corresponds to my module. However, this is ugly for many reasons. What would be the "standard" way of doing this? Is there something like Window's try/except blocks, where I can get back control of the execution flow, without having the process die? I'm aware of _ASM_EXTABLE, but I understand this only works for a single instruction and has other limitations. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: BUG: Bad page state in process swapper on new imx8qm board
Hello Oliver, > So after some more digging I assume that this error is related to a > missing "reserved-memory" node in my devicetree. Now I need to find > out how to split up my memory the right way for this imx8qm congatec > board. I think asking in #linux-imx (freenode) would be a much better idea. You can use https://webchat.freenode.net/ if you don't have an IRC client handy. Good luck! -- Cengiz Can ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Kernel Panic
On Thu, Oct 17, 2019 at 07:48:49AM +, Christophe DUMONT wrote: > We can put aside Java Memory Leak. > > I downgraded to kernel 3.10.0-957.27.2.el7.x86_64, there are no more crashes. > > The bug comes from ‘futex‘ syscall. What can causes that bug and how > can i investigate ? You can try to get the source for these two versions and compare. If the diff is not too big it might give you some idea what changed... -- Valentin ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
RE: Kernel Panic
We can put aside Java Memory Leak. I downgraded to kernel 3.10.0-957.27.2.el7.x86_64, there are no more crashes. The bug comes from ‘futex‘ syscall. What can causes that bug and how can i investigate ? Christophe Dumont Ligne directe : 0476842574 De : Valdis Kletnieks De la part de Valdis Kletnieks Envoyé : mercredi 16 octobre 2019 16:17 À : Christophe DUMONT Cc : kernelnewbies@kernelnewbies.org Objet : Re: Kernel Panic On Wed, 16 Oct 2019 07:34:01 -, Christophe DUMONT said: > What made me think about a memory leak is the message : Java Not Tainted > 3.10.0-1062.1.1.el7.x86_64.=20 That just tells you that the currently executing process was java. It says nothing at all about a memory leak, and as I already mentioned, if Java was leaking memory, it would almost certainly have been leaking memory on a previous kernel. The important part almost always isn't the running process, it's the kernel stack traceback, which in this case has 'futex' scribbled *all* over it. General rule of thumb: If you get more than one crash that has a similar traceback that points at a specific syscall, or file system driver, etc, the bug is almost guaranteed to be in that code. If you get a rash of crashes with *different* tracebacks, you probably have some other code that's overlaying memory. pgpChrU4nARnk.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Why linux kernel mailing list stop send email to me
On Thu, Oct 17, 2019 at 01:29:04PM +0800, wuzhouhui wrote: > Few days ago, I subscribe linux kernel mailing list > (linux-ker...@vger.kernel.org). > Subscription succeed and I got a lot of email from linux kernel. However, I > don't > get any new email since yesterday and it is impossible for linux kernel > mailing > list. So the reason should be that I have unsubscribed passively. > > I only receive email and never send email to linux kernel. So why I can't > receive > new emails? Maybe your mail account is over quota or blocked on the mail server for some other reason? -- Valentin ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: BUG: Bad page state in process swapper on new imx8qm board
On 16/10/19, Oliver Graute wrote: > Hello list, > > I try to bootup up a new imx8qm congatec board and I have written a dts > file for it and applied some imx8qm related patches which are not > mainline yet but working fine on another imx8qm board (same cpu, > different board vendor). > > The Kernel starts to boot. But unfortunately its stucked after few > seconds with a lot memory/swapper issues. > > BUG: Bad page state in process swapper > > Some clue what`s going on here? So after some more digging I assume that this error is related to a missing "reserved-memory" node in my devicetree. Now I need to find out how to split up my memory the right way for this imx8qm congatec board. Any hints? Best regards, Oliver ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies