linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: David Hildenbrand <david@redhat.com>
Cc: Topi Miettinen <toiwoton@gmail.com>,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: optionally disable brk()
Date: Mon, 5 Oct 2020 11:20:31 +0200	[thread overview]
Message-ID: <20201005092031.GS4555@dhcp22.suse.cz> (raw)
In-Reply-To: <888e62e0-3979-207b-c516-ddfc6b9f3345@redhat.com>

On Mon 05-10-20 11:13:48, David Hildenbrand wrote:
> On 05.10.20 08:12, Michal Hocko wrote:
> > On Sat 03-10-20 00:44:09, Topi Miettinen wrote:
> >> On 2.10.2020 20.52, David Hildenbrand wrote:
> >>> On 02.10.20 19:19, Topi Miettinen wrote:
> >>>> The brk() system call allows to change data segment size (heap). This
> >>>> is mainly used by glibc for memory allocation, but it can use mmap()
> >>>> and that results in more randomized memory mappings since the heap is
> >>>> always located at fixed offset to program while mmap()ed memory is
> >>>> randomized.
> >>>
> >>> Want to take more Unix out of Linux?
> >>>
> >>> Honestly, why care about disabling? User space can happily use mmap() if
> >>> it prefers.
> >>
> >> brk() interface doesn't seem to be used much and glibc is happy to switch to
> >> mmap() if brk() fails, so why not allow disabling it optionally? If you
> >> don't care to disable, don't do it and this is even the default.
> > 
> > I do not think we want to have config per syscall, do we? 
> 
> I do wonder if grouping would be a better option then (finding a proper
> level of abstraction ...).

I have a vague recollection that project for the kernel tinification was
aiming that direction. No idea what is the current state or whether
somebody is pursuing it.

-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2020-10-05  9:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 17:19 [PATCH] mm: optionally disable brk() Topi Miettinen
2020-10-02 17:52 ` David Hildenbrand
2020-10-02 21:19   ` David Laight
2020-10-02 21:44   ` Topi Miettinen
2020-10-05  6:12     ` Michal Hocko
2020-10-05  8:11       ` Topi Miettinen
2020-10-05  8:22         ` Michal Hocko
2020-10-05  9:03           ` Topi Miettinen
2020-10-05 14:12         ` Jonathan Corbet
2020-10-05 16:14           ` Topi Miettinen
2020-10-05  9:13       ` David Hildenbrand
2020-10-05  9:20         ` Michal Hocko [this message]
2020-10-05  9:47         ` Topi Miettinen
2020-10-05  9:55           ` David Hildenbrand
2020-10-05 11:21             ` David Laight
2020-10-05 12:18               ` David Hildenbrand
2020-10-05 12:25                 ` David Laight
2020-10-07  9:43                   ` Topi Miettinen
2020-11-01 11:41                 ` Topi Miettinen

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=20201005092031.GS4555@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=toiwoton@gmail.com \
    /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).