linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thorsten Leemhuis <regressions@leemhuis.info>
To: Coly Li <colyli@suse.de>, Kent Overstreet <kent.overstreet@gmail.com>
Cc: linux-bcache@vger.kernel.org,
	"regressions@lists.linux.dev" <regressions@lists.linux.dev>,
	LKML <linux-kernel@vger.kernel.org>,
	Alexandre Pereira <alexpereira@disroot.org>
Subject: [regression] Bug 216785 - "memcpy: detected field-spanning write..." warnings with bcache
Date: Thu, 8 Dec 2022 15:53:02 +0100	[thread overview]
Message-ID: <19200730-a3ba-6f4f-bb81-71339bdbbf73@leemhuis.info> (raw)

Hi, this is your Linux kernel regression tracker speaking.

I noticed a regression report in bugzilla.kernel.org. As many (most?)
kernel developer don't keep an eye on it, I decided to forward it by
mail. Quoting some of
https://bugzilla.kernel.org/show_bug.cgi?id=216785 :

>  Alexandre Pereira 2022-12-07 18:51:55 UTC
> 
> Testing linux kernel 6.1-rc8, I have several kernel erros regarding bcache.
> 
> For context, I have a bcache configuration that is working without issues on 6.0.x and previous versions.
> 
> The errors:
> 
> dez 07 18:33:45 stormtrooper kernel: ------------[ cut here ]------------
> dez 07 18:33:45 stormtrooper kernel: memcpy: detected field-spanning write (size 264) of single field "&i->j" at drivers/md/bcache/journal.c:152 (size 240)
> dez 07 18:33:45 stormtrooper kernel: WARNING: CPU: 12 PID: 182 at drivers/md/bcache/journal.c:152 journal_read_bucket+0x476/0x5a0 [bcache]
> dez 07 18:33:45 stormtrooper kernel: Modules linked in: snd_timer crypto_simd sp5100_tco snd cryptd tpm_crb(+) pcc_cpufreq(-) rapl gigabyte_wmi wmi_bmof ccp k10temp dca s>
> dez 07 18:33:45 stormtrooper kernel: CPU: 12 PID: 182 Comm: kworker/12:1 Not tainted 6.1.0-rc8-1-cachyos-rc-lto #1 338e4715ba3f0cf5a31b9c6d6a0812b10d93e6a7
> dez 07 18:33:45 stormtrooper kernel: Hardware name: Gigabyte Technology Co., Ltd. X470 AORUS ULTRA GAMING/X470 AORUS ULTRA GAMING-CF, BIOS F62d 10/13/2021
> dez 07 18:33:45 stormtrooper kernel: Workqueue: events register_cache_worker [bcache]
> dez 07 18:33:45 stormtrooper kernel: RIP: 0010:journal_read_bucket+0x476/0x5a0 [bcache]
> dez 07 18:33:45 stormtrooper kernel: Code: 18 e9 63 fd ff ff c6 05 30 af 02 00 01 b9 f0 00 00 00 48 c7 c7 c6 e8 d5 c1 48 8b 74 24 30 48 c7 c2 8d cb d5 c1 e8 6a f0 96 f3 <>
> dez 07 18:33:45 stormtrooper kernel: RSP: 0018:ffffb1688085fbc8 EFLAGS: 00010246
> dez 07 18:33:45 stormtrooper kernel: RAX: 3e6a0611f0c96400 RBX: ffffb1688085fd58 RCX: 0000000000000027
> dez 07 18:33:45 stormtrooper kernel: RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffff9e38eed21688
> dez 07 18:33:45 stormtrooper kernel: RBP: ffff9e35c50f1600 R08: 0000000000000000 R09: ffff9e38ff247140
> dez 07 18:33:45 stormtrooper kernel: R10: 00000000ffffffff R11: ffff9e38ff2f7140 R12: ffff9e35c50f1618
> dez 07 18:33:45 stormtrooper kernel: R13: ffffb1688085fd58 R14: 0000000000000001 R15: ffff9e35d82d8000
> dez 07 18:33:45 stormtrooper kernel: FS:  0000000000000000(0000) GS:ffff9e38eed00000(0000) knlGS:0000000000000000
> dez 07 18:33:45 stormtrooper kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> dez 07 18:33:45 stormtrooper kernel: CR2: 00007fb814ccffe0 CR3: 0000000107b72000 CR4: 0000000000350ee0
> dez 07 18:33:45 stormtrooper kernel: Call Trace:
> dez 07 18:33:45 stormtrooper kernel:  <TASK>
> dez 07 18:33:45 stormtrooper kernel:  ? __closure_sync+0xa0/0xa0 [bcache de8d79cf2937e54690676a125d53bc2d3cfbb49a]
> dez 07 18:33:45 stormtrooper kernel:  bch_journal_read+0xa0/0x350 [bcache de8d79cf2937e54690676a125d53bc2d3cfbb49a]
> dez 07 18:33:45 stormtrooper kernel:  ? __kernfs_new_node+0x1c5/0x230
> dez 07 18:33:45 stormtrooper kernel:  run_cache_set+0xb8/0x8f0 [bcache de8d79cf2937e54690676a125d53bc2d3cfbb49a]
> dez 07 18:33:45 stormtrooper kernel:  ? kernfs_add_one+0x20a/0x250
> dez 07 18:33:45 stormtrooper kernel:  register_cache_worker+0xb8b/0xce0 [bcache de8d79cf2937e54690676a125d53bc2d3cfbb49a]
> dez 07 18:33:45 stormtrooper kernel:  process_one_work+0x23a/0x3f0
> dez 07 18:33:45 stormtrooper kernel:  worker_thread+0x280/0x5c0
> dez 07 18:33:45 stormtrooper kernel:  ? worker_clr_flags+0x40/0x40
> dez 07 18:33:45 stormtrooper kernel:  kthread+0x149/0x170
> dez 07 18:33:45 stormtrooper kernel:  ? kthread_blkcg+0x30/0x30
> dez 07 18:33:45 stormtrooper kernel:  ret_from_fork+0x1f/0x30
> dez 07 18:33:45 stormtrooper kernel:  </TASK>
> dez 07 18:33:45 stormtrooper kernel: ---[ end trace 0000000000000000 ]---

See the ticket for more details.

BTW, let me use this mail to also add the report to the list of tracked
regressions to ensure it's doesn't fall through the cracks:

#regzbot introduced v6.0..v6.1-rc8
https://bugzilla.kernel.org/show_bug.cgi?id=216785
#regzbot title bcache: memcpy: detected field-spanning write...
#regzbot ignore-activity

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)

P.S.: As the Linux kernel's regression tracker I deal with a lot of
reports and sometimes miss something important when writing mails like
this. If that's the case here, don't hesitate to tell me in a public
reply, it's in everyone's interest to set the public record straight.

             reply	other threads:[~2022-12-08 14:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 14:53 Thorsten Leemhuis [this message]
2022-12-08 15:01 ` [regression] Bug 216785 - "memcpy: detected field-spanning write..." warnings with bcache Coly Li
2022-12-15  7:11 ` [regression] Bug 216785 - "memcpy: detected field-spanning write..." warnings with bcache #forregzbot Thorsten Leemhuis
2023-01-06  6:22   ` Kees Cook
2023-01-06 10:57     ` Thorsten Leemhuis
2023-01-06 20:16       ` Kees Cook

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=19200730-a3ba-6f4f-bb81-71339bdbbf73@leemhuis.info \
    --to=regressions@leemhuis.info \
    --cc=alexpereira@disroot.org \
    --cc=colyli@suse.de \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    /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).