mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Gordeev <agordeev@linux.ibm.com>
To: Heiko Carstens <hca@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [PATCH 1/2] s390/entry: Last breaking event vs invalid kernel stack
Date: Tue, 13 Oct 2026 09:56:14 +0200	[thread overview]
Message-ID: <1a65c29c-60aa-48c4-b82f-ae746d3f0781-agordeev@linux.ibm.com> (raw)
In-Reply-To: <20261002152055.3305184-2-hca@linux.ibm.com>

On Fri, Oct 02, 2026 at 05:20:54PM +0200, Heiko Carstens wrote:
> In case an invalid kernel stack is detected the last breaking event
> address is copied to the orig_gpr2 member of the generated pt_regs
> structure. Correct location would be last_break. Fix this.
> 
> This adds help information to the printed messages:
> 
> Before:
> Kernel stack pointer invalid
> ...
> Last Breaking-Event-Address:
>  [<0000000000000000>] 0x0
> 
> After:
> Kernel stack pointer invalid
> ...
> Last Breaking-Event-Address:
>  [<000001b802c1ae1c>] proc_reg_write+0x5c/0xd0
> 
> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
> ---
>  arch/s390/kernel/entry.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
> index 10dd9bbdf985..4e99ed559dbd 100644
> --- a/arch/s390/kernel/entry.S
> +++ b/arch/s390/kernel/entry.S
> @@ -622,7 +622,7 @@ SYM_CODE_START(stack_invalid)
>  	stmg	%r8,%r9,__PT_PSW(%r11)
>  	mvc	__PT_R8(64,%r11),0(%r14)
>  	GET_LC	%r2
> -	mvc	__PT_ORIG_GPR2(8,%r11),__LC_PGM_LAST_BREAK(%r2)
> +	mvc	__PT_LAST_BREAK(8,%r11),__LC_PGM_LAST_BREAK(%r2)
>  	xc	__SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
>  	lgr	%r2,%r11		# pass pointer to pt_regs
>  	jg	kernel_stack_invalid

Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>

  reply	other threads:[~2026-10-13  7:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02 15:20 [PATCH 0/2] s390: Improve handling for stack register corruption Heiko Carstens
2026-10-02 15:20 ` [PATCH 1/2] s390/entry: Last breaking event vs invalid kernel stack Heiko Carstens
2026-10-13  7:56   ` Alexander Gordeev [this message]
2026-10-02 15:20 ` [PATCH 2/2] s390/entry: Save lowcore on " Heiko Carstens
2026-10-13 11:55   ` Alexander Gordeev

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=1a65c29c-60aa-48c4-b82f-ae746d3f0781-agordeev@linux.ibm.com \
    --to=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=svens@linux.ibm.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

all inboxes | Powered by JetHome®