Skip to contentSkip to conversation

mainline build failure due to 8295efbe68c0 ("md/raid1-10: factor out a helper to submit normal write")

DISCUSSION Sudip Mukherjee (Codethink) 5 participants 7 messages Jun 29, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi All,

The latest mainline kernel branch fails to build x86_64, arm64 and arm allmodconfig with clang (version 16.0.1), and the error is:

In file included from drivers/md/raid1.c:52:
drivers/md/raid1-10.c:119:25: error: casting from randomized structure pointer type 'struct block_device *' to 'struct md_rdev *'

        struct md_rdev *rdev = (struct md_rdev *)bio->bi_bdev;
                               ^

git bisect pointed to 8295efbe68c0 ("md/raid1-10: factor out a helper to submit normal write").

Reverting the commit has fixed the build failure.

I will be happy to test any patch or provide any extra log if needed.

#regzbot introduced: 8295efbe68c080047e98d9c0eb5cb933b238a8cb

Signature · 2 lines
Regards
Sudip
#1 lore raw

Hi,

Quoted 3 lines · Sudip Mukherjee (Codethink)

Hi All,

The latest mainline kernel branch fails to build x86_64, arm64 and arm allmodconfig

Thanks for the testing, which branch are you testing?

This problem is already fixed in latest mainline kernel:

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b5a99602b74bbfa655be509c615181dd95b0719e

Kuai

Quoted 15 lines

with clang (version 16.0.1), and the error is:

In file included from drivers/md/raid1.c:52:
drivers/md/raid1-10.c:119:25: error: casting from randomized structure pointer type 'struct block_device *' to 'struct md_rdev *'

         struct md_rdev *rdev = (struct md_rdev *)bio->bi_bdev;
                                ^

git bisect pointed to 8295efbe68c0 ("md/raid1-10: factor out a helper to submit normal write").

Reverting the commit has fixed the build failure.

I will be happy to test any patch or provide any extra log if needed.

#regzbot introduced: 8295efbe68c080047e98d9c0eb5cb933b238a8cb

#2 lore raw

Hi Kuai,

Quoted 6 lines · Yu Kuai

Hi,

Quoted 2 lines · Sudip Mukherjee (Codethink)

Hi All,

Quoted 7 lines
Quoted 1 line

The latest mainline kernel branch fails to build x86_64, arm64 and arm allmodconfig

Thanks for the testing, which branch are you testing?

This problem is already fixed in latest mainline kernel:

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b5a99602b74bbfa655be509c615181dd95b0719e

The link you gave is not "mainline kernel". Its linux-next.

Linus still does not have the fix, so the mainline kernel branch fails.

Signature · 2 lines
Regards
Sudip
#3 lore raw
In reply to Yu Kuai
Quoted 4 lines · Yu Kuai
Quoted 2 lines · Sudip Mukherjee (Codethink)

The latest mainline kernel branch fails to build x86_64, arm64 and arm allmodconfig

Thx for the report.

Quoted 4 lines

Thanks for the testing, which branch are you testing?

This problem is already fixed in latest mainline kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b5a99602b74bbfa655be509c615181dd95b0719e

And thx for the reply. :-D

FWIW, that fix afaics is still in -next and hasn't reached mainline yet. But I guess that will change within a few days.

Quoted 1 line
Quoted 1 line

#regzbot introduced: 8295efbe68c080047e98d9c0eb5cb933b238a8cb

#regzbot fix: b5a99602b74bbfa6
#regzbot dup-of: https://lore.kernel.org/all/ZJ2M4yqnOCqqGWH0@debian/
#regzbot ignore-activity

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) --
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.

maintainer
#4 lore raw

+ Jens,

Quoted 13 lines · Linux regression tracking (Thorsten Leemhuis)
Quoted 4 lines · Yu Kuai
Quoted 2 lines · Sudip Mukherjee (Codethink)

The latest mainline kernel branch fails to build x86_64, arm64 and arm allmodconfig

Thx for the report.

Quoted 4 lines

Thanks for the testing, which branch are you testing?

This problem is already fixed in latest mainline kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b5a99602b74bbfa655be509c615181dd95b0719e

Hi Jens,

The fix is in the for-6.5/block-late branch.

https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?h=for-6.5/block-late&id=b5a99602b74bbfa655be509c615181dd95b0719e

Would you send a pull request with it? Or would you prefer some other solution for the issue?

AFAICT, it will fix clang build with RANDSTRUCT.

Thanks,
Song

Quoted 17 lines

And thx for the reply. :-D

FWIW, that fix afaics is still in -next and hasn't reached mainline yet. But I guess that will change within a few days.

Quoted 1 line
Quoted 1 line

#regzbot introduced: 8295efbe68c080047e98d9c0eb5cb933b238a8cb

#regzbot fix: b5a99602b74bbfa6
#regzbot dup-of: https://lore.kernel.org/all/ZJ2M4yqnOCqqGWH0@debian/
#regzbot ignore-activity

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) --
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.

maintainer
#5 lore raw

Oops, didn't really add Jens in the previous email.

Add Jens now.

Quoted 50 lines · Song Liu

+ Jens,

Quoted 13 lines · Linux regression tracking (Thorsten Leemhuis)
Quoted 4 lines · Yu Kuai
Quoted 2 lines · Sudip Mukherjee (Codethink)

The latest mainline kernel branch fails to build x86_64, arm64 and arm allmodconfig

Thx for the report.

Quoted 4 lines

Thanks for the testing, which branch are you testing?

This problem is already fixed in latest mainline kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b5a99602b74bbfa655be509c615181dd95b0719e

Hi Jens,

The fix is in the for-6.5/block-late branch.

https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?h=for-6.5/block-late&id=b5a99602b74bbfa655be509c615181dd95b0719e

Would you send a pull request with it? Or would you prefer some other solution for the issue?

AFAICT, it will fix clang build with RANDSTRUCT.

Thanks,
Song

Quoted 17 lines

And thx for the reply. :-D

FWIW, that fix afaics is still in -next and hasn't reached mainline yet. But I guess that will change within a few days.

Quoted 1 line
Quoted 1 line

#regzbot introduced: 8295efbe68c080047e98d9c0eb5cb933b238a8cb

#regzbot fix: b5a99602b74bbfa6
#regzbot dup-of: https://lore.kernel.org/all/ZJ2M4yqnOCqqGWH0@debian/
#regzbot ignore-activity

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) --
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.

#6 lore raw

The late branch will go out some time next week.

Quoted 55 lines · Song Liu

Oops, didn't really add Jens in the previous email.

Add Jens now.

Quoted 50 lines · On Thu, Jun 29, 2023 at 8:55?AM Song Liu <[email protected]> wrote:

+ Jens,

Quoted 13 lines · On Thu, Jun 29, 2023 at 7:10?AM Linux regression tracking (Thorsten Leemhuis)…
Quoted 4 lines · Yu Kuai

? 2023/06/29 21:32, Sudip Mukherjee (Codethink) ??:

Quoted 2 lines

The latest mainline kernel branch fails to build x86_64, arm64 and arm allmodconfig

Thx for the report.

Quoted 4 lines

Thanks for the testing, which branch are you testing?

This problem is already fixed in latest mainline kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b5a99602b74bbfa655be509c615181dd95b0719e

Hi Jens,

The fix is in the for-6.5/block-late branch.

https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?h=for-6.5/block-late&id=b5a99602b74bbfa655be509c615181dd95b0719e

Would you send a pull request with it? Or would you prefer some other solution for the issue?

AFAICT, it will fix clang build with RANDSTRUCT.

Thanks,
Song

Quoted 17 lines

And thx for the reply. :-D

FWIW, that fix afaics is still in -next and hasn't reached mainline yet. But I guess that will change within a few days.

Quoted 1 line
Quoted 1 line

#regzbot introduced: 8295efbe68c080047e98d9c0eb5cb933b238a8cb

#regzbot fix: b5a99602b74bbfa6
#regzbot dup-of: https://lore.kernel.org/all/ZJ2M4yqnOCqqGWH0@debian/
#regzbot ignore-activity

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) --
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.

Signature · 1 line
Jens Axboe