On Mon, 15.04.13 16:12, har...@redhat.com (har...@redhat.com) wrote:

> From: Harald Hoyer <har...@redhat.com>
> 
> Introduce stack_size_guess() and alloca_maybe_safe() and get rid of
> the LINE_MAX limitation for MESSAGE in sd_journal_printv*()

tbh I don't really see the benefit of this. This is about logging, you
really want to avoid too much magic in there with differing results
depending "how deep in you are". We should stay predictable here, and
that also means that we fail predictably and that we generate the very
same messages regardless in which context you call us...

I mean, the original comment in that source file suggested to do a VLA
loop there, but that'd only be an optimization, we'd still have to
enforce a fixed limit on the resulting string, to avoid DoS
attacks... Now, turning this into something entirely dynamic sounds
dangerous too me at little benefit...

Also, the those functions are slow enough, not sure how I feel about
adding yet another syscall into each invocation...

What's the precise issue you are trying to fix here? Are there reports
of the limit actually being a real-life issue?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to