From: Jeff King <peff@peff.net>
To: ytrezq@sdf-eu.org
Cc: git@vger.kernel.org
Subject: Re: arbitrary memory allocation
Date: Wed, 2 Dec 2015 01:09:42 -0500 [thread overview]
Message-ID: <20151202060942.GA8212@sigill.intra.peff.net> (raw)
In-Reply-To: <1a012fc79a55cae8b948b28d1259be0c.squirrel@sdfeu.org>
On Thu, Nov 26, 2015 at 05:06:35AM +0100, ytrezq@sdf-eu.org wrote:
> First, something I still don t understand, should I always ulimit ram
> usage for security purposes when I m manage a public server?
You didn't define "public" here. For serving fetches, the memory tends
to be fairly bounded and dependent on the repo you're serving. For
accepting pushes, it's trivial to convince the server to allocate a lot
of memory (you can send an unbounded set of ref updates, or you can
simply send a 50GB object that compresses down to a tiny size).
Git does not have any internal memory controls, and will generally rely
on malloc() to tell it when it is not being reasonable. I'd suggest
using OS-level memory controls like cgroups if you're hosting something
public.
-Peff
prev parent reply other threads:[~2015-12-02 6:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 4:06 arbitrary memory allocation ytrezq
2015-12-01 0:17 ` Junio C Hamano
2015-12-01 1:03 ` Stefan Beller
2015-12-02 6:09 ` Jeff King [this message]
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=20151202060942.GA8212@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=ytrezq@sdf-eu.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;
as well as URLs for NNTP newsgroup(s).