p.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=GRpnoNfY; arc=none smtp.client-ip=209.85.219.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-882360ca0e2so8159856d6.0 for ; Sat, 08 Nov 2025 05:40:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1762609215; x=1763214015; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/DafqidA7/7+oFb78vkkjycrUDd/aqV+55S7wTivPUo=; b=GRpnoNfYS6HrUHi9tBETFFEda0ds2FbPF06gJqUKO3xbNP/vXagAWztKH07VYGBHCn ZHaR64+8K5Q6oe0J7lQxwZ/dmOjH9br/ipVBbURg9Myf/pRSmilUjJsJBi2fV3780SkJ sNn6BN2V9o3uSIraZ/zmOa+pq4YZw0cycXayZsPFckCfdzkVUAKIxBjUsF+5viTgLxHx JCshKUDU6tqmA3AuctzLACFuZP3KPKqc5/exP96ro7xA9clKq6PXP87S88nwer01U9yu uEbh7uUoR+TLTTSExu/aV3EdMrzWC31LH3Ou9yrbgR7OKoMCUwIJemiLerSu6bh9tsSx 2Bqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762609215; x=1763214015; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=/DafqidA7/7+oFb78vkkjycrUDd/aqV+55S7wTivPUo=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f with SMTP id 6a1803df08f44-8823872a410mr34063366d6.53.1762609214865; Sat, 08 Nov 2025 05:40:14 -0800 (PST) Received: from [127.0.0.1] ([216.235.231.34]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-88238b290eesm14808676d6.34.2025.11.08.05.40.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Nov 2025 05:40:13 -0800 (PST) From: Jens Axboe To: io-uring@vger.kernel.org, Pavel Begunkov In-Reply-To: <669d1e9701194fe86c69d12bb629b21242adaec7.1762432299.git.asml.silence@gmail.com> References: <669d1e9701194fe86c69d12bb629b21242adaec7.1762432299.git.asml.silence@gmail.com> Subject: Re: [PATCH 1/1] io_uring/query: buffer size calculations with a union Message-Id: <176260921306.52069.7107119231471996539.b4-ty@kernel.dk> Date: Sat, 08 Nov 2025 06:40:13 -0700 Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.14.3 X-DKIM: signer='kernel-dk.20230601.gappssmtp.com' status='pass' reason='' DKIMCheck: Server passes DKIM test, 0 Spam score X-Spam-Score: 1.8 (+) X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has performed the tests listed below against this email. Information: https://mxroutedocs.com/directadmin/spamfilters/ --- Content analysis details: (1.8 points) --- pts rule name description ---- ---------------------- ----------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [147.75.80.249 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [216.235.231.34 listed in zen.spamhaus.org] 1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager SpamTally: Final spam score: 18 On Thu, 06 Nov 2025 12:31:56 +0000, Pavel Begunkov wrote: > Instead of having an array of a calculated size as a buffer, put all > query uapi structures into a union and pass that around. That way > everything is well typed, and the compiler will prevent opcode handling > using a structure not accounted into the buffer size. > > Applied, thanks! [1/1] io_uring/query: buffer size calculations with a union commit: 20c1da7ee5cb181fd67488c91856233d9c41d3c6 Best regards, -- Jens Axboe From - Sat Nov 08 14:05:47 2025 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Return-Path: Delivered-To: hi@josie.lol Received: from witcher.mxrouting.net by witcher.mxrouting.net with LMTP id qHXLKjlOD2mZIyQAYBR5ng (envelope-from ) for ; Sat, 08 Nov 2025 14:05:45 +0000 Return-path: Envelope-to: hi@josie.lol Delivery-date: Sat, 08 Nov 2025 14:05:45 +0000 Received: from am.mirrors.kernel.org ([147.75.80.249]) by witcher.mxrouting.net with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1vHjZZ-0000000A8vj-18sS for hi@josie.lol; Sat, 08 Nov 2025 14:05:45 +0000 Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 17C9F188F1E4 for ; Sat, 8 Nov 2025 14:05:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 070B7156677; Sat, 8 Nov 2025 14:04:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ukJmUFkW" X-Original-To: stable@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D657E7483 for ; Sat, 8 Nov 2025 14:04:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762610691; cv=none; b=roirW9FfqK3PVZ00yile9twOSxMpVx+XWJdcstJ5fdwqOveulBULg0D24ga