* Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate [not found] ` <20210406003152.GZ4332@42.do-not-panic.com> @ 2021-04-06 12:00 ` Miroslav Benes 2021-04-06 15:54 ` Josh Poimboeuf 0 siblings, 1 reply; 5+ messages in thread From: Miroslav Benes @ 2021-04-06 12:00 UTC (permalink / raw) To: Greg KH, Luis Chamberlain Cc: mbenes, Minchan Kim, keescook, dhowells, hch, ngupta, sergey.senozhatsky.work, axboe, linux-block, linux-kernel, live-patching Hi, > > Driver developers will simply have to open code these protections. In > > light of what I see on LTP / fuzzing, I suspect the use case will grow > > and we'll have to revisit this in the future. But for now, sure, we can > > just open code the required protections everywhere to not crash on module > > removal. > > LTP and fuzzing too do not remove modules. So I do not understand the > root problem here, that's just something that does not happen on a real > system. If I am not mistaken, the issue that Luis tries to solve here was indeed found by running LTP. > On Sat, Apr 03, 2021 at 08:13:23AM +0200, Greg KH wrote: > > On Fri, Apr 02, 2021 at 06:30:16PM +0000, Luis Chamberlain wrote: > > > On Fri, Apr 02, 2021 at 09:54:12AM +0200, Greg KH wrote: > > > > No, please no. Module removal is a "best effort", > > > > > > Not for live patching. I am not sure if I am missing any other valid > > > use case? > > > > live patching removes modules? We have so many code paths that are > > "best effort" when it comes to module unloading, trying to resolve this > > one is a valiant try, but not realistic. > > Miroslav, your input / help here would be valuable. I did the > generalization work because you said it would be worthy for you too... Yes, we have the option to revert and remove the existing live patch from the system. I am not sure how (if) it is used in practice. At least at SUSE we do not support the option. But we are only one of the many downstream users. So yes, there is the option. Miroslav ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate 2021-04-06 12:00 ` [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate Miroslav Benes @ 2021-04-06 15:54 ` Josh Poimboeuf 2021-04-07 14:09 ` Peter Zijlstra 0 siblings, 1 reply; 5+ messages in thread From: Josh Poimboeuf @ 2021-04-06 15:54 UTC (permalink / raw) To: Miroslav Benes Cc: Greg KH, Luis Chamberlain, mbenes, Minchan Kim, keescook, dhowells, hch, ngupta, sergey.senozhatsky.work, axboe, linux-block, linux-kernel, live-patching, Jessica Yu, Peter Zijlstra On Tue, Apr 06, 2021 at 02:00:19PM +0200, Miroslav Benes wrote: > Hi, > > > > Driver developers will simply have to open code these protections. In > > > light of what I see on LTP / fuzzing, I suspect the use case will grow > > > and we'll have to revisit this in the future. But for now, sure, we can > > > just open code the required protections everywhere to not crash on module > > > removal. > > > > LTP and fuzzing too do not remove modules. So I do not understand the > > root problem here, that's just something that does not happen on a real > > system. > > If I am not mistaken, the issue that Luis tries to solve here was indeed > found by running LTP. > > > On Sat, Apr 03, 2021 at 08:13:23AM +0200, Greg KH wrote: > > > On Fri, Apr 02, 2021 at 06:30:16PM +0000, Luis Chamberlain wrote: > > > > On Fri, Apr 02, 2021 at 09:54:12AM +0200, Greg KH wrote: > > > > > No, please no. Module removal is a "best effort", > > > > > > > > Not for live patching. I am not sure if I am missing any other valid > > > > use case? > > > > > > live patching removes modules? We have so many code paths that are > > > "best effort" when it comes to module unloading, trying to resolve this > > > one is a valiant try, but not realistic. > > > > Miroslav, your input / help here would be valuable. I did the > > generalization work because you said it would be worthy for you too... > > Yes, we have the option to revert and remove the existing live patch from > the system. I am not sure how (if) it is used in practice. > > At least at SUSE we do not support the option. But we are only one of the > many downstream users. So yes, there is the option. Same for Red Hat. Unloading livepatch modules seems to work fine, but isn't officially supported. That said, if rmmod is just considered a development aid, and we're going to be ignoring bugs, we should make it official with a new TAINT_RMMOD. -- Josh ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate 2021-04-06 15:54 ` Josh Poimboeuf @ 2021-04-07 14:09 ` Peter Zijlstra 2021-04-07 15:30 ` Josh Poimboeuf 0 siblings, 1 reply; 5+ messages in thread From: Peter Zijlstra @ 2021-04-07 14:09 UTC (permalink / raw) To: Josh Poimboeuf Cc: Miroslav Benes, Greg KH, Luis Chamberlain, mbenes, Minchan Kim, keescook, dhowells, hch, ngupta, sergey.senozhatsky.work, axboe, linux-block, linux-kernel, live-patching, Jessica Yu On Tue, Apr 06, 2021 at 10:54:23AM -0500, Josh Poimboeuf wrote: > Same for Red Hat. Unloading livepatch modules seems to work fine, but > isn't officially supported. > > That said, if rmmod is just considered a development aid, and we're > going to be ignoring bugs, we should make it official with a new > TAINT_RMMOD. Another option would be to have live-patch modules leak a module reference by default, except when some debug sysctl is set or something. Then only those LP modules loaded while the sysctl is set to 'YOLO' can be unloaded. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate 2021-04-07 14:09 ` Peter Zijlstra @ 2021-04-07 15:30 ` Josh Poimboeuf 2021-04-07 16:48 ` Peter Zijlstra 0 siblings, 1 reply; 5+ messages in thread From: Josh Poimboeuf @ 2021-04-07 15:30 UTC (permalink / raw) To: Peter Zijlstra Cc: Miroslav Benes, Greg KH, Luis Chamberlain, mbenes, Minchan Kim, keescook, dhowells, hch, ngupta, sergey.senozhatsky.work, axboe, linux-block, linux-kernel, live-patching, Jessica Yu On Wed, Apr 07, 2021 at 04:09:44PM +0200, Peter Zijlstra wrote: > On Tue, Apr 06, 2021 at 10:54:23AM -0500, Josh Poimboeuf wrote: > > > Same for Red Hat. Unloading livepatch modules seems to work fine, but > > isn't officially supported. > > > > That said, if rmmod is just considered a development aid, and we're > > going to be ignoring bugs, we should make it official with a new > > TAINT_RMMOD. > > Another option would be to have live-patch modules leak a module > reference by default, except when some debug sysctl is set or something. > Then only those LP modules loaded while the sysctl is set to 'YOLO' can > be unloaded. The issue is broader than just live patching. My suggestion was that if we aren't going to fix bugs in kernel module unloading, then unloading modules shouldn't be supported, and should taint the kernel. -- Josh ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate 2021-04-07 15:30 ` Josh Poimboeuf @ 2021-04-07 16:48 ` Peter Zijlstra 0 siblings, 0 replies; 5+ messages in thread From: Peter Zijlstra @ 2021-04-07 16:48 UTC (permalink / raw) To: Josh Poimboeuf Cc: Miroslav Benes, Greg KH, Luis Chamberlain, mbenes, Minchan Kim, keescook, dhowells, hch, ngupta, sergey.senozhatsky.work, axboe, linux-block, linux-kernel, live-patching, Jessica Yu On Wed, Apr 07, 2021 at 10:30:31AM -0500, Josh Poimboeuf wrote: > On Wed, Apr 07, 2021 at 04:09:44PM +0200, Peter Zijlstra wrote: > > On Tue, Apr 06, 2021 at 10:54:23AM -0500, Josh Poimboeuf wrote: > > > > > Same for Red Hat. Unloading livepatch modules seems to work fine, but > > > isn't officially supported. > > > > > > That said, if rmmod is just considered a development aid, and we're > > > going to be ignoring bugs, we should make it official with a new > > > TAINT_RMMOD. > > > > Another option would be to have live-patch modules leak a module > > reference by default, except when some debug sysctl is set or something. > > Then only those LP modules loaded while the sysctl is set to 'YOLO' can > > be unloaded. > > The issue is broader than just live patching. > > My suggestion was that if we aren't going to fix bugs in kernel module > unloading, then unloading modules shouldn't be supported, and should > taint the kernel. Hold up, what? However much I dislike modules (and that is lots), if you don't want to support rmmod, you have to leak a reference to self in init. Barring that you get to fix any and all unload bugs. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-07 16:49 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20210312183238.GW4332@42.do-not-panic.com> [not found] ` <YEvA1dzDsFOuKdZ/@google.com> [not found] ` <20210319190924.GK4332@42.do-not-panic.com> [not found] ` <YFjHvUolScp3btJ9@google.com> [not found] ` <20210322204156.GM4332@42.do-not-panic.com> [not found] ` <YFkWMZ0m9nKCT69T@google.com> [not found] ` <20210401235925.GR4332@42.do-not-panic.com> [not found] ` <YGbNpLKXfWpy0ZZa@kroah.com> [not found] ` <20210402183016.GU4332@42.do-not-panic.com> [not found] ` <YGgHg7XCHD3rATIK@kroah.com> [not found] ` <20210406003152.GZ4332@42.do-not-panic.com> 2021-04-06 12:00 ` [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate Miroslav Benes 2021-04-06 15:54 ` Josh Poimboeuf 2021-04-07 14:09 ` Peter Zijlstra 2021-04-07 15:30 ` Josh Poimboeuf 2021-04-07 16:48 ` Peter Zijlstra
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).