Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp88833lqs; Mon, 4 Mar 2024 16:19:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU7kEq5IeaV8B/gSVK/4JzvQzf/9hJuHhtxaRrPuLL8cOq9mRTUTOhstADNq5lq2LLFOJD7KZ/cahKajvmcqInw5WrruAeGfv3LXoEq0Q== X-Google-Smtp-Source: AGHT+IHd1C8Vz+XXqqboCFXx5HNIddmHit4LDdt4CNXjhRMcR8SEMwgYTv3mLwrqjugBhlATrP3X X-Received: by 2002:a17:90b:4b10:b0:29b:4925:9f30 with SMTP id lx16-20020a17090b4b1000b0029b49259f30mr4103970pjb.25.1709597968663; Mon, 04 Mar 2024 16:19:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709597968; cv=pass; d=google.com; s=arc-20160816; b=D6mN2Jaup7ugPSTLzFT7LWSQuYOou4HdXadC58VYCQt0kd3KMnkDDDAdb9pFEV+6QR uqnuZAJtDfLs0lm6DkzyVDWOEYsK98Oq215H7KSWiX7fDyYA48WOauQl1SPzIq2iSWRC /W0v8wRcFa4Azbs5XhrNt3kzwcnvNtrZBPgPnIKCepFm/w+GWBHDI1Qh04jsvVEclKVd WTZRfw9E1kUUBGzRvrRRmbAZNmf4OgktqeZwqDBJ8XnuZiNcVfL/4Cc3Pf/Bx1sqtPvI DYGWNweKKbK4fKr84UAaqPrVhEXuBp+pZaufIlWg0oshln3kmdOiQz6+mtAAg9utCnxi UyYg== 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=04RFNLETldESkGJGwcG8LM1lX28hFKdyu6jyBc5NNUg=; fh=8VEHrcrF9KJAX/0wbBB+pN+MyhaV8fi9j22fvfQ1TCE=; b=ccs+3Eqvu0HHQvg4YSz1VURek4Qto0KPp1KVgIteIa2l8eSdg4yt4mBljU0fkBD1wA wu/MKsOLFj2DZhgksgxe8jbsfaXTtQuEH8N6BcUUm7Oiep8ms4NT48PcO8qHmC4zpzbU TAc0sESuHsYNPfrzAQBpdLtKecgpufEfLcx46fffTB4yp9bcqS/TQ8EjbAkEZ3Zz8VBZ JwLd5dI5Oa9rqgfllaq3cSxF7B2zryHZvqGf4MunSa3k9lp7WHYSVXNfM1YQnb442UIJ jmhKBFNNblTrOCrNH0W7ANTcqIrMYIYtmF/tme7NNQMklaMbPZebG1nE36Y5dkpgmxu8 GEeQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Kb3JD2ii; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-91441-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91441-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id r9-20020a17090aad0900b0029ab64f69bdsi10984403pjq.111.2024.03.04.16.19.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 16:19:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91441-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Kb3JD2ii; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-91441-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91441-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 12AC2B22A65 for ; Tue, 5 Mar 2024 00:17:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A7E7A257B; Tue, 5 Mar 2024 00:17:38 +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="Kb3JD2ii" Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (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 CF87363D for ; Tue, 5 Mar 2024 00:17:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709597857; cv=none; b=bryxynpageE71tA+Bf2bppoTc4xZrxu7X2/JvNch2iIVa0UE9DxM0lMwdNc6p5vVLQOBG/IMRNIUlOGSwZDRuPh1Z5jY9Zis1+an6Xa580W7yeMv61THfeoqeh102lzPLZedPM4wvUIYwz2TtmNt8xGe0B708kOg7B8FjNWhCZ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709597857; c=relaxed/simple; bh=EGdt9lHTEjDMZR1HMzL2el49l+RGwZsoTUfjQ6aH4DM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Eu+Vm2+rzKwaHst/UFF5fY6qdJTpXr4wSeFGRLgMDAuGYef4tF1UYWaG8gWMgR5vJmqG1iDVTvZycEFLrhoAq6H2fnVUgq8HMHdLEm8NmEYbhdsLncAdBSYXrTPzPb8h9J3JExrREqNUXF8FsIPD4uiB+n1M3Bg/77+qRQelvdw= 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=Kb3JD2ii; arc=none smtp.client-ip=209.85.208.169 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-lj1-f169.google.com with SMTP id 38308e7fff4ca-2d275e63590so72943951fa.2 for ; Mon, 04 Mar 2024 16:17:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1709597853; x=1710202653; 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=04RFNLETldESkGJGwcG8LM1lX28hFKdyu6jyBc5NNUg=; b=Kb3JD2ii6BL1wVJ8B0eoLy0j3xwYHYDhQQKII09NHYl0/cE+wg8tlrM2PYrWfKr7ZW t2u3NSB4R6Mm+p9CRbZP9AeGa7Pf/tuRm9jSyu17NbfvK07fkBEdu9pkeR1b4ucU4mha DuMNdFAuPSFGIfjMS34DmchutKR3XznsvBrzY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709597853; x=1710202653; 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=04RFNLETldESkGJGwcG8LM1lX28hFKdyu6jyBc5NNUg=; b=N1JvhtQK3zS697pQl4LRiEU9u3NqhBVvB5lmRgWbHrpLtiIaNmjg8Fx2/Ma6Jy6Gl6 RSW3ZHJM26UvAZb7jjoeL/IOCrhRrYi1mpkYBJAfioHltAkDam9xIYTcASSmQM0VeDZb tg+1eqdl6iIwdzccjJ70RzrNc7jyulTfb3ajJXQYfnJE+TXhv+wbNw7wcPdXyuMW7OIt OaB5PyDFmR9fTdD0cJ4KvFYuujuzSRbJSa4wgE3tTYv0IbO5qk3/GhLS5ORFeDo3JMws rXNMRXZUJK/M0m7cUVQY3ouvHdaAM+RWXwZozyipd8paenxjYSS0uXoG18vfRs/WN/F5 k5Dg== X-Gm-Message-State: AOJu0YxtF+yeFdmi5L5rzezVqbr6RhdMHwzaT3pCEHjRoyoLBZp8mhW6 7GmVXMGHHeqiTnPif4h6US2jo3thsJzkWtDeI95oD75KwSAmZAFqj2fF3n3RmZC/CPl7PSwJGvg UOvQ= X-Received: by 2002:a2e:884a:0:b0:2d3:a1fd:4ad2 with SMTP id z10-20020a2e884a000000b002d3a1fd4ad2mr240078ljj.37.1709597853605; Mon, 04 Mar 2024 16:17:33 -0800 (PST) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com. [209.85.167.42]) by smtp.gmail.com with ESMTPSA id y26-20020a2e321a000000b002d2ddcc12acsm1913955ljy.42.2024.03.04.16.17.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Mar 2024 16:17:33 -0800 (PST) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-5101cd91017so7099123e87.2 for ; Mon, 04 Mar 2024 16:17:32 -0800 (PST) X-Received: by 2002:a05:6512:3ca9:b0:513:2508:7b2a with SMTP id h41-20020a0565123ca900b0051325087b2amr212844lfv.65.1709597852572; Mon, 04 Mar 2024 16:17:32 -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> <20240304184725.55449e70@gandalf.local.home> <20240304185241.7ce42097@gandalf.local.home> In-Reply-To: <20240304185241.7ce42097@gandalf.local.home> From: Linus Torvalds Date: Mon, 4 Mar 2024 16:17:15 -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 15:50, Steven Rostedt wrote: > > But this still isn't fixing anything. It's just adding a limit. Limiting things to a common maximum size is a good thing. The kernel limits much more important things for very good reasons. The kernel really shouldn't have big strings. EVER. And it literally shows in our kernel infrastructure. It showed in that vsnprintf precision thing. It shows in our implementation choices, where we tend to have simplistic implementations because doing things a byte at a time is simple and cheap when the strings are limited in size (and we don't want fancy and can't use vector state anyway). If something as core as a pathname can be limited to 4kB, then something as unimportant as a trace string had better be limited too. Because we simply DO NOT WANT to have to deal with longer strings in the kernel. Linus