linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tong Zhang <ztong0001@gmail.com>
To: Murphy Zhou <jencce.kernel@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	kernel test robot <lkp@intel.com>,
	 Alexander Viro <viro@zeniv.linux.org.uk>,
	Eric Biederman <ebiederm@xmission.com>,
	 Kees Cook <keescook@chromium.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	 Linux-Fsdevel <linux-fsdevel@vger.kernel.org>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	llvm@lists.linux.dev,  kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH v1] binfmt_misc: fix crash when load/unload module
Date: Tue, 25 Jan 2022 22:33:22 -0800	[thread overview]
Message-ID: <CAA5qM4DdvMNeG-PndWR9vb_jXTZ3v9aBXpW9QjV66DQFny65Wg@mail.gmail.com> (raw)
In-Reply-To: <CAA5qM4Btrnp9Te2pm0s=OuDk0ASTE3-LyLt8nf0fXKxhehXUgA@mail.gmail.com>

On Tue, Jan 25, 2022 at 9:23 PM Tong Zhang <ztong0001@gmail.com> wrote:
>
> On Tue, Jan 25, 2022 at 9:04 PM Murphy Zhou <jencce.kernel@gmail.com> wrote:
> >
> > Still panic with this patch on Linux-next tree:
> >
> > [ 1128.275515] LTP: starting binfmt_misc02 (binfmt_misc02.sh)
> > [ 1128.303975] CPU: 1 PID: 107182 Comm: modprobe Kdump: loaded
> > Tainted: G        W         5.17.0-rc1-next-20220125+ #1
> > [ 1128.305264] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
> > [ 1128.305992] Call Trace:
> > [ 1128.306376]  <TASK>
> > [ 1128.306682]  dump_stack_lvl+0x34/0x44
> > [ 1128.307211]  __register_sysctl_table+0x2c7/0x4a0
> > [ 1128.307846]  ? load_module+0xb37/0xbb0
> > [ 1128.308339]  ? 0xffffffffc01b6000
> > [ 1128.308762]  init_misc_binfmt+0x32/0x1000 [binfmt_misc]
> > [ 1128.309402]  do_one_initcall+0x44/0x200
> > [ 1128.309937]  ? kmem_cache_alloc_trace+0x163/0x2c0
> > [ 1128.310535]  do_init_module+0x5c/0x260
> > [ 1128.311045]  __do_sys_finit_module+0xb4/0x120
> > [ 1128.311603]  do_syscall_64+0x3b/0x90
> > [ 1128.312088]  entry_SYSCALL_64_after_hwframe+0x44/0xae
> > [ 1128.312755] RIP: 0033:0x7f929ab85fbd
> >
> > Testing patch on Linus tree.
>
> Hi Murphy,
> Did you apply this patch?
> Link: https://lkml.kernel.org/r/20220124181812.1869535-2-ztong0001@gmail.com
> I tested it on top of the current master branch and it works on my
> setup using the reproducer I mentioned.
> Could you share your test script?
> Thanks,
> - Tong

I can find binfmt_misc02.sh on github, and running the following
command shows: failed 0.

./runltp -s binfmt_misc
Running tests.......
<<<test_start>>>
tag=binfmt_misc01 stime=1643178454
cmdline="binfmt_misc01.sh"
contacts=""
analysis=exit
<<<test_output>>>
[   90.908282] LTP: starting binfmt_misc01 (binfmt_misc01.sh)
binfmt_misc01 1 TINFO: timeout per run is 0h 5m 0s
binfmt_misc01 1 TPASS: Failed to register a binary type
binfmt_misc01 2 TPASS: Failed to register a binary type
binfmt_misc01 3 TPASS: Failed to register a binary type
binfmt_misc01 4 TPASS: Failed to register a binary type
binfmt_misc01 5 TPASS: Failed to register a binary type
binfmt_misc01 6 TPASS: Failed to register a binary type
binfmt_misc01 7 TPASS: Failed to register a binary type
binfmt_misc01 8 TPASS: Failed to register a binary type
binfmt_misc01 9 TPASS: Failed to register a binary type

Summary:
passed   9
failed   0
broken   0
skipped  0
warnings 0
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=2 cstime=17
<<<test_end>>>
<<<test_start>>>
tag=binfmt_misc02 stime=1643178454
cmdline="binfmt_misc02.sh"
contacts=""
analysis=exit
<<<test_output>>>
[   91.133399] LTP: starting binfmt_misc02 (binfmt_misc02.sh)
incrementing stop
binfmt_misc02 1 TINFO: timeout per run is 0h 5m 0s
binfmt_misc02 1 TPASS: Recognise and unrecognise a binary type as expected
binfmt_misc02 2 TPASS: Recognise and unrecognise a binary type as expected
binfmt_misc02 3 TPASS: Recognise and unrecognise a binary type as expected
binfmt_misc02 4 TPASS: Recognise and unrecognise a binary type as expected
binfmt_misc02 5 TPASS: Fail to recognise a binary type
binfmt_misc02 6 TPASS: Fail to recognise a binary type

Summary:
passed   6
failed   0
broken   0
skipped  0
warnings 0
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=3 cstime=25
<<<test_end>>>
INFO: ltp-pan reported all tests PASS
LTP Version: 20220121-9-g010e4f783

       ###############################################################

            Done executing testcases.
            LTP Version:  20220121-9-g010e4f783
       ###############################################################


  reply	other threads:[~2022-01-26  6:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220124003342.1457437-1-ztong0001@gmail.com>
2022-01-24 11:40 ` kernel test robot
2022-01-24 23:16   ` Andrew Morton
2022-01-25 18:14     ` Luis Chamberlain
2022-01-26  5:04     ` Murphy Zhou
2022-01-26  5:23       ` Tong Zhang
2022-01-26  6:33         ` Tong Zhang [this message]
2022-01-29  0:25           ` Murphy Zhou
2022-01-24 12:14 ` kernel test robot

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=CAA5qM4DdvMNeG-PndWR9vb_jXTZ3v9aBXpW9QjV66DQFny65Wg@mail.gmail.com \
    --to=ztong0001@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=jencce.kernel@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=mcgrof@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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