From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) (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 0CB03524B9 for ; Tue, 23 Jan 2024 22:39:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706049601; cv=none; b=WJusrIIJtr/EKyd3nnBJWaaG2cFUUKOtrcZCo7Y7mFFjFlEjjMe8+/JEXuSPpvnYUA84MW+4CFMWtVVKGneBNCrwYytBLnVsrNbleZVs73S8a6/7p3pNDATgIXHhOtzuZ/NxyVUcXm1ZiyxUt+s+Dr3Uvemc8rymSnMnIe9AT3k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706049601; c=relaxed/simple; bh=y4p3NSPVMHOw2jwP2PaoGxz4TfHUbU+fk6wK9jRWntI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=q23LVRZsODyxq6+z+pihiKzlVzczk1YuMsYqNE2eBgF3kO4R7LwnFxoeZFoM55j6NAd4I/yh2ztFnpP57xLxz7riI6R2hisBN3uLx5cNsE98tKa6OF/avqwrsz3d7gxIBWVn9BgX9c6WzlBdL3h/D/4LJv8IBFKm/FbyBN5Sh7U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=m+wEVrLu; arc=none smtp.client-ip=209.85.161.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="m+wEVrLu" Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-5999ec531dcso764911eaf.3 for ; Tue, 23 Jan 2024 14:39:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706049599; x=1706654399; 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=JRnu4PK8Uuvutr3TyIu0/bpXXmqyY31McaVpbSnGREo=; b=m+wEVrLuuRi+1FPxBF9qzyqOabNu++xYY2FrdjITdCZ8Tf1UsElWcn3/Y4Ag9TkEnc ptrpzj89EoRwiH4yj8nm24pQK8DxjbqP6UtWdEWo0uUHAv+3LV1JEVX5SAo9AF5Yh8Xv Nl39xAu2AVK5D+B2qBan9NudAxBEx9iqBTyU8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706049599; x=1706654399; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JRnu4PK8Uuvutr3TyIu0/bpXXmqyY31McaVpbSnGREo=; b=QUXD65iVSRtY7XpU39J/9Q9DtZRbjQ7cANLAi9u5fsWOb0KXU8dq6jBeg4ILs8SUtz XIts9XmtapciaQ4vk7WkecIGn4eP95s8hwP+gedIlYXGRdR/VWRF35sNu1uewF8n7jzd RYJMqkV9DItpGY7LsxR3J17xJMwG0QfRppPbf5M1vy2BNj3Vi14mDIn71gNvyILz577E iV2os3+G2wpZ5YxzbPe71xoLDh0r1crI/cTzTNCBmYK2v8nkHNCAnBA3rNRRpPZyOh9F xS+wnov/b79GHoBqjOUNq3WbC0cUfcj7Yo+vYYlS1MS6ti9bgLUvFhmDAHw+uPg+5Sri x7wA== X-Gm-Message-State: AOJu0Yyrl+NX7i5z1yIkP9xjVtxyAJoI34oicom5JToPIZXsgWIcRIEG nKz6z672Ae0ZUY/qp8Dj8k152SG5CTDhyYz8cYdzQ/pctaBQz9JAgWB/nf5+sg== X-Google-Smtp-Source: AGHT+IH8X7+qM+5Il52aCRyzlGZQBCRCYjN1AqIRKfNRJwN8eQ2rmq6FaIDOCAhd3c4e85Ex76otBg== X-Received: by 2002:a05:6359:4c1b:b0:176:40e2:8902 with SMTP id kj27-20020a0563594c1b00b0017640e28902mr4515945rwc.0.1706049599143; Tue, 23 Jan 2024 14:39:59 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id h10-20020a65518a000000b0059d6f5196fasm9336883pgq.78.2024.01.23.14.39.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 14:39:58 -0800 (PST) Date: Tue, 23 Jan 2024 14:39:58 -0800 From: Kees Cook To: "Paul E. McKenney" Cc: linux-toolchains@vger.kernel.org, peterz@infradead.org, hpa@zytor.com, rostedt@goodmis.org, gregkh@linuxfoundation.org, ndesaulniers@google.com, justinstitt@google.com, torvalds@linux-foundation.org, linux-hardening@vger.kernel.org Subject: Re: A few proposals from the C standards committee Message-ID: <202401231437.171F50B769@keescook> References: <9162660e-2d6b-47a3-bfa2-77bfc55c817b@paulmck-laptop> Precedence: bulk X-Mailing-List: linux-toolchains@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: <9162660e-2d6b-47a3-bfa2-77bfc55c817b@paulmck-laptop> On Tue, Jan 23, 2024 at 08:46:13AM -0800, Paul E. McKenney wrote: > N3201 Operator Overloading Without Name Mangling v2 https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3201.pdf > I have seen Linux-kernel interest in *function* overloading, but > not in operator overloading. Nevertheless... > > The trick here is to associate a given operator with a function, > so that the name-mangling becomes essentially a manual operation. The proposal discusses strings, but I would want to immediately use this for handling wrap vs trap arithmetic (rather than using sanitizers[1]). -- Kees Cook