From patchwork Wed Nov 1 12:56:10 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: 1857950 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=XHRCtxXk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SL6VS1x0vz1yQm for ; Wed, 1 Nov 2023 23:57:36 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 355333858C60 for ; Wed, 1 Nov 2023 12:57:34 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by sourceware.org (Postfix) with ESMTPS id 4029138582BE for ; Wed, 1 Nov 2023 12:56:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4029138582BE 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 4029138582BE Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b32 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698843400; cv=none; b=NP2dLUCfhKCdlTWAoCLaCgMblvpmf9X96kWZ/9WtDj77WSoYHVg9jormdSXr/rY+FI+3E48isOPFa4ZlITLs/ijR0Yl0ieFbY5xV9zs79XLYdCa6JkGuyBbuAdSMwYHHa0qAcXGlxcsfKM6P1KF2Z+HY9LubJJ2+2m6qy+kdI2M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698843400; c=relaxed/simple; bh=ImCn8D9L4MIrZ9fskXjKjheSDp3oRb8wVhEnozuDrjc=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=KqBVJL1oW/BLqU7bbiNo2bLgoDzNNpp7hfdYwC85279rFpFDbPMhDFIMjtekTkmG5iiqGKMfN/xNYH2zGaRgBdoiAKoivQEmQckfj0243uc3a7GqKO9wOXJhIMpPU0IBzbi0f9kcx9v147cR+NEauVZHxg7LNcdVJfLVCfBmQ+M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-da041ffef81so6257002276.0 for ; Wed, 01 Nov 2023 05:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698843391; x=1699448191; 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=XHRCtxXk2KVwgAznFeEKiH7kVIWRcrET+hvFnYRgU3oc0UGAC7BlXBOntQQ5uNAAiC mOadHpJXLY8pCSrp3hB0gdkFo1YrQy32FlJyBwLFwfyMzwIfpBAzWRxibSQ5cooTA93U TalFvAc4BYZC/UXRmt6TNVMuf61Q0dcpvwb6qcVW2Q9rlxFBw3fh+hPPjFIhzggqOxh8 XKXGTRfMU5UswW71IXVkNkXaLiD3iak02jnNpCvCxZd8pmXYUQAgbA2YobCsXAlsqFxu XJltL1konQXgnCPsqxuEwPxtozMYMRuR5+aK045tg7XR3Ee10M9bnghs2KB96qFDBkdY 167Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698843391; x=1699448191; 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=ocoZGOOWSFduHticIzJo49PFnzVJbQuAIFy3hMorLgO1gGo9KT9xPc19hbzqFbP3ma VZbnryLjPKxNPwuVYKj9S0d3PHQZEjJaaqmveY9XwrPDLbrWKXZbgf23Wc9Qmz6H1eIr 6dP+TIst0Xi3HXHz76gO+NvSZpPotxlNdhz5dxlO8IDKnl23k6NM+jDnBQQ6xz+oPE2G qGcz5i6TOsnVuSQmeH25YG2usB24iv5LgIUj+6BKKWmla9EWxNKiBg683Je1lVgOXGyl knf3UtCrBc9P/SqEdgI8EIdnTKWshq7By6jtcoHyYhRcuV2MM9MIKsMKpPP78KwE4FvZ Rr2g== X-Gm-Message-State: AOJu0YzeFrHpgIbNsk/q5J94A7p8jtSzyiiLeRo7DYZ7w6EYTrmJoqan p6tdAR+FYyN0H7qlDkX4LXOZxGioWmtLHMHhS/Xk/w== X-Google-Smtp-Source: AGHT+IGzl/ZhAdWus9zIY9+kQHmIScJ1/HITn17t4v0kMI0/EL7HIU5YrfwVd0tJj5i4g6IlkLZIkw== X-Received: by 2002:a25:301:0:b0:d9a:c7af:bb4d with SMTP id 1-20020a250301000000b00d9ac7afbb4dmr14410318ybd.37.1698843391206; Wed, 01 Nov 2023 05:56:31 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:a715:15ac:c4b6:7a0e:f5c5]) by smtp.gmail.com with ESMTPSA id w11-20020a5b08cb000000b00da034601e2esm1888100ybq.52.2023.11.01.05.56.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 05:56:30 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org, DJ Delorie , Ian Rogers , Francesco Nigro , Carlos O'Donell Subject: [PATCH v3 6/7] linux: Decorate __libc_fatal error buffer Date: Wed, 1 Nov 2023 09:56:10 -0300 Message-Id: <20231101125611.208544-7-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231101125611.208544-1-adhemerval.zanella@linaro.org> References: <20231101125611.208544-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 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, T_SCC_BODY_TEXT_LINE 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+incoming=patchwork.ozlabs.org@sourceware.org --- sysdeps/posix/libc_fatal.c | 3 +++ 1 file changed, 3 insertions(+) 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,