All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andi Kleen <andi@firstfloor.org>
Cc: Andy Lutomirski <luto@MIT.EDU>, Ingo Molnar <mingo@elte.hu>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Borislav Petkov <bp@amd64.org>
Subject: Re: [PATCH v4 0/6] Micro-optimize vclock_gettime
Date: Wed, 18 May 2011 00:59:59 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1105172354040.3078@ionos> (raw)
In-Reply-To: <m2hb8typxt.fsf@firstfloor.org>

On Tue, 17 May 2011, Andi Kleen wrote:
> Andy Lutomirski <luto@MIT.EDU> writes:
> >
> > On KVM on Sandy Bridge, I can emulate a vsyscall that does nothing in 400ns or so.  I'll try to make this code emulate real vsyscalls over the weekend.  This was much easier than I expected.
> 
> How about the performance of all the statically linked programs? I guess

_ALL_ the statically linked programs? Point out a single one which
matters and _IS_ performance critical.

> you just declared they don't matter? gettimeofday is quite critical
> and adding a exception into it is just a performance desaster.
> 
> Also it's always a dangerous assumption to think that all
> programs on Linux use glibc ("all world is a Vax")
> 
> In fact more and more of Linux users are using different libcs these
> days (like Android or embedded systems or languages with special runtime
> systems) Who knows if all those other libraries use vDSO?

Which is completely irrelevant to x86_64. Point to a single relevant
x86_64 embedded system to which one of the above handwaving applies.

> And then there are of course the old glibcs. A lot of people
> (including me) use new kernels with old userland.

And how is your use case performance critical ?

Furthermore any halfways up to date deployemnt is using VDSO for
obvious reasons and the archaic stuff which might be affected is not
using a recent kernel at all (except for akpm on his retro laptop, but
that "performance penalty" is probably the least of his worries).

> For me this seems like a very risky move -- breaking performance of
> previously perfectly good set ups for very little reason.
> 
> Given the old vsyscall code is somewhat ugly -- I wouldn't argue that --

It's not somewhat ugly. It's a design failure and more important it's
a risk - and you very well know that.

> but compatibility (including performance compatibility) has always
> been importand in Linux and we have far uglier code around in the
> name of compatibility..

We have ugly code around, but it has always been more important to fix
security risks than keeping them around for performance sake.
 
> And the "security problem" you keep talking about can be fixed much
> easier and more compatible as I pointed out.

Unless you come forth with a patch which addresses _ALL_ reasons which
caused me to remove your superior "Make the vsyscall less risky"
approach, just admit that it's fcked up by design and be done with it.

Stop your "as I pointed out" handwaving please. That code was broken
and even exploitable and I removed it for more than one very good
reason. Stop claiming that your "design" is in any way fixable. It's
not.

> As far as I'm concered the change is a bad idea.

As far as I'm concerned you seem to regain your old habits of
defending your proven to be wrong "design" decisions no matter what.

And as long as you can't come up with documented proof that a single
application is affected by such a change, STFU!

Even if you are not able to proof it, it's a total nobrainer to revert
such a change and make it CONFIG_KEEP_FCKUP=y dependent in the very
unliklely case that we get a proper and reasonable regression report.

Thanks,

	tglx

  reply	other threads:[~2011-05-17 23:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-16 16:00 [PATCH v4 0/6] Micro-optimize vclock_gettime Andy Lutomirski
2011-05-16 16:00 ` [PATCH v4 1/6] x86-64: Clean up vdso/kernel shared variables Andy Lutomirski
2011-05-16 17:23   ` Borislav Petkov
2011-05-16 17:34     ` Andrew Lutomirski
2011-05-16 16:00 ` [PATCH v4 2/6] x86-64: Remove unnecessary barrier in vread_tsc Andy Lutomirski
2011-05-16 16:01 ` [PATCH v4 3/6] x86-64: Don't generate cmov " Andy Lutomirski
2011-05-16 16:01 ` [PATCH v4 4/6] x86-64: vclock_gettime(CLOCK_MONOTONIC) can't ever see nsec < 0 Andy Lutomirski
2011-05-16 16:01 ` [PATCH v4 5/6] x86-64: Move vread_tsc into a new file with sensible options Andy Lutomirski
2011-05-16 16:01 ` [PATCH v4 6/6] x86-64: Turn off -pg and turn on -foptimize-sibling-calls for vDSO Andy Lutomirski
2011-05-16 16:09 ` [PATCH v4 0/6] Micro-optimize vclock_gettime Andi Kleen
2011-05-16 16:25   ` Thomas Gleixner
2011-05-16 16:49     ` Andi Kleen
2011-05-16 17:05       ` Andrew Lutomirski
2011-05-16 20:22         ` Andi Kleen
2011-05-16 21:28           ` Andrew Lutomirski
2011-05-16 21:53           ` Thomas Gleixner
2011-05-16 22:17             ` Andrew Lutomirski
2011-05-16 22:40               ` Thomas Gleixner
2011-05-17  8:00                 ` Ingo Molnar
2011-05-17 11:11                   ` Andrew Lutomirski
2011-05-17 11:36                     ` Ingo Molnar
2011-05-17 18:31                       ` Andy Lutomirski
2011-05-17 19:27                         ` Ingo Molnar
2011-05-17 21:31                         ` Andi Kleen
2011-05-17 22:59                           ` Thomas Gleixner [this message]
2011-05-18  3:18                             ` Andrew Lutomirski
2011-05-18  7:30                               ` Thomas Gleixner
2011-05-18  8:31                                 ` Ingo Molnar
2011-05-18 11:30                                   ` Andrew Lutomirski
2011-05-18 12:10                                     ` Ingo Molnar
2011-05-17  7:56       ` Ingo Molnar

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=alpine.LFD.2.02.1105172354040.3078@ionos \
    --to=tglx@linutronix.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=andi@firstfloor.org \
    --cc=bp@amd64.org \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@MIT.EDU \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.