Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11324908ybi; Thu, 25 Jul 2019 14:14:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+cgd1DIQu9LWbdHs4DFYHrMeN8JtJKIhZDoP8Gq7MjVg0IninPD3drU8PNDVsfS1tNw3H X-Received: by 2002:a63:4e60:: with SMTP id o32mr89568832pgl.68.1564089256461; Thu, 25 Jul 2019 14:14:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564089256; cv=none; d=google.com; s=arc-20160816; b=Dw6uDQ8ykqmkL9y/1iOUVz5tCCJ2XT8FckhUwGMDw3jkm7KDTbl1hdhG6MlocMA1kZ Iojg9EOKYbyot0UAOAlyQNGsgmTD0oqoFBrEalBynkBXfujycTjHzwtlIhLJkCEkAvfk rYZ9K7Pd+jjK1BG+A8tm/ALels4fJC+K4/XmxJwuKXdCXrk/en+zB1bK7bGR0+8aPNDj Ap/9VJWhPXo7L7kAKeNOqB81DzF9thC4+BhaxAjBdgkAf/HjhaBNcUst1LQqJ/wU7CEU VhFdhOFLTM/TBkPPrpF2HWx9KVyzaQCwfWsxGfbzUoaupddlf7qXD6dTl+5Y2fSk54zW Icog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=dA9BWec89vDrK4sNwuycmJwH0QLl3t9FK5TEZwiOlSU=; b=aaxVSffmJsoCYHAVdtSGwj/opIoB9RQ8SVTb+J9Pat+aymE2Zema8c0aHpv0WTjTFg TEUgWHedGVIpPKIffZUVI178jYOxx7N2HlGfIGoAbjoxvph4QXmccqd45/AqaGxdW3EN D1iO5UK8R9C54Qq8hVYF/OkLI89cN2mV44zhSZQHIEGKQqwGuWiMYCFHLUvdsV7gvguT wphILPcRY0kNCtVQVs4bDsHDGR6+UtyS2mFJASKtZnXvlUrQW+yXbBpC2z/221u1j4DH /SKdu59f2YXnSfiNz3BiW5AQgn6v9XU5rLIFquMaiFSCULrRcQbr+04d0BO5tmSg6gpW lJuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=TZ8vM0VH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 39si23509484plc.99.2019.07.25.14.14.01; Thu, 25 Jul 2019 14:14:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=TZ8vM0VH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726695AbfGYVLt (ORCPT + 99 others); Thu, 25 Jul 2019 17:11:49 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:44913 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726666AbfGYVLs (ORCPT ); Thu, 25 Jul 2019 17:11:48 -0400 Received: by mail-io1-f68.google.com with SMTP id s7so100164207iob.11 for ; Thu, 25 Jul 2019 14:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=dA9BWec89vDrK4sNwuycmJwH0QLl3t9FK5TEZwiOlSU=; b=TZ8vM0VHcO0hC55LMc+PM7ql22DZmj9+opwNwcn0uPnwHfyCTj6D7L+c0UCZiszL3F hSpHPzTYLOYZ137GsFPRN3P/GOwdccByQQA5Jgcjh4hdxqIqhMV/vL4W2zxaFW5hWpmt lRiZug2LQ+6xgg2GJ4DJH8f8SrkI2bxfdyXHGkzJ+VRDhQUTT5TS1N+B2SyYHJyeoG1V pYubbIxifUk+pCRunevKjHUjtxE2fjsrpy5aNwxUuAPt0VWdO3poK/tio9ULHSrjrnh+ AjRG8zwq/21utx5EH1vuZU7wvi9dPS2onrI5+9IMy5rj6qdRV5KCl+SxJJn6xSAq6aXW h2CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=dA9BWec89vDrK4sNwuycmJwH0QLl3t9FK5TEZwiOlSU=; b=a0VMOIGU96RZPxC285f8bPQnGe5GHdaQNwZ1AmiR4PkjNCc0Mq2ITHiu4TTh9irKaJ avOEbtJOA5I0GyPAqEuFvOiamepHNBdmqmOAMHuW4fJgqIZ4ICiqmu57lKm72BsnAC0B n8Sk9vCbEgtbbwuQ5b/UVCOzZP4cWrha1M6Q8kaGhNLSHHG6svAwmpKwiQ1fsEntgFVA +vP5kNbAesGPwmpb5j6itqhXaIBT9XQL3b+x4q7mTWAb/uq49frL+gHDPjhiV0Cesfen u+XDN6SfJF3K8Z9ADYOCV7RXYIUFE0qXu6qiUu6kd0e8Lr1qgHzexM4UBROhL1rP0+8F YzTA== X-Gm-Message-State: APjAAAUD9d4BvfUWyawvORIuBC1YzHSpAbOTpzQ/qJLg+BBkczmg2FlL E2sUwvFKlKLmdsIvufn5+R9I0A== X-Received: by 2002:a5d:9ad6:: with SMTP id x22mr56002184ion.136.1564089107990; Thu, 25 Jul 2019 14:11:47 -0700 (PDT) Received: from localhost (67-0-24-96.albq.qwest.net. [67.0.24.96]) by smtp.gmail.com with ESMTPSA id d25sm40678729iom.52.2019.07.25.14.11.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 25 Jul 2019 14:11:47 -0700 (PDT) Date: Thu, 25 Jul 2019 14:11:46 -0700 (PDT) From: Paul Walmsley X-X-Sender: paulw@viisi.sifive.com To: Mao Han cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-csky@vger.kernel.org, Palmer Dabbelt , Albert Ou Subject: Re: [PATCH 1/1] riscv: Fix perf record without libelf support In-Reply-To: <96b979a523210628de8a8a3d6e48492f6f1ff02d.1562812381.git.han_mao@c-sky.com> Message-ID: References: <96b979a523210628de8a8a3d6e48492f6f1ff02d.1562812381.git.han_mao@c-sky.com> User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 11 Jul 2019, Mao Han wrote: > This patch fix following perf record error by linking vdso.so with > build id. > > perf.data perf.data.old > [ perf record: Woken up 1 times to write data ] > free(): double free detected in tcache 2 > Aborted > > perf record use filename__read_build_id(util/symbol-minimal.c) to get > build id when libelf is not supported. When vdso.so is linked without > build id, the section size of PT_NOTE will be zero, buf size will > realloc to zero and cause memory corruption. > > Signed-off-by: Mao Han > Cc: Paul Walmsley > Cc: Palmer Dabbelt > Cc: Albert Ou Thanks, queued for v5.3-rc. Also: thanks for your patience on the perf callchain patches. - Paul