[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] xen/common: llc-coloring: Fix off-by-one in parse_color_config()


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Thu, 9 Apr 2026 12:52:37 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=suse.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7Ry1nLhn8aE/3+ejlD8Hkoinjt5LouqGIiM6a9TdlKA=; b=kowDhH/7nBq4sGiXlHD1ySiyHOnrVqRmH+26FcRsArXOB7EL2L7OlcgZUj9k3AV3tqu8RVTaS2JrtY+YV1dr1EIRrUKyUobuMmUqot5MzHfqQ6z0iEoc4rce3WFy0ouPJNOOH/FF6Dz452c32GBIijbZt0cMcQW3cLrsZJDeeD39nVJjGYJNeB+16WJBRBLxE0VrY+bSQqXWYFQVGr8Pdk+vyubA4EmNgYzuQspoOk0Y3Hhyq5HV7eoZXWV0b5Z3yKteY7y/EjABdsV8eOZd+8fAHnB5DOBqewdFztN7rPDIzkJ1B2AFM29xzSEQQXZQu5c9QTpuhhuVe5pTeJYBtg==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7Ry1nLhn8aE/3+ejlD8Hkoinjt5LouqGIiM6a9TdlKA=; b=sSeqUYiqxPt0PI0KoOEJe9F1wYHkuUkKJfSK8IZ4zid6KXcjO1tpoX+od0rP7RR74s76AiMtMw+GGc8619rDJrJrWxeLUlmQP00wqg6TeXrJASNF5epEazSai5zYdBqpU7jqndR1wAEsjOJ1Nytw4qijiOkMA4ibh4zWStkNKaPNPQ0Gxk6HH/N798vEKJ0j4QKUs+k6tXucLg1E2jZ45f6RJ/M7NaVaQFsx7rs4SV4Km1kwDur9nzBFy/AQV7Zq0QVYAHJrxHlYm+Ars+qiaMcGnqdhJz8O4C8KEi/xUPwapPaphYnR33xOPwUnce6w13SMJb5pLUQIPgYnoHlqKQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=a1uqdUafxy0TuFXHMMbfTyxdX4NE/S1aQPBdoOpFwLvUkEqUWCvZxBchfn+k+bSGYVrrvNNabbkP9sh39TYou5ZQwwxSURXo4or92Y6bjDn+40Ygd1unfvh4KvE5FjEdl4tXu+3CCMRe4BWUE7TRMz85VbmSYqcHIhjz4IO2NN1yzfBNfY1O3uMqDAdx4udNLbz+AJMpU1i+D3RS8ZJfGb22uMaqnXzlQHI/jsp+mPmExrUs0vqavR0YS+DQIrS3AUK1KuUH/j0ytI9IC0sT37roCOKn7ue+2clWy4anUerNslUIz9VD9uevRDx2d3Irx7953rWFODey30oshpFq7w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ocYVy7SmYmL9y8hqiCNq4XWvVlA5nX5zc9+z3I2z4BJa01flNWgrIWFe47/92wZ5hRjKN2PxwMY6P86chHx+qFbbk0rw0Hg8QNsoDRiRFj601cTce12OW3gqZawKA0ef0RSJ9EI15bwT/3H+XLV3O6i0GtD0ur/npAp9y/yp/c4eEgYwt+sa95jIjD3YhMcNvjeEtWdToa6dWagWkIUqE0A5ue2sQkrAOc7zAtEX1Z/+nbbcz+Iio1cwg4YBBSW68KMOtb1z5b980uvrR5UZpNg18B9j7wxesJb5ttXNXRSQxUn8uZW+LA61t0KXSU0d/DGLDNj32n2cL/EYsK730A==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
  • Delivery-date: Thu, 09 Apr 2026 12:53:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHcyBWdW2bjkWPifku6XWocvaXOWrXWpuWAgAAHZ4CAAADggA==
  • Thread-topic: [PATCH 2/3] xen/common: llc-coloring: Fix off-by-one in parse_color_config()


> On 9 Apr 2026, at 13:48, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 09.04.2026 14:22, Luca Fancellu wrote:
>>> On 9 Apr 2026, at 12:39, Michal Orzel <michal.orzel@xxxxxxx> wrote:
>>> 
>>> The check uses >= to compare the total number of colors against
>>> max_num_colors (which is ARRAY_SIZE of the colors array).  This
>>> incorrectly rejects input that would exactly fill the array.
>>> 
>>> For example, with NR_LLC_COLORS=16, specifying 1 color for Xen and 15
>>> for dom0 would fail.
>>> 
>>> Change >= to > so that exactly filling the array is permitted.
>>> 
>>> Fixes: 95ef5ddf8a ("xen/arm: add Dom0 cache coloring support")
>>> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
>>> ---
>> 
>> Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
> 
> Did you see Andrew's reply? If that earlier (recent) commit was wrong, I
> think a 2nd Fixes: tag may be needed here. For now I can't help the
> impression though that there might have been a re-basing mistake, where
> that re-base may have wanted to result in this patch dissolving into
> nothing. Yet of course I'm all ears to learn otherwise.
> 
> Jan

Oh, no I didn’t see that! Thanks for pointing that out, I will have a closer 
look.

Cheers,
Luca



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.