From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 43A6238228C for ; Thu, 16 Apr 2026 08:24:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776327863; cv=none; b=dqyZaiP3KL6wXT1yC/0R80UzUGNkoOqm8KSK2pwHttMHxV5dVnwzKXHJSZpRO7CwbfKh9AWI1jnI9i8kILgeWqhqLX7r0f0KvfWL6DRhDRcdq29Dp4oYsFVYCILd0g4vURdsJwqzzoYAOwhkjtsiGIUsdX1rb0Vl0OdDONg8Tns= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776327863; c=relaxed/simple; bh=BolRQkYlh9mtTOrBSdsqKgqeFzE356E2fM5JWzOZdhU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pCHzzOLo4m5KqogoX+tABSa5AnZNIVYsvggk2NA90EUrPeajzkpBapBZf19M4X/8rowcmv3769sxmgl/ZkGntF/s60VV3xncFcCI/g22X1KoUN6nVvrWsKoKF/eXc3iI8mQYjCP198Kfb0BjoIORUG0b4qZpw/WQsY1oVwNO0Ck= 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=QWSZjCAh; arc=none smtp.client-ip=209.85.128.42 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="QWSZjCAh" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-488a14c31eeso61006995e9.0 for ; Thu, 16 Apr 2026 01:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776327859; x=1776932659; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=U9gaYFQm7e+OPsK3uV9LKydMJoBgr2bMgA6yHNhYj+s=; b=QWSZjCAhCYRmQqIBlLqDgT2C7UBp3C3C2O7H1aa5SzHFpwwTEDCqTTmJdD5/ys+p6V fR1BCUhfZ/7yJqUcgSzTqYc1gEDuhSVOrviwrusJUenJkMksdovUoGxI6nEm/JuprzAq N0D/B+tMXuDqk2flNUjvSFossJsRdcIN7tgbh6YqXYg91Kvoog5jTAFauUiiUWfPDz8Y 92/kIed5dH/SXKwCx3iPg5g8rdW3tRME2Lf9ZK3qIHnx1aY8P2tnRw4TRfZdarmLYG7f 5aNGaIcbXXLhdrnDqiD+wnhGk6uYyG/ay/+JH9hxIliv+z0pfYHF17MhqsDnr9XRb2vj kApw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776327859; x=1776932659; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=U9gaYFQm7e+OPsK3uV9LKydMJoBgr2bMgA6yHNhYj+s=; b=Uz/+apN/rIPlmx6pccUmG98OExNRP9j2KRiqDQ8mSMUSCsJZ3O47s7s6FCZzgcK5Uw qXczu4VDdhmb6p+y4Auht4aH0lz9b1soM7VG7O2sG95kj+gRKyTtkt9tovDdyz8PnIUe RWu2RYeDloWvWKSsWI74nbDIS9s3UqjJf6yNTimIwgxBt/A9hXBvz/ujsVUcdWJTYXi9 DAmnrgmdu1ex7dHWblopCRAecEadUBPht8YnfLep44zG93KwSPt5uJLGqnUhRySdvJ44 m7LeIxAy0trp2q2ML6LkUH5jg2eqjvqk8hq45x6vIFW5dkkb0uTU6E8oiIgmYv8R+Gjq gJMg== X-Forwarded-Encrypted: i=1; AFNElJ91l3/gh3AleXYmSUIGg2Xhl0KsEOh7ipmLYFtOsfFyr6AWUw1rdy8tGGFAYz8K+dZR9+qAtfvwB/Sa3o0=@vger.kernel.org X-Gm-Message-State: AOJu0YwoSWSZuY9Lvt/v6pr/yjGnZ8IdguIzXuWRNa7TccDSYeEWjFkC eadRGJ+tebwxi3mN6+Cs1GRA3p00RHie6ilbqB7l52+LHlhxkIH1VDoL2OnLusl9+NQ= X-Gm-Gg: AeBDieuomMy4QuaWqM3gcAOud8gmYH0KiuNLnbMjozUvsgeVAYAkMvVOIlyHs4Uzi6e QLypw2BLuzED5qQwWYnubnOhXVTbcg/cH87dS0Uw4yJIuj7nGVRAzrU82Sr7sUhRwX5XVFB9KP4 XHb4ZgTmD8gJs3WdvF9/PRXOCr1Ln8jsBpa3AdVXMOlk+uyKla6Dz7eynvkT7ws5Bqc0Oa/nfYK tyu6llRSNSLGnbW4ngX9ll8kVD9vejmn2QJoanV5jBALZERdo0XvgUlYth1Z/N7PV+0gZCKNGiH 0+x0w9SnzhhXd5jbssbs5uCPn9FiPK4o+qBrXTW8JhLeZRJ9v+/65LcTgfdYqXsgesLDYopdvGQ uOqr8JJu5e8SlTuWqOO/VNzPM++e97G5VzG6TNQ+3wXsnQUQZaMLiwoIIW1WBmhsc/rWveYBuPP +8u13/659uhjXt+/aMT/WRuY4Subrs/8VxwaGqBvkM X-Received: by 2002:a05:600c:c0da:b0:488:936a:6220 with SMTP id 5b1f17b1804b1-488d685b577mr291830395e9.21.1776327858543; Thu, 16 Apr 2026 01:24:18 -0700 (PDT) Received: from [172.17.16.20] ([213.137.22.193]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488f0ad1e4fsm71691115e9.1.2026.04.16.01.24.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Apr 2026 01:24:18 -0700 (PDT) Message-ID: <5bbc2d46-0876-43fe-b72d-e9693775578d@linaro.org> Date: Thu, 16 Apr 2026 09:24:17 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCHES 0/4] More perf.data header validation To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Thomas Gleixner , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Namhyung Kim References: <20260414204847.293557-1-acme@kernel.org> Content-Language: en-US From: James Clark In-Reply-To: <20260414204847.293557-1-acme@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 14/04/2026 21:48, Arnaldo Carvalho de Melo wrote: > Hi, > > This is picking up from what was reported in the previous > series, pre-existing lack of perf.data file validation, processing files > and buffers in header.c in a similar fashion. > > There is more to process in the trace data, but that is a > different can of worms that needs to be dealt with in a similar, > upcoming patch series, > > This is probably 7.2 material, but if feeling this can still > sneak into 7.1, feel free to do it :-) > > Now lets see what Sashiko discovers while I still don't have it > running locally right after Claude, before submitting it publicly, which > will soon happen :-) If only checkpatch.pl ran Sashiko automatically... It would be one less box to tick to get it right, of the many many boxes. > > - Arnaldo > > Arnaldo Carvalho de Melo (4): > perf header: Add section bounds checking to the fd read path > perf header: Validate string length before allocating in do_read_string() > perf header: Sanity check HEADER_EVENT_DESC > perf header: Validate bitmap size before allocating in do_read_bitmap() > > tools/perf/util/header.c | 33 +++++++++++++++++++++++++++------ > 1 file changed, 27 insertions(+), 6 deletions(-) >