All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH] vl: remove (max_cpus > 255) check from smp_parse
Date: Mon, 02 Dec 2013 21:06:29 +0400	[thread overview]
Message-ID: <529CBE15.8010206@msgid.tls.msk.ru> (raw)
In-Reply-To: <1385350750-21468-1-git-send-email-aik@ozlabs.ru>

25.11.2013 07:39, Alexey Kardashevskiy wrote:
> Since modern POWER7/POWER8 chips can have more that 256 CPU threads
> (>2000 actually), remove this check from smp_parse.
> 
> The CPUs number is still checked against machine->max_cpus and this check
> should be enough not to break other archs.
[]
> -    if (max_cpus > 255) {
> -        fprintf(stderr, "Unsupported number of maxcpus\n");
> -        exit(1);
> -    }

I don't know whenever this is actually safe.  Do we have any static arrays
of size 255 somewhere, which will be overflowed without this check? :)

Thanks,

/mjt


WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] vl: remove (max_cpus > 255) check from smp_parse
Date: Mon, 02 Dec 2013 21:06:29 +0400	[thread overview]
Message-ID: <529CBE15.8010206@msgid.tls.msk.ru> (raw)
In-Reply-To: <1385350750-21468-1-git-send-email-aik@ozlabs.ru>

25.11.2013 07:39, Alexey Kardashevskiy wrote:
> Since modern POWER7/POWER8 chips can have more that 256 CPU threads
> (>2000 actually), remove this check from smp_parse.
> 
> The CPUs number is still checked against machine->max_cpus and this check
> should be enough not to break other archs.
[]
> -    if (max_cpus > 255) {
> -        fprintf(stderr, "Unsupported number of maxcpus\n");
> -        exit(1);
> -    }

I don't know whenever this is actually safe.  Do we have any static arrays
of size 255 somewhere, which will be overflowed without this check? :)

Thanks,

/mjt

  reply	other threads:[~2013-12-02 17:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25  3:39 [Qemu-trivial] [PATCH] vl: remove (max_cpus > 255) check from smp_parse Alexey Kardashevskiy
2013-11-25  3:39 ` [Qemu-devel] " Alexey Kardashevskiy
2013-12-02 17:06 ` Michael Tokarev [this message]
2013-12-02 17:06   ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2013-12-02 22:09   ` [Qemu-trivial] [Qemu-devel] " Andreas Färber
2013-12-02 22:09     ` [Qemu-devel] [Qemu-trivial] " Andreas Färber
2013-12-02 23:03     ` [Qemu-trivial] [Qemu-devel] " Alexey Kardashevskiy
2013-12-02 23:03       ` [Qemu-devel] [Qemu-trivial] " Alexey Kardashevskiy
2013-12-03  9:00       ` [Qemu-trivial] [Qemu-devel] " Markus Armbruster
2013-12-03  9:00         ` [Qemu-devel] [Qemu-trivial] " Markus Armbruster
2013-12-03 13:30       ` [Qemu-trivial] [Qemu-devel] " Andreas Färber
2013-12-03 13:30         ` [Qemu-devel] [Qemu-trivial] " Andreas Färber
2013-12-03 14:47         ` [Qemu-trivial] [Qemu-devel] " Eduardo Habkost
2013-12-03 14:47           ` [Qemu-devel] [Qemu-trivial] " Eduardo Habkost
2013-12-04  5:50           ` [Qemu-trivial] [Qemu-devel] " Alexey Kardashevskiy
2013-12-04  5:50             ` [Qemu-devel] [Qemu-trivial] " Alexey Kardashevskiy
2013-12-04 12:48             ` [Qemu-trivial] [Qemu-devel] " Eduardo Habkost
2013-12-04 12:48               ` [Qemu-devel] [Qemu-trivial] " Eduardo Habkost
2014-02-14  6:56               ` [Qemu-trivial] [Qemu-devel] " Alexey Kardashevskiy
2014-02-14  6:56                 ` [Qemu-devel] [Qemu-trivial] " Alexey Kardashevskiy
2014-02-14  7:34                 ` Paolo Bonzini
2014-02-14  7:34                   ` [Qemu-devel] " Paolo Bonzini
2013-12-03 10:44     ` [Qemu-trivial] [Qemu-devel] " Igor Mammedov
2013-12-03 10:44       ` [Qemu-devel] [Qemu-trivial] " Igor Mammedov
2013-12-03 14:33       ` [Qemu-trivial] [Qemu-devel] " Eduardo Habkost
2013-12-03 14:33         ` [Qemu-devel] [Qemu-trivial] " Eduardo Habkost

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=529CBE15.8010206@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=aik@ozlabs.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.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.