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

Re: [PATCH v4 4/4] xen/arm: handle irq_set_type() failures


  • To: Mykola Kvach <mykola_kvach@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Tue, 22 Sep 2026 16:24:59 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=epam.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=5qG0XuocjWs6WiHLtjd0Q4a+ZOxxKSdKCQzn586RzgM=; b=sXQbkE5obV5t6Tht1bZNj+l23HpJQ9xBkkOsO5CiTJ0AZltV7eGkT4VB5odUYJrL98IvhT2XekPOWXGNwSBH5B9XBy044C7wtp00DtszAUaDHmxmrKw8VzfN6pz8vucNoE8ZImHfWW5YMIuwvLX+aEgaxyVKXcpng7PgVnt6dIjLnWwvGEBF/cdVjwTgsktDZqcpSprLunn4ixxyGcEvOkku79z/lTDOOILYRfGCCCGLJHOV6GIk6WvJSp3uHp1q7tiRLwrw1eMBRwerwtVuBk0Zg3GVjkRjGrG/wWSfMeH9l53HSuBtdwUv+V44lUTH7unfKiCiI2zQryyxhbtf4g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AyURv1WWmopIPslncxza23Ohs4vPmQin/hqOIPBB1vyTJc5yndjEtilxEXK8bLJWq4+TvPyvga4tScmJPI2Ql5WoMMBSkKUaHg/4T3rmNjCb0csMTIgwrCB5DzA6OPt/pIngeiiwVwfV5DQP8AEt1ZEdl52Ozo/M+GdApBu6FN/YZN8rMjT5xJJ94zri1NfoZFm1QojRtkb6p2jKGLrWlS1giHJPVP+1fNnqJ/QQcVns+UAMvD9iWsn1mhc+qVqMs0utN8RVSrMsu6HT3FdseVTY0F/Cp7eoMCie8RCoyBWkvVuBc8FzJ+NLLZgDPupYqdr5mfOSgWJ7diGfBwEnJQ==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Jens Wiklander <jenswi@xxxxxxxxxx>
  • Delivery-date: Tue, 22 Sep 2026 14:25:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 22-Sep-26 08:39, Mykola Kvach wrote:
> Several Arm firmware initialization paths discard irq_set_type()'s return
> value, violating MISRA C Rule 17.7. If trigger configuration fails,
> initialization continues with an IRQ that was not configured as requested.
> 
> GTDT and MADT retain rejected timer and maintenance INTIDs.
> check_timer_irq_cfg() and release_irq() later perform unconditional
> descriptor lookups on those values. Xen has no backing descriptors for
> INTIDs 1024 through 4095, so retaining one can cause an out-of-bounds
> access.
> 
> Check the return value in the GTDT, MADT, SPCR, and FF-A paths. Store timer
> INTIDs only after successful trigger configuration, make GTDT parsing
> failure fatal, and stop UART or notification setup when trigger
> configuration fails.
> 
> Signed-off-by: Mykola Kvach <mykola_kvach@xxxxxxxx>
> Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
> Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
I asked you on v3 to reorder the patches, so that this one comes first (usually
when sending the series, fixes, improvements should come first so that they can
be immediately taken).

~Michal




 


Rackspace

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