public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Nam Cao <namcao@linutronix.de>, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH stable v6.6] riscv: Pass patch_text() the length in bytes
Date: Thu,  8 May 2025 12:17:47 -0400	[thread overview]
Message-ID: <20250507075823-74ae3d0ba9940f62@stable.kernel.org> (raw)
In-Reply-To: <20250506201752.1915639-1-namcao@linutronix.de>

[ Sasha's backport helper bot ]

Hi,

✅ All tests passed successfully. No issues detected.
No action required from the submitter.

The upstream commit SHA1 provided is correct: 51781ce8f4486c3738a6c85175b599ad1be71f89

WARNING: Author mismatch between patch and upstream commit:
Backport author: Nam Cao<namcao@linutronix.de>
Commit author: Samuel Holland<samuel.holland@sifive.com>

Status in newer kernel trees:
6.14.y | Present (exact SHA1)
6.12.y | Present (exact SHA1)

Note: The patch differs from the upstream commit:
---
1:  51781ce8f4486 ! 1:  1bc29061a4457 riscv: Pass patch_text() the length in bytes
    @@ Metadata
      ## Commit message ##
         riscv: Pass patch_text() the length in bytes
     
    +    [ Upstream commit 51781ce8f4486c3738a6c85175b599ad1be71f89 ]
    +
         patch_text_nosync() already handles an arbitrary length of code, so this
         removes a superfluous loop and reduces the number of icache flushes.
     
    @@ Commit message
         Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
         Link: https://lore.kernel.org/r/20240327160520.791322-6-samuel.holland@sifive.com
         Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
    +    [apply to v6.6]
    +    Signed-off-by: Nam Cao <namcao@linutronix.de>
     
      ## arch/riscv/include/asm/patch.h ##
     @@
    @@ arch/riscv/kernel/probes/kprobes.c: post_kprobe_handler(struct kprobe *, struct
     +	p->ainsn.api.restore = (unsigned long)p->addr + len;
      
     -	patch_text_nosync(p->ainsn.api.insn, &p->opcode, 1);
    --	patch_text_nosync(p->ainsn.api.insn + offset, &insn, 1);
    +-	patch_text_nosync((void *)p->ainsn.api.insn + offset, &insn, 1);
     +	patch_text_nosync(p->ainsn.api.insn, &p->opcode, len);
    -+	patch_text_nosync(p->ainsn.api.insn + len, &insn, GET_INSN_LENGTH(insn));
    ++	patch_text_nosync((void *)p->ainsn.api.insn + len, &insn, GET_INSN_LENGTH(insn));
      }
      
      static void __kprobes arch_prepare_simulate(struct kprobe *p)
    -@@ arch/riscv/kernel/probes/kprobes.c: int __kprobes arch_prepare_kprobe(struct kprobe *p)
    +@@ arch/riscv/kernel/probes/kprobes.c: void *alloc_insn_page(void)
      /* install breakpoint in text */
      void __kprobes arch_arm_kprobe(struct kprobe *p)
      {
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.6.y        |  Success    |  Success   |

      reply	other threads:[~2025-05-08 16:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06 20:17 [PATCH stable v6.6] riscv: Pass patch_text() the length in bytes Nam Cao
2025-05-08 16:17 ` Sasha Levin [this message]

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=20250507075823-74ae3d0ba9940f62@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=namcao@linutronix.de \
    --cc=stable@vger.kernel.org \
    /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