linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	akpm@linux-foundation.org, mm-commits@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org, linux-next@vger.kernel.org,
	sfr@canb.auug.org.au, broonie@kernel.org
Subject: Re: ppc elf_map breakage with MAP_FIXED_NOREPLACE
Date: Fri, 26 Jan 2018 15:04:15 +0100	[thread overview]
Message-ID: <20180126140415.GD5027@dhcp22.suse.cz> (raw)
In-Reply-To: <5acba3c2-754d-e449-24ff-a72a0ad0d895@linux.vnet.ibm.com>

On Fri 26-01-18 18:04:27, Anshuman Khandual wrote:
[...]
> I tried to instrument mmap_region() for a single instance of 'sed'
> binary and traced all it's VMA creation. But there is no trace when
> that 'anon' VMA got created which suddenly shows up during subsequent
> elf_map() call eventually failing it. Please note that the following
> VMA was never created through call into map_region() in the process
> which is strange.

Could you share your debugging patch?

> =================================================================
> [    9.076867] Details for VMA[3] c000001fce42b7c0
> [    9.076925] vma c000001fce42b7c0 start 0000000010030000 end 0000000010040000
> next c000001fce42b580 prev c000001fce42b880 mm c000001fce40fa00
> prot 8000000000000104 anon_vma           (null) vm_ops           (null)
> pgoff 1003 file           (null) private_data           (null)
> flags: 0x100073(read|write|mayread|maywrite|mayexec|account)
> =================================================================

Isn't this vdso or some other special mapping? It is not really an
anonymous vma. Please hook into __install_special_mapping

> VMA creation for 'sed' binary
> =============================
> [    9.071902] XXX: mm c000001fce40fa00 registered
> 
> [    9.071971] Total VMAs 2 on MM c000001fce40fa00
> ----
> [    9.072010] Details for VMA[1] c000001fce42bdc0
> [    9.072064] vma c000001fce42bdc0 start 0000000010000000 end 0000000010020000
> next c000001fce42b580 prev           (null) mm c000001fce40fa00
> prot 8000000000000105 anon_vma           (null) vm_ops c008000011ddca18
> pgoff 0 file c000001fe2969a00 private_data           (null)
> flags: 0x875(read|exec|mayread|maywrite|mayexec|denywrite)

This one doesn't have any stack trace either... Yet it is a file
mapping obviously. Special mappings shouldn't have any file associated.
Strange...
-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2018-01-27  7:55 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05  0:20 mmotm 2018-01-04-16-19 uploaded akpm
2018-01-05  6:43 ` Anshuman Khandual
2018-01-05  8:46   ` Michal Hocko
2018-01-07  6:49     ` Anshuman Khandual
2018-01-07  9:02       ` ppc elf_map breakage with MAP_FIXED_NOREPLACE (was: Re: mmotm 2018-01-04-16-19 uploaded) Michal Hocko
2018-01-07 11:26         ` Michael Ellerman
2018-01-08  3:02           ` ppc elf_map breakage with MAP_FIXED_NOREPLACE Anshuman Khandual
2018-01-08 22:12             ` Michael Ellerman
2018-01-09 11:48               ` Anshuman Khandual
2018-01-09 16:13                 ` Michal Hocko
2018-01-11 10:08                   ` Anshuman Khandual
2018-01-17  8:07                     ` Michal Hocko
2018-01-23 11:25                       ` Anshuman Khandual
2018-01-23 12:45                         ` Michal Hocko
2018-01-23 15:58                           ` Anshuman Khandual
2018-01-23 16:06                             ` Michal Hocko
2018-01-24  5:09                               ` Anshuman Khandual
2018-01-24  9:05                                 ` Michal Hocko
2018-01-26 12:34                                   ` Anshuman Khandual
2018-01-26 14:04                                     ` Michal Hocko [this message]
2018-01-29  2:47                                       ` Anshuman Khandual
2018-01-29  5:32                                         ` Anshuman Khandual
2018-01-29 13:22                                           ` Michal Hocko
     [not found]                                             ` <87k1w081e7.fsf@concordia.ellerman.id.au>
2018-01-30  9:42                                               ` Michal Hocko
2018-01-31  5:05                                                 ` Anshuman Khandual
2018-01-31 13:19                                                   ` Michal Hocko
2018-02-01  3:13                                                     ` Anshuman Khandual
2018-02-01 13:10                                                       ` Michal Hocko
2018-02-01 13:40                                                         ` Michal Hocko
2018-02-01 20:55                                                           ` Kees Cook
2018-02-13 10:04                                                             ` [RFC PATCH] elf: enforce MAP_FIXED on overlaying elf segments (was: Re: ppc elf_map breakage with MAP_FIXED_NOREPLACE) Michal Hocko
2018-02-14 16:30                                                               ` Khalid Aziz
2018-02-01 13:48                                                       ` ppc elf_map breakage with MAP_FIXED_NOREPLACE Michal Hocko
2018-02-01 21:06                                                         ` Kees Cook
2018-02-12 14:48                                                         ` Michal Hocko
2018-02-13  1:02                                                           ` Anshuman Khandual
2018-02-13  6:49                                                         ` Anshuman Khandual
2018-02-13 10:00                                                           ` Michal Hocko
2018-01-05 12:14   ` mmotm 2018-01-04-16-19 uploaded Michal Hocko

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=20180126140415.GD5027@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@kernel.org \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=sfr@canb.auug.org.au \
    /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).