Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp256491lqo; Tue, 7 May 2024 20:53:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWDMlJgGp7T0uXFN+J2G8QfY0xKdGJwQAD4ahH2usJOWoPkRxx3PtpTiGE5LrfSp2Bve/+7ZF181cC+cR0o5AHpb0X2KhT+oIh0+a7y7A== X-Google-Smtp-Source: AGHT+IFLLJfPMdSAPfs3bm703NF9tlpUseXk50Ef+8qIPI0w15FltK8OczkMIJcrDhipqQObLsLa X-Received: by 2002:a17:90a:4489:b0:2b2:a1d0:b61c with SMTP id 98e67ed59e1d1-2b616be9ac8mr1267209a91.47.1715140413667; Tue, 07 May 2024 20:53:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715140413; cv=pass; d=google.com; s=arc-20160816; b=J7TnFxOyVALJ++64RBlE31jIsjjUskqF/g9kM2Z69UarplF3r/Wg5/ZUbhyxE2tYTY myz8igVuJcL+Z01+j7RuG27LISnGKVluuTf3yu60hnJe99QPZB/ImsDEmVSl3At+T7uw U0RvwqJKO5wdiTL4EVNG9e5rO3FH17Z3EGUIUiQpxhFylpHUxYXXSyhG0Wz+IxlEII1j 6pDc3lKML33LnmLZLevyWv6oKgjPHf3FKLZKjjakMsf4KADb9814GeR3tdychvDXTuxy 17GXwsOU3laqQ4FGi7EDQRdyXJUWo4zoVEvMpwkb6LJrIgCu40tKhVIisrfdBBK/kWmz JxZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:references:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:in-reply-to:date :dkim-signature; bh=oOhzXSP6otJeiz7ZBDaSPLWGciNNQafio/HNsvoqc5c=; fh=B1FMRqKw03mCpJ4YEfZXw33AkD9bnq/ksHHwXUqzmWg=; b=eZSZPHUzZCzyXJwsAANZdZt2U3ZrldtNXz0Q1cPrYjBK/WAb/BX+HfxcqvsE27MkX9 VhTDPCx/aGCtupTYq3kQYmKTAQFS+Q3MbcHEdL3pBqXMF++Pa4RjcpWrhTQUgT650y3H NgzQl5NedR+13ENLgH0DsIRUG6Jdi1DBjmmbBcr+OVaQS3jAOaLsoMgix5Od2BT23cJV BY0M2zJlLvy1ZW11RrmB8Q8RGCsJtw1ocRNauzD7iDlUCawjBhPPCGiscpGqmfMHjr2v qVyfd6riE8Wp/XGrXNwfIN4l8MXKFi+2jZhhuRU74yBVupgCX9lJKLTDokpHJRjfxKbP nb0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=iWE3yBUn; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-172666-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172666-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y9-20020a17090a1f4900b002a4a80f2d6bsi512999pjy.112.2024.05.07.20.53.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 20:53:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172666-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=iWE3yBUn; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-172666-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172666-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C17A0286A17 for ; Wed, 8 May 2024 03:53:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BAECE14A90; Wed, 8 May 2024 03:53:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iWE3yBUn" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (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 3384A14A83 for ; Wed, 8 May 2024 03:53:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715140396; cv=none; b=j3gxlX19e3FwnO25xzNktEfCXzyaGscdKNx5PCGsGmJ3ormJkg8aZ+0WrjsnF5Xp5YMtBfEYvSr7756IZP3KomvmAzbKtIiGQ1Cg2PbPDqqtnihl/Cvdguy8jFUTxogq7d11aScKQ6wxJNuUoecBCYgIc1xlABiF9P1OZuXeG3s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715140396; c=relaxed/simple; bh=QMqkJn+f/ByB+G/3NLfo9IraWlPvx4FuOXniSmKNgUk=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=mYEVtGzmwXpdAyiwmrZmmj+54BCahIX6uHOCTOQ8V14YeWSsXrEK6NP7RPUXFlhflGmnoWJzAsCvmGWxyoVHPs88APZ1Qs+GDFWRkeZpubI+pKc6wE9/TmljiY4/12kHoqbtcp9E/mi6QlyGgP/Imss+CO1dZx1cUDftKrrWLO0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=iWE3yBUn; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dc6ceade361so9027964276.0 for ; Tue, 07 May 2024 20:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715140393; x=1715745193; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=oOhzXSP6otJeiz7ZBDaSPLWGciNNQafio/HNsvoqc5c=; b=iWE3yBUn4q9qc5Q0zrSomt8CUnuw1EdJsuVjnIyZgBNisvFmDE3hI2iKiPUpZV3uXm zNi94ENyYdedtj7nctgqZmJZTK5rv9ORBgB+mscIG97EG8IISKPKZcybDV/wfFDhrPtq zVcY8C6qzyTECjTUZnFnmLQ9j5WmXzpFgCza2r/C1EiJyT+6zmyaScTRkQtaBzPCUPCl U2sNLfRno8azuujFt7WMyFaXH7Ateww7m3q+PHz8odC7w/ipVmvv8VQjJuxmxegqHPxx f41FmZyE4DOk6sZrj9ItN3bcimiFGN3Kx+CijLLO4ZdhYFY5JFZlOLIUufzpi9hMi9Dt NczA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715140393; x=1715745193; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oOhzXSP6otJeiz7ZBDaSPLWGciNNQafio/HNsvoqc5c=; b=OW7WLFPkEbEuVc/nHSCgDkV40YrkxU3cNJCBLyXT5gaeYkwp7szMgDdGvDIxhQtGgZ Ploa26KZ38HAeCY3RJByZxSZ4EwGEl8wQvON4+CBIQwP0BBQauAJFdwq87NSeu/po6sg NzBESzvCd5bF5cOCxZZdZzkNv5x5NN3yoAfisJqE92QLKXoDpbgUCLWv2IIDUlZlxgrh +AIsT4MMZ+NO+l9XdwDKRNxz18yL28GNlIGUMuytHESkuuvj0OBgGA+U+4OvU1h24Q7u e56+LOj6V1dlEz8OYOy9wyDsy47Ok+jymAD8KKu4Uik6KIlnAZ+vfA8GuMNX7/9hOst4 7JTg== X-Forwarded-Encrypted: i=1; AJvYcCV6XPw+BrGiRGIlXvYE3siJtG4IhnXuAOrPfV5hJIDCTI29aB+eBGIvKZXCds9MQdkte/fLPv23EQ9SM1wLxTB6tN2tdEYigaP7yAb0 X-Gm-Message-State: AOJu0YxAqzke8DlyM/lhrZbADXzhZ77fYVIVj+WSuxHBgrXKxdz6cRM9 3JM9AGRytbQZsae0ivdDOfP+kiY/1OxpWeYAFHUJzOVhfM84SCyJbAIKIvr4jJX94mRJnyH78a8 5QRultQ== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:56f9:40dc:113f:ba3]) (user=irogers job=sendgmr) by 2002:a05:6902:1207:b0:dc7:68b5:4f21 with SMTP id 3f1490d57ef6-debb9e38e6bmr489657276.9.1715140393229; Tue, 07 May 2024 20:53:13 -0700 (PDT) Date: Tue, 7 May 2024 20:52:58 -0700 In-Reply-To: <20240508035301.1554434-1-irogers@google.com> Message-Id: <20240508035301.1554434-2-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240508035301.1554434-1-irogers@google.com> X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog Subject: [PATCH v1 1/4] perf ui browser: Avoid segv on title From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , James Clark , Leo Yan , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" If the title is NULL then it can lead to a segv. Fixes: 769e6a1e15bd ("perf ui browser: Don't save pointer to stack memory") Signed-off-by: Ian Rogers --- tools/perf/ui/browser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c index c4cdf2ea69b7..19503e838738 100644 --- a/tools/perf/ui/browser.c +++ b/tools/perf/ui/browser.c @@ -203,7 +203,7 @@ void ui_browser__refresh_dimensions(struct ui_browser *browser) void ui_browser__handle_resize(struct ui_browser *browser) { ui__refresh_dimensions(false); - ui_browser__show(browser, browser->title, ui_helpline__current); + ui_browser__show(browser, browser->title ?: "", ui_helpline__current); ui_browser__refresh(browser); } -- 2.45.0.rc1.225.g2a3ae87e7f-goog