mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Madhavan Srinivasan <maddy@linux.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	Naveen N Rao <naveen@kernel.org>,
	Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	Erhard Furtner <erhard_f@mailbox.org>
Subject: Re: [PATCH v2] powerpc/code-patching: Fix KASAN hit by not flagging text patching area as VM_ALLOC
Date: Fri, 14 Feb 2025 18:23:03 +0530	[thread overview]
Message-ID: <173953661683.199877.9730863250927440226.b4-ty@linux.ibm.com> (raw)
In-Reply-To: <06621423da339b374f48c0886e3a5db18e896be8.1739342693.git.christophe.leroy@csgroup.eu>

On Wed, 12 Feb 2025 07:46:28 +0100, Christophe Leroy wrote:
> Erhard reported the following KASAN hit while booting his PowerMac G4
> with a KASAN-enabled kernel 6.13-rc6:
> 
>   BUG: KASAN: vmalloc-out-of-bounds in copy_to_kernel_nofault+0xd8/0x1c8
>   Write of size 8 at addr f1000000 by task chronyd/1293
> 
>   CPU: 0 UID: 123 PID: 1293 Comm: chronyd Tainted: G        W          6.13.0-rc6-PMacG4 #2
>   Tainted: [W]=WARN
>   Hardware name: PowerMac3,6 7455 0x80010303 PowerMac
>   Call Trace:
>   [c2437590] [c1631a84] dump_stack_lvl+0x70/0x8c (unreliable)
>   [c24375b0] [c0504998] print_report+0xdc/0x504
>   [c2437610] [c050475c] kasan_report+0xf8/0x108
>   [c2437690] [c0505a3c] kasan_check_range+0x24/0x18c
>   [c24376a0] [c03fb5e4] copy_to_kernel_nofault+0xd8/0x1c8
>   [c24376c0] [c004c014] patch_instructions+0x15c/0x16c
>   [c2437710] [c00731a8] bpf_arch_text_copy+0x60/0x7c
>   [c2437730] [c0281168] bpf_jit_binary_pack_finalize+0x50/0xac
>   [c2437750] [c0073cf4] bpf_int_jit_compile+0xb30/0xdec
>   [c2437880] [c0280394] bpf_prog_select_runtime+0x15c/0x478
>   [c24378d0] [c1263428] bpf_prepare_filter+0xbf8/0xc14
>   [c2437990] [c12677ec] bpf_prog_create_from_user+0x258/0x2b4
>   [c24379d0] [c027111c] do_seccomp+0x3dc/0x1890
>   [c2437ac0] [c001d8e0] system_call_exception+0x2dc/0x420
>   [c2437f30] [c00281ac] ret_from_syscall+0x0/0x2c
>   --- interrupt: c00 at 0x5a1274
>   NIP:  005a1274 LR: 006a3b3c CTR: 005296c8
>   REGS: c2437f40 TRAP: 0c00   Tainted: G        W           (6.13.0-rc6-PMacG4)
>   MSR:  0200f932 <VEC,EE,PR,FP,ME,IR,DR,RI>  CR: 24004422  XER: 00000000
> 
> [...]

Applied to powerpc/fixes.

[1/1] powerpc/code-patching: Fix KASAN hit by not flagging text patching area as VM_ALLOC
      https://git.kernel.org/powerpc/c/d262a192d38e527faa5984629aabda2e0d1c4f54

Thanks

      reply	other threads:[~2025-02-14 12:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12  6:46 Christophe Leroy
2025-02-14 12:53 ` Madhavan Srinivasan [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=173953661683.199877.9730863250927440226.b4-ty@linux.ibm.com \
    --to=maddy@linux.ibm.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=erhard_f@mailbox.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=naveen@kernel.org \
    --cc=npiggin@gmail.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®