Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp66537lqs; Mon, 4 Mar 2024 15:21:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVBWE2VdF+H5jYThFe/A3gWvMS7Qwmt08BMVxNS9albE6ImOhOyVNH40Gz9FXnYIRg1c4NMjaz08l8+ij/fMRRUAAyLYXRMudWKWo95xg== X-Google-Smtp-Source: AGHT+IEGrLIUoESBkxGFEPReB4uBzIj57AH6sV+RjpoQ9z5/P4j84vuhjSVy+pUYUtOe8kciIndE X-Received: by 2002:a05:620a:19aa:b0:787:fd23:bbc4 with SMTP id bm42-20020a05620a19aa00b00787fd23bbc4mr536943qkb.38.1709594480821; Mon, 04 Mar 2024 15:21:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709594480; cv=pass; d=google.com; s=arc-20160816; b=EkzM2mKrqO3Qnfuxxm8vXokzoXd14cKxyrnpBcP6jeMdiEwx0MoldtDITA/7Fe84Ew VNRHycx9a//BgzmqlSkOKPNQJ/h5Twz+OSQNEmUQzp356eOTFZY9MyYkNyT0ba3aZvwr Dh4DER2imoqPMoyJ+sUYamWy3ZTbs18efSzmaiPnTT5IptMa/gU5uD8CpMi+Ff9fiCEG eZo5MxOmZePoMJugFclcs85EnT/YDQ+BNEuVIcyCVdYJiPb7N2OWy3jnIXGPHkLq8OHL DVZgORC1HiXcH0XYK7Vr/b1bv1FpUfeGy3lWtHmKCBmCYgltemERCD842DUYldEzX92I +OGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=WfyiMDu4k9WJyJDcAdOCLHKLoRNRZ0hT5SNlHLbFleA=; fh=8VEHrcrF9KJAX/0wbBB+pN+MyhaV8fi9j22fvfQ1TCE=; b=lnR9OiZRAFLQW2Ap/U+oZ3gjS/YqZbouE9tjPIQd1Iv4EtkkRV8VGhWz376WIT7XBQ bMPfAa7GK0UVVtaltLcs+UHENGrPPaOjd1SwQU5Vb9V+QvFpFE6AZ9U4frb6pKvCN0VE QvLyhnAkA2V5dy3fZ179/v4b4QVEdj3IEWStdCa6FGHICGi2uJLuj8yAXE+TvumuQItd /bBwNjZZ/JnsxQU/tYFZ6IfeP60OL/vaPfhNJe0wbu7meuRllIpyl/TiG/OTuHWUsbqF zXX60k8l0G8XJelWi/OHJ6FP66Sc61twyn12P/RDI9X11i4bTRyxJ0vdSoeZ3Jty+DzD j9NQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="M8pq/eUN"; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-91402-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91402-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id yf2-20020a05620a3bc200b0078833fb85c1si360389qkn.570.2024.03.04.15.21.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 15:21:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91402-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="M8pq/eUN"; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-91402-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91402-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8A3E41C2229F for ; Mon, 4 Mar 2024 23:21:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EEE5E7C6E9; Mon, 4 Mar 2024 23:21:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="M8pq/eUN" Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (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 016131E4A2 for ; Mon, 4 Mar 2024 23:21:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709594474; cv=none; b=WuoZBn7+fTzkJisoB8SP0A4zHsZNeU+AVzdoDriydtan6/TOl9iXczc19QKWKDvfJ/5hf7oku8OwmAv55aK32gS6KQwGfZInTokx7qzfzwlLiBBvJtrre3NmbcaQW7/BTx/04OGXuCUjTvEFod1K57Jdh+iTlXL8b3Yq12AnPLc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709594474; c=relaxed/simple; bh=L8wre41DKSFxRx1jDCxqg2DDV/BFGY6G8DQ0Y942V+A=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=P+gjIrR/27LSpXITB3JmBRwRVMQzY48vZMyJYZGjCYUvt9ibLsF1XXSPGpJY197wgIaijPBk+exzSYLGLQTivyczIF5ui2WceDCf2x5HbPAGTGC8MxXKmuzucHISyPg2U1IAADsQc9jTTAaFK3kgUA/rgKFsOWIbVXL9tJ9Gn7A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=M8pq/eUN; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a44628725e3so640429866b.0 for ; Mon, 04 Mar 2024 15:21:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1709594470; x=1710199270; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WfyiMDu4k9WJyJDcAdOCLHKLoRNRZ0hT5SNlHLbFleA=; b=M8pq/eUN8gLP0duLV3YA+XUI9rGrTBjs2ts8TXLbt9oXdpTQfUFMpA2GucHKBwjg+U lLUgJU092FA/C9ByO8CsGWJWy+cWt8QoCjSJrHoei075s/lLEAvXN79fhMts931adnVb t0UTIXPSD/H7MFU0RBwqH8lT/QQMXCmhub8Lo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709594470; x=1710199270; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WfyiMDu4k9WJyJDcAdOCLHKLoRNRZ0hT5SNlHLbFleA=; b=PTdiwp3/lR1hgZCEyJda1z34j7rfTH6MwXjDojUPZD2GEF/gPkYJLo4t7yasmjUgZi J7jd4kaYO9f45BUmee0rZTBBVB9BXkTsyezDoUjoZRs/4DswRKQRKZkjPEVwY7gr56Vb Ixuqz3kpA+Wb9ATshbiq4Nbw1957xytEWMOsmwPUAVFjOxGKZ9uAWrD5kPyzfqlKKOgP ZyhuORDDfrJ6JzWAlhnw4BuJBMq3EWkgZJBbkP88zoQQCoJUHcL4csdR0RN2Vl8BjUoY UseOiVUay6MODjGb2JFXn4lkrkaMM7xYB/+uQjYj3aSRnwU+gNxigcfcLTeG15RHB8BQ upVg== X-Gm-Message-State: AOJu0YyWVOk/GXD/TDYGfVO+NDl+bLw1ETe3UkeUUu0vh6O6U8j2Z8my TSol4zon21Ge5ENJITJ/gehzXHEYj3mFqVAd4jH2dHQC/IIdj990hv8kAUCGYd16axQMb54C4D9 GiKE= X-Received: by 2002:a17:906:c30e:b0:a44:deba:2e8 with SMTP id s14-20020a170906c30e00b00a44deba02e8mr4875032ejz.69.1709594470014; Mon, 04 Mar 2024 15:21:10 -0800 (PST) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com. [209.85.218.47]) by smtp.gmail.com with ESMTPSA id y14-20020a170906070e00b00a4582d12253sm831808ejb.25.2024.03.04.15.21.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Mar 2024 15:21:09 -0800 (PST) Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a44665605f3so536844366b.2 for ; Mon, 04 Mar 2024 15:21:09 -0800 (PST) X-Received: by 2002:a17:906:aa0e:b0:a45:4ba5:2917 with SMTP id ko14-20020a170906aa0e00b00a454ba52917mr2701230ejb.75.1709594468963; Mon, 04 Mar 2024 15:21:08 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240302111244.3a1674be@gandalf.local.home> <20240302145958.05aabdd2@rorschach.local.home> <20240302154713.71e29402@rorschach.local.home> <20240303075937.36fc6043@rorschach.local.home> <20240303140705.0f655e36@rorschach.local.home> <20240303160024.458d4f91@rorschach.local.home> <20240304164205.3245608a@gandalf.local.home> <20240304171034.08d037aa@gandalf.local.home> In-Reply-To: <20240304171034.08d037aa@gandalf.local.home> From: Linus Torvalds Date: Mon, 4 Mar 2024 15:20:52 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] tracing: Prevent trace_marker being bigger than unsigned short To: Steven Rostedt Cc: LKML , Masami Hiramatsu , Mathieu Desnoyers , Sachin Sant Content-Type: text/plain; charset="UTF-8" On Mon, 4 Mar 2024 at 14:08, Steven Rostedt wrote: > > Fine, I'll just remove the precision as that's not needed. There was no > other overflows involved here. I really want you to add the size check on the trace buffer *creation* side. I don't understand why you refuse to accept the fact that the precision warning found a PROBLEM. And no, the fix was never to paper over the problem by limiting the precision field. Hiding a problem isn't fixing it. And no, the fix was also never to chop up the printing of the string in smaller pieces to hide paper over the precision field. Again, hiding a problem isn't fixing it. And finally, NO, the fix was also never to add extra debug code to see that there was a NUL character there. The fix was *always* to simply not accept insanely long strings in the first place, and make sure that the field was correctly *set*. IOW, at *creation* time the code needed a proper check for length (which obviously indirectly includes checking for the terminating NUL character at that point). Why do these threads with you always have to end up this long? Why do I Nhave to explain every single step of the way that you need to *FIX* the problem, not try to hide it with new extra code. Linus