From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1247E211A14 for ; Mon, 15 Jun 2026 09:44:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781516683; cv=none; b=IXXIOHPF2dvqBL7QbChaq2q1+onfnxI7QAigsQtYjyIrWzEAgoPgJp01AU75UJPcn5yadyky+Tud7HAaXZ3fqWEgnRSXdNhHWy4Fp17BsDxR0zTNkNwZd8lyhsXy8TFk3MiL/rW712c6izK0y66mE+47305aCtFRDxP1R2rDEWY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781516683; c=relaxed/simple; bh=+VJARDTta5Y3gQcojIkfFXg8iBy+oDlxv3PLPM3tCJM=; h=From:To:Cc:Subject:In-Reply-To:Date:Message-ID:References; b=E1vQxK1j0h4brUltpYyHhx3syGhNwlw0kr6Hktb1VgdJ46coswAaqVIuko0hc2NJRqb5wPzpF8G+1jc0J0z8XWkizAoW2EqsSLlR2Qz56WZ/J3MP9b7XH7Bv7iNbGR74TJlbMzMwwd5Gt92h+1/yEWREnQLyr9SI556M+VKhE40= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AG5s+mpZ; arc=none smtp.client-ip=209.85.214.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AG5s+mpZ" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2c0c1e0b0faso18698655ad.0 for ; Mon, 15 Jun 2026 02:44:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781516681; x=1782121481; darn=vger.kernel.org; h=references:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=EloqPb/s3ZqQaHqbVsrN7RxmVooYUDp69yUIndFzvpE=; b=AG5s+mpZQfLwUnToMLOaIAfBKqdYAEqTucDyKfhcVsIgD6KEMo6E5oHPfwQ/Y0+ptO psd1Nd6pyW3C2fH7og/GDSJifjaOtTysp/a8INKnNMJ/PKaTqhDnKDp/WMPU9bd5AWf6 LGHxIdbliuZ/TsLvQq1wxe3Grep0sVATlrIXExED7B/FXWAQzsscxL/ylrdZgSALaRtU uQx4JQOj18m8UGtLgNx0L3xNY3Npm5tvAYi3ah/Q/1fiTeoMJf9GEgpxtTmaur23NwxK hCJS4BO8qY1DWknMyK58tzuiQm1dk4GhSwi5b2qQiyJogPF/Foi95bXPEcoNDryYA8mE qemA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781516681; x=1782121481; h=references:message-id:date:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EloqPb/s3ZqQaHqbVsrN7RxmVooYUDp69yUIndFzvpE=; b=Y72cPPBjWogDwgJw+1bJNXzwgJePrn89s93LW//5bWl0XfiGfr5poXpy/+0aAQG+Cl FNyH/xbdJHTz/K5QaBDg/xDOlBF/83+ysjSvjqpeNTd7GKkyDk9p96wqX7RmMh5dywaU u+maSLgxs4Bt9v1ijyB1so9yntA5pvAs/DQLIsCRTR/6He6AS4qhoKVEcxpkcHUB2ERt ZTyhhONS+BPKzNZzxOgdcXh8+ksH0lBZt2tNIc8UXcOn0t4pPjCTCfPDcpLss4vIQhb6 nrbpFTGSSiNggjDtx1lm+zq/KH1s7S5fdhE08pMTRE09887OhP5zdBF9jBSUcxdAhdF+ 5N4Q== X-Gm-Message-State: AOJu0Yym39C1OJjGCg21r04ZDznelT+iUK1Pj/QEUW2w7DOnHCbGKGyv Ui8xVD2h0CEsKyYy/UnU1sI6sNDGT+YUJrKkFbkceKwwJXhe8temWJX6 X-Gm-Gg: Acq92OF5IMIuaYxX0MdULxF/oMDVjOPn2W8Le7wFwf8JOfJ7b648Yt7JhinQwBxswEW 8rgOT/P3w0MGG2u8xTE82SwfzcbmCWoAj/eSXOtuu+NF478PxI96dTuuE0gWOz8hk1CB2MqwJBZ NLCAkIkUen+2pX9OnBlv+iQMWfxkDL17K4G3Thq3LBX309Q1fGpxDeGLBl1kgeNvxO0egOMDXTN kQObyur7CCLRnTUgsAD67TLMsim7nS1nF7SVYzDvLnT4O5K7viZxRpAATDsAqzXJQxZeo6tgzt/ LktWBXVuGCVMdY+ixPyJ3pMxtZuXn0Wktrt0Jh/888vr1MBLXubHQyK66s3t2WunD3/l9sVP/Qw F3y6MKVt7cHXFqICq4wnxTdKuxxyEozgDyNxcmU+Ngx6JHLVmIKG74qXJyEQ7o0cLFh4RccvjsR ng3w/PAG3fU+bLI6Pxjj0IcGe3uA== X-Received: by 2002:a17:903:2984:b0:2c1:88a1:9830 with SMTP id d9443c01a7336-2c41255a929mr141771955ad.17.1781516681381; Mon, 15 Jun 2026 02:44:41 -0700 (PDT) Received: from pve-server ([49.205.216.49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c42fbb5411sm93203405ad.32.2026.06.15.02.44.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 02:44:40 -0700 (PDT) From: Ritesh Harjani (IBM) To: Sayali Patil , linuxppc-dev@lists.ozlabs.org, maddy@linux.ibm.com, Christophe Leroy , Michael Ellerman , Nicholas Piggin Cc: linux-kernel@vger.kernel.org, Mahesh Salgaonkar , Sourabh Jain Subject: Re: [PATCH v2] powerpc/fadump: define MIN_RMA in bytes value to fix overflow In-Reply-To: Date: Mon, 15 Jun 2026 15:06:05 +0530 Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Sayali Patil writes: > The MIN_RMA size checks in fadump_setup_param_area() use > (MIN_RMA * 1024 * 1024), which is evaluated in int and can > overflow when MIN_RMA is increased to values such as SZ_2G. > This triggers compiler warnings such as: > > warning: integer overflow in expression of type 'int' > results in '0' [-Woverflow] > > Define MIN_RMA directly in bytes using SZ_1M and update the > callers accordingly. This avoids repeated unit conversions and > prevents integer overflow. > > Also convert MIN_RMA back to MB when populating the firmware > architecture vector, since firmware expects the value in MB. > > Fixes: b7bb46062457 ("powerpc/fadump: fix additional param memory reservation for HASH MMU") Since this is not a bug per-se, so we need not add a Fixes tag. But while we are at it, we may correct the commit subject to... powerpc/fadump: Define MIN_RMA in bytes rather than MB ... since there is no overflow with it's current value. With the above changes in place, feel free to add: Reviewed-by: Ritesh Harjani (IBM)