[PATCH v5] kernel: add panic_on_taint

2020-05-15 Thread Rafael Aquini
is allowed for the running system. The optional switch 'nousertaint' is handy in this particular scenario, as it will avoid userspace induced crashes by writes to sysctl interface /proc/sys/kernel/tainted causing false positive hits for such policies. Suggested-by: Qian Cai Signed-o

Re: [PATCH v4] kernel: add panic_on_taint

2020-05-13 Thread Rafael Aquini
On Wed, May 13, 2020 at 03:47:22PM +, Luis Chamberlain wrote: > On Wed, May 13, 2020 at 11:00:26AM -0400, Rafael Aquini wrote: > > Analogously to the introduction of panic_on_warn, this patch > > introduces a kernel option named panic_on_taint in order to > > provide a s

[PATCH v4] kernel: add panic_on_taint

2020-05-13 Thread Rafael Aquini
anoid mode), is allowed for the running system. The optional switch 'nousertaint' is handy in this particular scenario as it will avoid userspace induced crashes by writes to /proc/sys/kernel/tainted causing false positive hits for such policies. Suggested-by: Qian Cai Signed-o

Re: [PATCH v3] kernel: add panic_on_taint

2020-05-11 Thread Rafael Aquini
On Mon, May 11, 2020 at 06:24:55PM +, Luis Chamberlain wrote: > On Sat, May 09, 2020 at 09:57:37AM -0400, Rafael Aquini wrote: > > +Trigger Kdump on add_taint() > > + > > + > > +The kernel parameter, panic_on_taint, calls panic()

Re: [PATCH v3] kernel: add panic_on_taint

2020-05-10 Thread Rafael Aquini
On Sun, May 10, 2020 at 10:59:21AM +0800, Baoquan He wrote: > On 05/09/20 at 09:57am, Rafael Aquini wrote: > > Analogously to the introduction of panic_on_warn, this patch > > introduces a kernel option named panic_on_taint in order to > > provide a simple and generic way

Re: [PATCH v2] kernel: add panic_on_taint

2020-05-09 Thread Rafael Aquini
On Sat, May 09, 2020 at 03:48:54AM +, Luis Chamberlain wrote: > On Fri, May 08, 2020 at 08:47:19AM -0400, Rafael Aquini wrote: > > On Thu, May 07, 2020 at 10:25:58PM +, Luis Chamberlain wrote: > > > On Thu, May 07, 2020 at 06:06:06PM -0400, Rafael Aquini wrote: > >

[PATCH v3] kernel: add panic_on_taint

2020-05-09 Thread Rafael Aquini
running system. Suggested-by: Qian Cai Signed-off-by: Rafael Aquini --- Changelog: * v2: get rid of unnecessary/misguided compiler hints (Luis) * v2: enhance documentation text for the new kernel parameter (Randy) * v3: drop sysctl interface, keep it only as a kernel parameter (Luis

Re: [PATCH v2] kernel: add panic_on_taint

2020-05-08 Thread Rafael Aquini
On Thu, May 07, 2020 at 10:25:58PM +, Luis Chamberlain wrote: > On Thu, May 07, 2020 at 06:06:06PM -0400, Rafael Aquini wrote: > > On Thu, May 07, 2020 at 08:33:40PM +, Luis Chamberlain wrote: > > > I *think* that a cmdline route to enable this would likely remove the

Re: [PATCH] kernel: add panic_on_taint

2020-05-07 Thread Rafael Aquini
On Thu, May 07, 2020 at 07:07:20PM -0400, Qian Cai wrote: > > > > On May 7, 2020, at 6:15 PM, Rafael Aquini wrote: > > > > It's a reasonable and self-contained feature that we have a valid use for. > > I honestly fail to see it causing that amount of annoya

Re: [PATCH] kernel: add panic_on_taint

2020-05-07 Thread Rafael Aquini
On Thu, May 07, 2020 at 06:05:27PM -0400, Qian Cai wrote: > > > > On May 7, 2020, at 4:42 PM, Rafael Aquini wrote: > > > > On Wed, May 06, 2020 at 10:50:19PM -0400, Qian Cai wrote: > >> > >> > >>> On May 6, 2020, at 6:28 PM, Rafael Aquin

Re: [PATCH v2] kernel: add panic_on_taint

2020-05-07 Thread Rafael Aquini
On Thu, May 07, 2020 at 08:33:40PM +, Luis Chamberlain wrote: > On Thu, May 07, 2020 at 02:47:05PM -0400, Rafael Aquini wrote: > > On Thu, May 07, 2020 at 02:43:16PM -0400, Rafael Aquini wrote: > > > On Thu, May 07, 2020 at 06:22:57PM +, Luis Chamberlain wrote: > >

Re: [PATCH] kernel: add panic_on_taint

2020-05-07 Thread Rafael Aquini
On Wed, May 06, 2020 at 10:50:19PM -0400, Qian Cai wrote: > > > > On May 6, 2020, at 6:28 PM, Rafael Aquini wrote: > > > > Analogously to the introduction of panic_on_warn, this patch > > introduces a kernel option named panic_on_taint in order to > > prov

Re: [PATCH v2] kernel: add panic_on_taint

2020-05-07 Thread Rafael Aquini
On Thu, May 07, 2020 at 06:50:46PM +, Luis Chamberlain wrote: > On Thu, May 07, 2020 at 02:06:31PM -0400, Rafael Aquini wrote: > > Another, perhaps less frequent, use for this option would be > > as a mean for assuring a security policy (in paranoid mode) > > case whe

Re: [PATCH v2] kernel: add panic_on_taint

2020-05-07 Thread Rafael Aquini
On Thu, May 07, 2020 at 02:43:16PM -0400, Rafael Aquini wrote: > On Thu, May 07, 2020 at 06:22:57PM +, Luis Chamberlain wrote: > > On Thu, May 07, 2020 at 02:06:31PM -0400, Rafael Aquini wrote: > > > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > > > index 8a176d

Re: [PATCH v2] kernel: add panic_on_taint

2020-05-07 Thread Rafael Aquini
On Thu, May 07, 2020 at 06:22:57PM +, Luis Chamberlain wrote: > On Thu, May 07, 2020 at 02:06:31PM -0400, Rafael Aquini wrote: > > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > > index 8a176d8727a3..b80ab660d727 100644 > > --- a/kernel/sysctl.c > > +++ b/ker

[PATCH v2] kernel: add panic_on_taint

2020-05-07 Thread Rafael Aquini
running system. Suggested-by: Qian Cai Signed-off-by: Rafael Aquini --- Changelog, from v1: * get rid of unnecessary/misguided compiler hints (Luis) * enhance documentation text for the new kernel parameter (Randy) Documentation/admin-guide/kdump/kdump.rst | 10

Re: [PATCH] kernel: add panic_on_taint

2020-05-06 Thread Rafael Aquini
On Wed, May 06, 2020 at 11:24:48PM +, Luis Chamberlain wrote: > On Wed, May 06, 2020 at 06:28:15PM -0400, Rafael Aquini wrote: > > Analogously to the introduction of panic_on_warn, this patch > > introduces a kernel option named panic_on_taint in order to > > provide a s

[PATCH] kernel: add panic_on_taint

2020-05-06 Thread Rafael Aquini
running system. Suggested-by: Qian Cai Signed-off-by: Rafael Aquini --- Documentation/admin-guide/kdump/kdump.rst | 10 ++ .../admin-guide/kernel-parameters.txt | 3 ++ Documentation/admin-guide/sysctl/kernel.rst | 36 +++ include/linux/kernel.h