From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (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 EB588314B9D for ; Sun, 24 May 2026 21:47:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779659253; cv=none; b=MLj5I43sDNsdNtvBhyR7hvAR8cWsGifugRx8u+H8/Cw8Mi/cORI+FzMhazdqT6QcMm3KGXw8/rtDqdfKOdUYtOr9h62ViWMTHhjBe9fh0FJx4T52DSIwCtAKJZ4260RYMjkD42+Giq943o4mHqQ/nOzI+Q+Lup1XNjdc/Vf6O+c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779659253; c=relaxed/simple; bh=Q3TFcvsOR3tC6jHXs9eznJTTcN9oNH9ndWopYpTr/ng=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=aWDUXve/FRYxr5jFIhx8/QibBrHep7Rrhmmn9zOW92H7/VCKLPcuU5nhA/iG9lM+7bS7PT4Vre68NVLTu8iX4h9v7c3GBPqZeOcqAAh9gyWfrioja7NfYM/zycKixjidRMJ91s+hO5X4+U+QGe4PHHnTn7WltZIjFes5j/VoN68= 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=gSysD3Ag; arc=none smtp.client-ip=209.85.210.180 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="gSysD3Ag" Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-8413ac3d82fso3753443b3a.0 for ; Sun, 24 May 2026 14:47:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779659251; x=1780264051; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=BBNrPCcK/hxdGYqdZZfdYFA88g5If0AtOc7FUUSiNA0=; b=gSysD3Agi0uGNC0e+CEftrhOm4SpWXvPNDCOAoetRTrRSUs4exdxItV1xBpbd/Jime qO45wOSiceviHdM0qjzFLbYNflnYZEhYb0D+hyS2u2ZFd7IM/9Bt3nhuN/1oWVig/f2j 77oNLw4k0hbI2C6Du7ubpS9PCgTx+p5SZGYWjW97Ix06xTz32GohlSAaqlY0JDCzpN4Z mVTVsbhLdkh1h3jPCKRL41gJvMb3g9cv8GQ5BcZXn0qlvhYH1whrvz9JW07sbQ9R3Ade a1jytQ2wtNyFie+CTu9Zb8R0mH2Mdibn1fnmsxXEbDVYsig5DZxPb9Sbu6w8Iw0dl0WN C2Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779659251; x=1780264051; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BBNrPCcK/hxdGYqdZZfdYFA88g5If0AtOc7FUUSiNA0=; b=IibXzRfia3eeoesU581mv+5vj7nBZbapVEvOyB8aERAlnAi0Wt7YAdXMZdlNcsGfOU 1pUTcePesx/zlJi+LmeSkM4xTza77lEWl6HXCHCwTFv9pwlbv7IMN2I52MJpDM1hruLS u6jKaUbAH3puU2Muae5SUCmERCDTH3AUm3IYPVyCSj9kzff8AsKrYj8zUbXhMashHy3n l6mjDalP5JArSX3Y/NQOAXf46otPl2g4Kd/t4vvGmO4idtVjW+9gDJ2ehUpGfFf1RjSK apiCYUCvMdiAcCJUwCdZ155b5We0FnFq9X7HZ2WAG3J3z0lCwXQaeDzmoYqBoqobgJpq 5fMQ== X-Forwarded-Encrypted: i=1; AFNElJ8QIdiSn+eaaRCB/eRYt7S5vg46ZbcdWA0NAG/BG97tMkCulwnXjxHaHACytXp/eja5qO1g7aeFwG27mdM=@vger.kernel.org X-Gm-Message-State: AOJu0YyUmZmtg4d0bjZmD4tfFI4H4GfKrZIaBM2+nGscww0Z064FoNVU 5i8+1ZLM3cOv1y56oSDnwNlQzA3swt7/cPphaXmZoAhzAHFq2QVgyolGfoe59SiP X-Gm-Gg: Acq92OEIiDDWLUtS7uCHgQYnzm5oKWdnKkAzOkBfTAKu/EhpEBbInKtT+SIH+rxdvPe 0CnHXOD6dVVbwLwPsEaJC0UtWdZipCO7GIa0CUQT3NsMmYzSI95MuVo+2ki5yP6KeygXSE9sSwl 7l5tzrK5dkXKnQTRBvMBjMpAj0qgpeBV3bViprrj09fqpzzHnXOD6z/eTLduHKUv4MYDCyp5xNZ 5RB3Anjqu9tCkbo+PfNro80oGmIhFc34d9+LoAtd9NOyIKllzszwZhH5bM041HmucKaJF++2oG9 fGaR2YRDhUmm2X3g2xoETkgYhpHDCPJ5qoboO0e88GN0mhWmo4+MdHSipfzp//fL/BaNClGp583 Z4V2wV6cGirpHYEj1YVhIZDMNFyDgbU53kXFz9QkePQoQdNbT/hEKKelxjmAVREzidI/W1LmCYA /TvxsDE+4ROb5Ir6XeqdI0ZBoAwXDVR+6UCZLUoatfIsS3 X-Received: by 2002:a05:6a00:bd0b:b0:83e:b443:9651 with SMTP id d2e1a72fcca58-8415f0f01cdmr11847419b3a.4.1779659251290; Sun, 24 May 2026 14:47:31 -0700 (PDT) Received: from [192.168.89.2] ([125.149.177.227]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84164ac9b74sm7415368b3a.3.2026.05.24.14.47.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 May 2026 14:47:30 -0700 (PDT) Message-ID: <8261b665-9ed0-4d26-81b3-2cdf55257236@gmail.com> Date: Mon, 25 May 2026 06:47:27 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6/6] crypto: eip93: handle request ID exhaustion To: Aleksander Jan Bajkowski , Herbert Xu , linux-crypto@vger.kernel.org Cc: Christian Marangi , Antoine Tenart , "David S . Miller" , Richard van Schagen , linux-kernel@vger.kernel.org, Benjamin Larsson , Mieczyslaw Nalewaj References: <20260524194528.3666383-1-hurryman2212@gmail.com> <20260524194528.3666383-7-hurryman2212@gmail.com> Content-Language: en-US From: Jihong Min In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Aleksander, On 5/25/26 06:30, Aleksander Jan Bajkowski wrote: > Hi Jihong, > > On 24/05/2026 21:45, Jihong Min wrote: >> diff --git a/drivers/crypto/inside-secure/eip93/eip93-main.h b/drivers/crypto/inside-secure/eip93/eip93-main.h >> index 990c2401b7ce..5237b75bba62 100644 >> --- a/drivers/crypto/inside-secure/eip93/eip93-main.h >> +++ b/drivers/crypto/inside-secure/eip93/eip93-main.h >> @@ -13,11 +13,13 @@ >> #include >> #include >> #include >> +#include >> >> #define EIP93_RING_BUSY_DELAY 500 >> >> #define EIP93_RING_NUM 512 >> #define EIP93_RING_BUSY 32 >> +#define EIP93_REQUEST_IDR_LIMIT (U16_MAX + 1) > > This looks suspicious. You are now overflowing the 16-bit field > EIP93_PE_USER_ID_CRYPTO_IDR. Did you meanĀ (U16_MAX - 1)? Best regards, > Aleksander > U16_MAX + 1 is intentional here because it is passed to idr_alloc() as the exclusive end value, not stored in EIP93_PE_USER_ID_CRYPTO_IDR. So this allocates IDs 0..U16_MAX inclusive, and the value 0x10000 is never written to the 16-bit descriptor field. That said, the name is confusing. I will rename it to something like EIP93_REQUEST_IDR_END and add a short comment if you prefer. Sincerely, Jihong Min