Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3351043rdb; Tue, 6 Feb 2024 15:19:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJgY9ufKt+fpyKhIwQpFcw0pqmAt1jrKiwIrzM3tEcThIhDUbEe/l3TNxTXbC57LwjV7W/ X-Received: by 2002:a05:620a:2e2:b0:785:8c58:e336 with SMTP id a2-20020a05620a02e200b007858c58e336mr3520388qko.54.1707261550427; Tue, 06 Feb 2024 15:19:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707261550; cv=pass; d=google.com; s=arc-20160816; b=F+QsOyn7s6MQpaThfCbrALAztCt4bcVnFfauHE/EIlqBdIuH97GAXCBQMol8s7VLSk HEFO+n0QXOYzd9+sIrpP50Eigno1+dlWGHHTGzR5l0ylIlbrUE7EwyGft6xFiBRXT3OP JCS6pnUg+rzxukk/mzVpSzlZboI5FJFcwQIxN04rJsTVV0Or60Cz4J6hIysiJjdcgd0j lj+0Gwu5P1DZYabHWkeuCb1jT/0oPKYQOaKrT2OwKOLidw2TmGkudOewQD5Jn58Hnu2q hYnjz5zBYqXXnCBxBOs9EUupvCDMFjEG8/O55/KA0JMRyQ1yHwGKk4LpEl1xN+KZhyBb tMyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=jPqZ7Ip2aFum8KHXYgnBN94F/8KhHuRmg9GEgL52ccE=; fh=+yXH085pU4DgjY6bxTBstBEwghXHh0jLtSAmNvh8RSM=; b=zIscX1oSibP5V8UmZK/TYw0pLjY9RU6waaGLPlR79iQWPjPDKVc+zbrS6JbqASBNxe X0uLo2GMTxV4LWXHEy+w42RlZsQOvn7oUDNW1+iWdAfuFck5vJ/MYNaFqtEjjjNFIjDk qLHgONzfi5wYO7sUBWCxZdcGYsM1VLrATKR0MK4qG3mFZIdPNld58FsS5nHRPJfNEkU4 sAtTIjIet4EUYK5+8/6XhiyH7ELBoWOQ+Isl4ZlzwfIws5+O+xz3ETxvTlWOjN1q6eYU kneYsaSBZnxmjpm/x6CzUE4ZoLh7Tt9+vWUH9TcaeBahRHEEfRCnVIq7QHMTvNMDwZlo s/gg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-55719-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXoHSHQ/NbYXyVmCETVTTEooKHBMfvNCfMeb2WuaCeQixp68NNfzjfYGW99Qb229wIbrMU+AGp7Ge76Y2lvcN1Tsr7YztP28fvUJ1xfbA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c20-20020ae9e214000000b00784069227d7si3472566qkc.626.2024.02.06.15.19.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 15:19:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55719-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; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-55719-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 F2B641C2466D for ; Tue, 6 Feb 2024 23:19:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD9C31CD21; Tue, 6 Feb 2024 23:19:01 +0000 (UTC) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 CB6251CD17; Tue, 6 Feb 2024 23:18:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707261541; cv=none; b=KEk/0DtTytYfkHDBGt2YaGdkQqgBrytHvmtUtpqropeHnE3oPwxui3WvfjedJtbCIowfXkBwfcSxFPhqzDdbNOgGUP7JNmfv+98d1PKhQ2SvPF/Cz0Mv+9uqSHd2Alu3z2VR/R5DQtFLJSwVRMwt8QR4skDWMR2otQ1iabt2EYE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707261541; c=relaxed/simple; bh=sMgP9pFFHrMMIn9L5CwdZGP8g4NZPoWoa5cyyu4+TPI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=lzDozJQbKNZc4VuZFcX2vAcoZDq+sNq1Vg+orY1OfH/wQfTzfb0ftECesE62Nmp8ROLBaH+toI4P85dP6VW993afqsZnwNlcjFnb4w4sBovs+ew75VMacuOvLLJDf64Btvaq90k8rRZDFoyH3ZOlLur84Irk2j+y9TxeBlB03vg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1d93ddd76adso564835ad.2; Tue, 06 Feb 2024 15:18:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707261539; x=1707866339; h=content-transfer-encoding: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=jPqZ7Ip2aFum8KHXYgnBN94F/8KhHuRmg9GEgL52ccE=; b=TgyFbeKVfis3Q9Z85XbqgfMTqjAQC/+uo2VirVhIMbhJ8/iccl1qWhQXhZ1YfXiiIm 6EV3Z7kwJr9R1cKKtkzCphhXDBtU8vHuj3FQVpqTUCkS5dYtSYY5N/zcglAtdBWGmxiD MsdZP7jR7SthRPzs0H5n6ZGpvnopEJjKL/Tyegdjdk+hB8qvsP0aAzQArmHfjVHxy4r/ azSYk9fN5TliBWiIsW8TtODsOd/W08zAHkThHFiM8KvSFRvlnupUtp7qGuc9YemRdBAG PZeawswNQEE4dUnf3ffXbESrixlfXfFd/vpmcgQf7KNws4ACg7Ori6Yqq/gOk0qJz8E3 NNhA== X-Gm-Message-State: AOJu0YwYx2goUwneLsSxVowUj7HrY5Vgiv9PgCZAIJOUmlf5gDjfeWfV AxJCeVf5CfMlTU/NEs9604Riqt/vRifH3XHi4xDAkowyiDGvVgssbPfZJbq6n9EGdIKRnA0kpye /kkZn/QBLxThaNpQcCvyav+jFBwI= X-Received: by 2002:a17:90a:ac0a:b0:296:235b:ac61 with SMTP id o10-20020a17090aac0a00b00296235bac61mr1162467pjq.32.1707261538839; Tue, 06 Feb 2024 15:18:58 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240202220459.527138-1-namhyung@kernel.org> <20240202220459.527138-15-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Tue, 6 Feb 2024 15:18:47 -0800 Message-ID: Subject: Re: [PATCH 14/14] perf annotate-data: Add stack canary type To: Ian Rogers Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Linus Torvalds , Stephane Eranian , Masami Hiramatsu , linux-toolchains@vger.kernel.org, linux-trace-devel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Feb 2, 2024 at 7:21=E2=80=AFPM Ian Rogers wrot= e: > > On Fri, Feb 2, 2024 at 2:05=E2=80=AFPM Namhyung Kim = wrote: > > > > When the stack protector is enabled, compiler would generate code to > > check stack overflow with a special value called 'stack carary' at > > runtime. On x86_64, GCC hard-codes the stack canary as %gs:40. > > > > While there's a definition of fixed_percpu_data in asm/processor.h, > > it seems that the header is not included everywhere and many places > > it cannot find the type info. As it's in the well-known location (at > > %gs:40), let's add a pseudo stack canary type to handle it specially. > > I wonder if cases like this can be handled by debug info rather than > special cases in the tool. Special cases are fine too, but are > potentially less portable. Agreed, but I couldn't find anything special in DWARF. Thanks, Namhyung