From patchwork Sat Oct 28 19:55:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 738987 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c47:0:b0:32d:baff:b0ca with SMTP id n7csp482902wrt; Sat, 28 Oct 2023 12:56:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5mHnUQ3EFW7RDPp3Zy9Fnn4Ar1yLY/zCPrYrFjKomvJI1IR5o1yDNd3kdJ4qyHyiOwLb0 X-Received: by 2002:a05:620a:bce:b0:779:cf70:8482 with SMTP id s14-20020a05620a0bce00b00779cf708482mr7042588qki.57.1698523016911; Sat, 28 Oct 2023 12:56:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698523016; cv=pass; d=google.com; s=arc-20160816; b=rZG5hdDB9Kw8uYKNDyQyUxZbBoAHwORoBQmlupLTgRu+8AKorjP9/4ET4ANNrhB6GZ kRCpEttb5YwOvv2MnQjvYMx5NGzBrTDsvsvScMcq4+snlk8QgVUW3LZ9qYE9yXfiR546 1/DO/4DcrAIfzA+DaXoPl0hl5ifXmAKrw/OTMvcq7TiYvPdMXxq4KFHMzt/PM+soFvnI 0rth71eIpRaECT4xfqd/OGQ2UYks9NeZ2FyvSIwZl1K1oowMNGk/6aIX7mWxeJtXfFOW wFwwFjUn/fRDO9bXOq3fgnzJQnma1vTmvLO3MvoTNZfzXSlEd5W1FMrHCXWYF0U5ZG6G NY2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=xH2cPYi2ud62JL2Pj9p045VIjHtNXt5o/PabtWc7sl0=; fh=Lbqp+rs2mRBTG5C9ik7cirOzlOF2+U9yLxjtEQVqExY=; b=GNAnD05vpRIi02TYO258Zqu0UYOBJUBZKioZOIHRxGY8DEVRApjpmACMjL3MqNaFWI 700/woTJsCQFFNoygPTiUZJoD9cR1tKlWI5qAoGtE5XtyTw3x86722gbLJo4TJtmS1vc dsiaGJppODGUdT938GLw1ZBVLRGfuHIjy9tWa2OCFgtogYaK8FXNAHBVVniAxGJJ6C0K hRzeo06150fJqxrP5In9XLHf8DKCvfJo/idMHZC9wwg2JItBAuJWKhpSas7h5ZzIk0CU QP88FO0XBTF31JRiebIF8CaN2gdW4NUVHFHblijd3dgv02E8iFyx5FySFbwtOp6eop0h dKgw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RocCQFBY; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id az16-20020a05620a171000b0077892daf07dsi2910484qkb.615.2023.10.28.12.56.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Oct 2023 12:56:56 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RocCQFBY; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 73466386193F for ; Sat, 28 Oct 2023 19:56:56 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) by sourceware.org (Postfix) with ESMTPS id 0C01538618DA for ; Sat, 28 Oct 2023 19:56:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0C01538618DA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0C01538618DA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::2b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698522982; cv=none; b=UKNm7G3BU82/BDhdNzqOS25K/drznWUFJlDF8VUY2z1DNwRalb8ioSPQEskXi6Vi6txiaAsICoGtyG2Q+kKcpOW9uTx9s2yOKsCadW61AzRLLS73uHtqvlcopeUDjiUOOC2y2Sqg2naklE4HPaYbsB1R7l7dCafZYzT5ROVvu3c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698522982; c=relaxed/simple; bh=ImCn8D9L4MIrZ9fskXjKjheSDp3oRb8wVhEnozuDrjc=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=lbBTckSdOAbZzWhltM+D8jL1iabN9CgHLrA3R9eXJwMp5I1qtNPhm7twk9NMeQVHv9d1buctDAMQ1OIbNraEhPbKjSbVo6lI24PaXW4Sv6gWAfisDTDyhtS+irHMEMm2hlr7Fsml+M5W6qUSQEoX0AYUixbEGW+XuIrqMtMtq4o= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-1e58a522e41so2119785fac.2 for ; Sat, 28 Oct 2023 12:56:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698522979; x=1699127779; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xH2cPYi2ud62JL2Pj9p045VIjHtNXt5o/PabtWc7sl0=; b=RocCQFBYvs81IcHIptSqGn+9qMAO0lexBnk4QeiLDdgOJxl2twg9ZBo7+RFSxht7G+ 95K4qnYKuhpcJ8F2fE7e+d/Ic8oaaI+PZULM3xc9t7oyc2EPkVb3X8a7jcBM/IjRedC6 vmv102aiHhhV2CwcGop1umLnkDK7oEbTdjQzO8CLbyMgnD6mu/44bPMfzYmLV54k6AxP YnIC3GyNKF19OD095BNoDpZj7/DzUnUHer5dkqh9cZrB0B58j3GWD8suvT80lVvV5o7i FO4jJBDuXtFAnsG+tMdS/CT6ad8EN25PxAXC7Yq4UTyf/DnorzrdZR7MnTdVvQnnpdw7 tQBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698522979; x=1699127779; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xH2cPYi2ud62JL2Pj9p045VIjHtNXt5o/PabtWc7sl0=; b=sHuo/5OSWHX8a0Z1799Inumcvjis2W3z6BIuHEupBihmd6ntBMjyU1MKOlsF+sp8U8 CLMLzo7wj5/SdSGETQhCLZZINkpkSmjdmRr21qSH8i56Jjv4gVRf/u/cUaz65+ntPMz5 lBbooM+LSeEY0KilYaORvk5NTBrTxVXMKI7gys3SZrYBfmP8oZQ6e9gPpcKytqU5fyHQ izr/xhbPS2L7u5w/tg++TEF9+RXKBp1MRCNNsON9ETJbNH9xrhvN33FA32F566qrnDsJ iOkvyvFqgQ3sIOadTpn97zpOOwic6K5MAnKGAjtSealtdnA4WYc39oPINiD6UJpzxjR4 BlKQ== X-Gm-Message-State: AOJu0Yw5e3ztU6uwZYjO/UO0hlTqibXJX0RERyWcFSnriAUcGcCjyTRb xVGSJiySRkj2CIGcyfjxURUOuzoRlZrfTbg35LnG0Gfs X-Received: by 2002:a05:6870:8188:b0:1e9:b2fe:9ea7 with SMTP id k8-20020a056870818800b001e9b2fe9ea7mr7880782oae.43.1698522979425; Sat, 28 Oct 2023 12:56:19 -0700 (PDT) Received: from localhost.localdomain ([139.178.84.207]) by smtp.gmail.com with ESMTPSA id w20-20020a056830411400b006b8c87551e8sm763181ott.35.2023.10.28.12.56.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Oct 2023 12:56:17 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Ian Rogers , Francesco Nigro , Carlos O'Donell , Siddhesh Poyarekar Subject: [PATCH v2 6/7] linux: Decorate __libc_fatal error buffer Date: Sat, 28 Oct 2023 19:55:58 +0000 Message-Id: <20231028195559.390407-7-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231028195559.390407-1-adhemerval.zanella@linaro.org> References: <20231028195559.390407-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patch=linaro.org@sourceware.org --- sysdeps/posix/libc_fatal.c | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: DJ Delorie diff --git a/sysdeps/posix/libc_fatal.c b/sysdeps/posix/libc_fatal.c index cf28387ee6..f564d232bf 100644 --- a/sysdeps/posix/libc_fatal.c +++ b/sysdeps/posix/libc_fatal.c @@ -31,6 +31,7 @@ #include #include #include +#include #ifdef FATAL_PREPARE_INCLUDE #include FATAL_PREPARE_INCLUDE @@ -116,6 +117,8 @@ __libc_message_impl (const char *fmt, ...) wp = mempcpy (wp, iov[cnt].iov_base, iov[cnt].iov_len); *wp = '\0'; + __set_vma_name (buf, total, " glibc: fatal"); + /* We have to free the old buffer since the application might catch the SIGABRT signal. */ struct abort_msg_s *old = atomic_exchange_acquire (&__abort_msg,