public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: Andi Kleen <ak@suse.de>
Cc: discuss@x86-64.org, linux-kernel@vger.kernel.org,
	libc-alpha@sourceware.org, vojtech@suse.cz
Subject: Re: FOR REVIEW: New x86-64 vsyscall vgetcpu()
Date: Wed, 14 Jun 2006 09:30:23 -0700	[thread overview]
Message-ID: <4490399F.1090104@redhat.com> (raw)
In-Reply-To: <200606141752.02361.ak@suse.de>

[-- Attachment #1: Type: text/plain, Size: 2471 bytes --]

Andi Kleen wrote:

> Eventually we'll need a dynamic format but I'll only add it 
> for new calls that actually require it for security.
> vgetcpu doesn't need it.

Just introduce the vdso now, add all new vdso calls there.  There is no
reason except laziness to continue with these moronic fixed addresses.
They only get in the way of address space layout change/optimizations.
And nobody said anything about breaking apps which use the fixed
addresses.  That code can still be available.  One should be able to
turn it off with setarch.


>>> long vgetcpu(int *cpu, int *node, unsigned long *tcache)
>> Do you expect the value returned in *cpu and*node to require an error
>> value?  If not, then why this fascination with signed types?
> 
> Shouldn't make a difference.

If there is no reason for a signed type none should be used.  It can
only lead to problems.

This reminds me: what are the values for the CPU number?  Are they
continuous?  Are they the same as those used in the affinity syscalls
(they better be)?  With hotplug CPUs, are CPU numbers "recycled"?


>> And as for the cache: you definitely should use a length parameter.
>> We've seen in the past over and over again that implicit length
>> requirements sooner or later fail.
> 
> No, the cache should be completely opaque to user space. It's just
> temporary space for the vsyscall which it cannot store for itself.
> I'll probably change it to a struct to make that clearer.
> 
> length doesn't make sense for that use.

You didn't even try to understand what I said.  Yes, in this one case
you might at this point in time only need two words.  But

- this might change
- there might be other future functions in the vdso which need memory.
  It is a huge pain to provide more and more of these individual
  variables.  Better allocate one chunk.


> If some other function needs a cache too it can define its own.
> I don't see any advantage of using a shared buffer.

I believe it that _you_ don't see it.  Because the pain is in the libc.
 The code to set up stack frames has to be adjusted for each new TLS
variable.  It is better to do it once in a general way which is what I
suggested.


> I think you're misunderstanding the concept.

No, I understand perfectly.  You don't get it because you don't want to
understand the userlevel side.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 251 bytes --]

  parent reply	other threads:[~2006-06-14 16:30 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-14  7:42 FOR REVIEW: New x86-64 vsyscall vgetcpu() Andi Kleen
2006-06-14 10:47 ` Alan Cox
2006-06-14 14:54 ` Steve Munroe
2006-06-15 23:17   ` Benjamin Herrenschmidt
     [not found] ` <449029DB.7030505@redhat.com>
     [not found]   ` <200606141752.02361.ak@suse.de>
2006-06-14 16:30     ` Ulrich Drepper [this message]
2006-06-14 17:34       ` [discuss] " Andi Kleen
2006-06-15 18:44 ` Tony Luck
2006-06-16  6:22   ` Andi Kleen
2006-06-16  7:23     ` Gerd Hoffmann
2006-06-16  7:37       ` Andi Kleen
2006-06-16  9:48     ` Jes Sorensen
2006-06-16 10:09       ` Andi Kleen
2006-06-16 11:02         ` Jes Sorensen
2006-06-16 11:17           ` Andi Kleen
2006-06-16 11:58             ` Jes Sorensen
2006-06-16 12:36               ` Zoltan Menyhart
2006-06-16 12:41                 ` Jes Sorensen
2006-06-16 12:48                   ` Zoltan Menyhart
2006-06-16 21:04                     ` Chase Venters
2006-06-16 14:56                 ` Andi Kleen
2006-06-16 15:31                   ` Zoltan Menyhart
2006-06-16 15:37                     ` Andi Kleen
2006-06-16 15:58                       ` Jakub Jelinek
2006-06-16 16:24                         ` Andi Kleen
2006-06-16 16:33                           ` Jakub Jelinek
2006-06-16 21:12                     ` Chase Venters
2006-06-16 15:36                   ` Brent Casavant
2006-06-16 15:40                     ` Andi Kleen
2006-06-16 21:15                       ` Chase Venters
2006-06-16 21:19                       ` Chase Venters
2006-06-16 23:40                         ` Brent Casavant
2006-06-17  6:58                           ` Andi Kleen
2006-06-17  6:55                         ` [discuss] " Andi Kleen
2006-06-19  8:42                           ` Zoltan Menyhart
2006-06-19  8:54                             ` Andi Kleen
2006-06-16 14:54               ` Andi Kleen
2006-06-20  8:28                 ` Jes Sorensen
2006-06-19  0:15 ` Paul Jackson
2006-06-19  8:21   ` Andi Kleen
2006-06-19 10:09     ` Paul Jackson
2006-06-21  1:18     ` Paul Jackson
2006-06-21  1:21       ` Paul Jackson

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=4490399F.1090104@redhat.com \
    --to=drepper@redhat.com \
    --cc=ak@suse.de \
    --cc=discuss@x86-64.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /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