Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: linux-modules@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [ARM64][GCC10] Kernel can't load any module due to RWX check
Date: Sat, 29 Aug 2020 15:44:37 +0800	[thread overview]
Message-ID: <b3158cec-b722-cbe8-5a82-47890a227da4@gmx.com> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 1262 bytes --]

Hi,

Recently built a v5.9-rc2 kernel, it boots fine, but unable to load any
kernel module.

After some debugging, it shows that it's due to RWX check failure:

  load_module: start
  module_enforce_rwx_sections: index=22 sh_flags=0x7 shf_wx=0x5
  layout_and_allocate: module enforce rwx sections
  load_module: failed to alloc layout and allocate
  load_module: end

Futhermore, it's unable to disable the RWX check through "make
menuconfig", since the ARCH_OPTIONAL_KERNEL_RWX is no for arm64.

The offending section 22 looks like this: (the kernel reports 38
sectors, while we only have 37, thus near-by sections are also shown here).

 20 .data         00000aa0  0000000000000000  0000000000000000  00086d08
 2**3
                  CONTENTS, ALLOC, LOAD, RELOC, DATA
 21 __bug_table   000000cc  0000000000000000  0000000000000000  000877a8
 2**2
                  CONTENTS, ALLOC, LOAD, RELOC, DATA
 22 __dyndbg      0000b9b8  0000000000000000  0000000000000000  00087878
 2**3
                  CONTENTS, ALLOC, LOAD, RELOC, DATA
 23 .data.unlikely 00000012  0000000000000000  0000000000000000
00093230  2**0
                  CONTENTS, ALLOC, LOAD, DATA

I'm using GCC 10.2.0, could this be the cause?

Thanks,
Qu




[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2020-08-29  7:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-29  7:44 Qu Wenruo [this message]
2020-08-29  7:49 ` [ARM64][GCC10] Kernel can't load any module due to RWX check Qu Wenruo
2020-08-29  7:57   ` Qu Wenruo
2020-08-29 10:03   ` peterz
2020-09-01 12:53 ` Will Deacon

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=b3158cec-b722-cbe8-5a82-47890a227da4@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-modules@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