From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 E4D7D26980F for ; Thu, 11 Dec 2025 08:28:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765441740; cv=none; b=E6NDbPUqDXOTulfvSgzbI47QdLkZ2mRNjXu/0MB/naaOKYqQXsszriu8MfG3Uv8emIGo+4Cl1EDjJvoYFDYa7T7PYpdPv/lk5oYgVo/5E2TbNM3mn0Nt69NIp2ReiDswgCCYyBDB2FPS4wudAG/Xdv3b5aBqtK+nYigD45iKpF8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765441740; c=relaxed/simple; bh=djjr9+IAia3N6sWGx6zJjpQoQTmY5N42PCLnoR0yZyk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jc9Xr/lhnAP0O8XX1yoQgaHzR5G61Z7P5pJcUfu83Z/T8RUk5KNEu4wLWAdjrEFGoowVPjQsVGAUELyWFZbhCyXVhxUEwqrCfBfefLqawzkhnQ9qZA19HRHCUcWsakg4/tgfWvcqzNk5vCcjVs+Fhm/36mmimktBOWQ8Jt88DQI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=eAt4k5n+; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eAt4k5n+" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-42e2b90ad22so208618f8f.2 for ; Thu, 11 Dec 2025 00:28:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1765441737; x=1766046537; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=yhOVP0Qk4QJBwZMBL87OrBgZcGud1+QQm5cvOUQeo/M=; b=eAt4k5n+JRFJwicM+0Uo0KHutKyRY0bQJjO05nR/ESPLuWWFqbkc0hUWLV3zQ+5qAr 2TFUzA6fVtW9aI95GWe3BtMRSZRgNBYSujxuoy7B8C3+sSzS8ztL0DoM9kFyo0PAr5R/ 88ex/FKdoaAr/cSz0dyPBE9g27mKszTX15Xdl9pQKWA8Mg4Sn9GwWR/WS9MLFfzpSYi2 hC4vC7iY8gxQhPmUuomMTbMPv/naRJKbelNVtVf1ymvKTAt9I3doic4yihYRmJe8BSKa PKccPg3o/5rhA8zmzLwZnmcWANb38sesxBaJkBN+XLK1h34HjOtlMFVkcJT4AU/2j0oF fSrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765441737; x=1766046537; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yhOVP0Qk4QJBwZMBL87OrBgZcGud1+QQm5cvOUQeo/M=; b=dEuy4ZVEo7yxoPFKURkw40SdOMDZtMBkZ4ju/zWCxXayFMpJUTUarf+14BZzaPs1DF 9JLIO8jWUzOBxvOhprLjWTgdQa8zm+ti5MB5Y7rKPH9TLD/2Efi23+Z9dpwdr2m+Vwt7 EXorlFx8Eok5MJq6F8s5Ti3nlWdHRmrjNWDL56EEo4ep1u/DVdVCvWMXJbqP1f9U8FY8 OtxbXrB4cZUz7JLPRZ6QVdp/lrsMVqNBElGcT23gi/EzI3onu3yIaIbK6vtyvItmoRYT Ir40BfANzDat1dKrDLpzs4nYSO4fKrgK3PcbfPSni/666CgGJ+m8lpcEnXg2pMcNk8nJ O9KA== X-Forwarded-Encrypted: i=1; AJvYcCUuvHvRhVnYuOtp5rhmDAGCrAAIaC0ioeT5utzFs6L79aG4Vy7WTIhPcIoL3jh8bIUmqIzLGSi7te9IqpA=@vger.kernel.org X-Gm-Message-State: AOJu0YzEr0YBF9VA6YRbMr34OXpQucyzN6hjFF1R2Fxn1A0g6/D5lwv0 YGR/C9gIAGV9YVQHk5NaCCr6JxRd6XEG6RhBf/sgSU8cQirNpbJhbRNPhrWbBsU4Hj4= X-Gm-Gg: AY/fxX4U7sKuxqt7CQV6L7SJ4mVfQvbP/R5xui/c+TiLw7oW3YAFnWhmct5+wsDlK/n rAFdT0CJR3I6JBmpP3WNwH9zQUKM0c9JWtiBkvnP774S7yHANpTZEBg74JDc7QWZldV5nUYzOAz sDctWns5fffg8G7ziE387e5GPWSheJweYRVp1EU2ZwtyqWW8bblis0HkFpGXi9xE4wVaX0t/KM8 BTiJrxZ8/FITH1Zg238KHN9NzkBruxbB50gINPu/vlQS2BvminZxVFWZIGns2loqXdkW4hSlk3U ZqslJISKrnUqSntsrhr1IwcvwJDJF10dlvHzDdJmkbMzK09zsd2Oc7cO4Wa7aR5flC5dFKtCUJY LBJm7m/+ipXKvSZfUMPrWL9/Xcj39n/R4pDk/TfhpVUAQqJEpDpPWcnJw/Opyw50+hPy2CQKm+5 lZFQxGW+OVELQns04C X-Google-Smtp-Source: AGHT+IFgxdBy65p84fy65/fyiYE3miPmWBnt1+Te9NK6eCwaQurMoPZNR3/Cq1AwdP418CtOTItATQ== X-Received: by 2002:a05:6000:2309:b0:429:c711:22d8 with SMTP id ffacd0b85a97d-42fa39d2ef1mr5723924f8f.15.1765441737154; Thu, 11 Dec 2025 00:28:57 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42fa8b9b1f1sm4079889f8f.39.2025.12.11.00.28.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Dec 2025 00:28:56 -0800 (PST) Date: Thu, 11 Dec 2025 11:28:53 +0300 From: Dan Carpenter To: "Luck, Tony" Cc: Sami Tolvanen , Chris Li , Daniel Gomez , Eric Biggers , Kees Cook , Luis Chamberlain , Rusty Russell , Petr Pavlu , "linux-modules@vger.kernel.org" , Malcolm Priestley , Mauro Carvalho Chehab , Hans Verkuil , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , "linux-kernel@vger.kernel.org" , "linux-media@vger.kernel.org" , "linux-hardening@vger.kernel.org" Subject: Re: [PATCH 3/3] module: Add compile-time check for embedded NUL characters Message-ID: References: <20251008033844.work.801-kees@kernel.org> <20251008035938.838263-3-kees@kernel.org> <20251209001139.GA7982@quark> <20251210010020.GA2522829@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Dec 10, 2025 at 02:29:45PM -0800, Luck, Tony wrote: > > diff --git a/expand.c b/expand.c > > index f14e7181..71221d35 100644 > > --- a/expand.c > > +++ b/expand.c > > @@ -535,6 +535,8 @@ static int expand_compare(struct expression *expr) > > expr->taint = 0; > > return 0; > > } > > + if (left->flags & CEF_ICE && right->flags & CEF_ICE) > > + expr->flags |= CEF_SET_ICE; > > if (simplify_cmp_binop(expr, left->ctype)) > > return 0; > > if (simplify_float_cmp(expr, left->ctype)) I'm not an expert in the C standard, but this feels correct to me. regards, dan carpenter