stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Cc: stable@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kees Cook <keescook@chromium.org>, SeongJae Park <sj@kernel.org>,
	Seth Jenkins <sethjenkins@google.com>,
	Jann Horn <jannh@google.com>,
	"Eric W . Biederman" <ebiederm@xmission.com>,
	linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
	Luis Chamberlain <mcgrof@kernel.org>,
	Vegard Nossum <vegard.nossum@oracle.com>,
	Darren Kenny <darren.kenny@oracle.com>
Subject: Re: [PATCH 5.15 13/20] exit: Put an upper limit on how often we can oops
Date: Wed, 25 Jan 2023 10:44:23 -0800	[thread overview]
Message-ID: <Y9F4hxtZnE2GssUo@sol.localdomain> (raw)
In-Reply-To: <033ca877-5091-cbfb-6e6c-e49c4adb9a10@oracle.com>

Hi Harshit,

On Wed, Jan 25, 2023 at 07:39:10PM +0530, Harshit Mogalapalli wrote:
> 
> Thanks for the backports.
> 
> I have tried backporting the oops_limit patches to LTS 5.15.y and had a
> similar set of patches, just want to add a note here on an alternate way for
> backporting this patch without resolving conflicts manually:
> 
> Here is the sequence:
> 
> * Patch 12:  [panic: Separate sysctl logic from CONFIG_SMP]
> --> Cherry-pick Commit: 05ea0424f0e2 ("exit: Move oops specific logic from
> do_exit into make_task_dead") upstream
> --> Cherry-pick Commit: de77c3a5b95c ("exit: Move force_uaccess back into
> do_exit") upstream
> * Patch 13 which is Commit: d4ccd54d28d3 ("exit: Put an upper limit on how
> often we can oops") upstream, will be a clean cherry-pick.
> 
> The benefit may be making future backports simpler in make_task_dead().
> 
> This was the only difference, so your backport looks good to me.
> 

It's certainly an option.  The reason why I didn't do it that way is to reduce
the impact of any potential bugs where do_exit() is still called when the new
make_task_dead() function should be used instead.  With my series, the effect is
just that oops_limit won't take effect in such cases.  If we also backported
commit 05ea0424f0e2 ("exit: Move oops specific logic from do_exit into
make_task_dead"), then do_exit() will lose various other things, such as
panicing when called from an interrupt handler.  That would increase the chance
of regressions, unless we made absolutely sure that everywhere that should be
using make_task_dead() is indeed using it instead of do_exit().

Commit 0e25498f8cd4 ("exit: Add and use make_task_dead."), which I backported,
did the vast majority of conversions to make_task_dead().

Some architectures still have uses of do_exit() that got cleaned up later,
though.  It seems it was mostly unreachable code, and some cases that should
have been doing something else such as BUG() or sending a signal to userspace.
So, generally not super important cases.

Still, getting all that would bring in many more patches.  We could do that, but
since this is already a 20-patch series, I wanted to limit the scope a bit.
These extra patches could always be backported later on top of this if desired.

- Eric

  reply	other threads:[~2023-01-25 18:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 18:50 [PATCH 5.15 00/20] Backport oops_limit to 5.15 Eric Biggers
2023-01-24 18:50 ` [PATCH 5.15 01/20] sysctl: add a new register_sysctl_init() interface Eric Biggers
2023-01-24 18:50 ` [PATCH 5.15 02/20] kernel/panic: move panic sysctls to its own file Eric Biggers
2023-01-24 18:50 ` [PATCH 5.15 03/20] panic: unset panic_on_warn inside panic() Eric Biggers
2023-01-24 18:50 ` [PATCH 5.15 04/20] ubsan: no need to unset panic_on_warn in ubsan_epilogue() Eric Biggers
2023-01-24 18:50 ` [PATCH 5.15 05/20] kasan: no need to unset panic_on_warn in end_report() Eric Biggers
2023-01-24 18:50 ` [PATCH 5.15 06/20] exit: Add and use make_task_dead Eric Biggers
2023-01-24 18:50 ` [PATCH 5.15 07/20] objtool: Add a missing comma to avoid string concatenation Eric Biggers
2023-01-24 18:50 ` [PATCH 5.15 08/20] hexagon: Fix function name in die() Eric Biggers
2023-01-24 18:50 ` [PATCH 5.15 09/20] h8300: Fix build errors from do_exit() to make_task_dead() transition Eric Biggers
2023-01-24 18:51 ` [PATCH 5.15 10/20] csky: Fix function name in csky_alignment() and die() Eric Biggers
2023-01-24 18:51 ` [PATCH 5.15 11/20] ia64: make IA64_MCA_RECOVERY bool instead of tristate Eric Biggers
2023-01-24 18:51 ` [PATCH 5.15 12/20] panic: Separate sysctl logic from CONFIG_SMP Eric Biggers
2023-01-24 18:51 ` [PATCH 5.15 13/20] exit: Put an upper limit on how often we can oops Eric Biggers
2023-01-25 14:09   ` Harshit Mogalapalli
2023-01-25 18:44     ` Eric Biggers [this message]
2023-01-25 18:59       ` Harshit Mogalapalli
2023-01-24 18:51 ` [PATCH 5.15 14/20] exit: Expose "oops_count" to sysfs Eric Biggers
2023-01-24 18:51 ` [PATCH 5.15 15/20] exit: Allow oops_limit to be disabled Eric Biggers
2023-01-24 18:51 ` [PATCH 5.15 16/20] panic: Consolidate open-coded panic_on_warn checks Eric Biggers
2023-01-24 18:51 ` [PATCH 5.15 17/20] panic: Introduce warn_limit Eric Biggers
2023-01-24 18:51 ` [PATCH 5.15 18/20] panic: Expose "warn_count" to sysfs Eric Biggers
2023-01-24 18:51 ` [PATCH 5.15 19/20] docs: Fix path paste-o for /sys/kernel/warn_count Eric Biggers
2023-01-24 18:51 ` [PATCH 5.15 20/20] exit: Use READ_ONCE() for all oops/warn limit reads Eric Biggers
2023-01-27  2:08 ` [PATCH 5.15 00/20] Backport oops_limit to 5.15 Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y9F4hxtZnE2GssUo@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=darren.kenny@oracle.com \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=harshit.m.mogalapalli@oracle.com \
    --cc=jannh@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=sethjenkins@google.com \
    --cc=sj@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vegard.nossum@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).