Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10415630ybi; Wed, 24 Jul 2019 22:49:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqynjnh/HK+K67dVgtOoU8J28wrAzVxyH9A3fXPefg0A2DJJAGAzBzNnCWsyr3utTKUAwWH/ X-Received: by 2002:a17:90a:1aa4:: with SMTP id p33mr92415084pjp.27.1564033764130; Wed, 24 Jul 2019 22:49:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564033764; cv=none; d=google.com; s=arc-20160816; b=j0pT/SC+6xR8pG7K8CHzCrbfEIPg0UE4n2tmnKfBDcXZuHlKnGTqwQNf8aDFNNK/5w Q9F/0xSx7cNIXczWzIXTsdKvVnXWoVOoJHuTsqRTnAZAzuhGuiBRuVNKsCeguweX6OR+ 0XVD1r3/UEAp2CGr59t1iX+NLkLvVcSn1eVXvCIOAR+Bv16mqelCZNvh4NHfM3L8KJ2U 8W/m4K6fKg9D4uMAZXWlVV2uHrVUwCmNW6l7y/Om5DDIv8BpkO8DByHKfZ1UQmbvzVZS dZ4l9FVbtDf5D9LVIJcZqZbbabskepoEKGEzQc36ky/i6818v/H6tLkTsnaoes1rKHwo P1yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=Fw1C3R9hSasyzIXJTKVtbRAdTF9SVma4v9C5XlFKOn4=; b=r6gIrl9Du43aflnvh1b+bCpZSsLIdXb6q8AqtYtL91cxhjSjhZVFmLmepQjFHsWyAK WqnayTOQhz3M1SFa0Dh27fZh3QOWy8wtR6MUAk4s+46uPrsLLL8EbmYqDcn9Q4g61XhE 2itBkoqO6iz8maJGKaoCTzLcqEK5Mkt1xnDMhdZSHXJjrwsTAV2Uuq21F4X7qY8EhB0t dNjjJeTUpSFUrl/f8Mpxu0B/4OnU+0mCD0wxVjep2wDTmgxkm84tVygVD2i4yT505ErL TOMug21dKTXb27kysnb/fkslzjHhtFJ+KgdpcBeFVt4uOCtqz+fCP4TGeCen/au57tWI QEJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=b2bsae63; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12si14520857plk.272.2019.07.24.22.49.09; Wed, 24 Jul 2019 22:49:24 -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=@google.com header.s=20161025 header.b=b2bsae63; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729252AbfGXWt7 (ORCPT + 99 others); Wed, 24 Jul 2019 18:49:59 -0400 Received: from mail-ua1-f74.google.com ([209.85.222.74]:54946 "EHLO mail-ua1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726001AbfGXWt7 (ORCPT ); Wed, 24 Jul 2019 18:49:59 -0400 Received: by mail-ua1-f74.google.com with SMTP id c21so4949894uao.21 for ; Wed, 24 Jul 2019 15:49:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=Fw1C3R9hSasyzIXJTKVtbRAdTF9SVma4v9C5XlFKOn4=; b=b2bsae63RuASUzg2AQusA3JyqxrpIjYnaeOjpr3pxHZPbr+hIn03dVK+6QWaRBfHPK W+oUJIyIc8N3a4ISX2sh+mTCuq2YEWdIy6iT7M8mmbY17kLJMfJiJPx1rZZeaXuViFj6 ovilSncNgM5GrruY+Ayb9kScp2iCfPTpfKA4rCtdMdF/ugGF4uspobrE4XjE5CnTUGGg Cp+60mvb2FwRpq6Uno0154Lj/Og4+YhFxiWQQvEameLfEFfnQQGHQ5HIvCQKHfK9Ewsp SDFxsmszwGkP0AMHpLt8a2irpgcPVP6vjGTjDsERmsAlg+ip/7vTMIg0L+qC7BmRMeWN XP5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=Fw1C3R9hSasyzIXJTKVtbRAdTF9SVma4v9C5XlFKOn4=; b=UrsI1Go9iDFeqDVh9pcWFGMM84Yaj96Z8IDnzoo6P3+ngkQNW8EHfl4m3s8gAX+fW8 YXcWkWBSUdxo5+C8IpMIEqrrIBuafNP9bB3rrBmPzFqPNU9nVszZEpX7+dutYQpoRQOD 6J4V8l8f2ccAL8jgj/MeQGkLJbV52BVUmNvEuX/pKULNDFfe++/PNM+z/LuSoAmlh6ty Nc0d4G+O+ajiCVzRODU9FbpPqyqQrq2mWGgRBlqtKpr2uKdBvae5CJ/YiYyqGfKKwJvu bOjJkd50zoF9EpGobBVhCWykw8PVMB2OGDfaH5h1C7J3B7q5kZXCaJx8HoxZu8fDGFjt kRMA== X-Gm-Message-State: APjAAAXgTjR9jhMCkIEhLVAkbBtngp8UDgZ+sPjpOT9mCkSJGvHUT8F2 BGShk5Nn16Ou3rlpD/KisgKXzVmT X-Received: by 2002:a1f:7383:: with SMTP id o125mr34463923vkc.6.1564008597898; Wed, 24 Jul 2019 15:49:57 -0700 (PDT) Date: Wed, 24 Jul 2019 15:49:52 -0700 Message-Id: <20190724224954.229540-1-nums@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.22.0.657.g960e92d24f-goog Subject: [RFC][PATCH 0/2] Perf misaligned address fixes From: Numfor Mbiziwo-Tiapo To: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, songliubraving@fb.com, mbd@fb.com Cc: linux-kernel@vger.kernel.org, irogers@google.com, eranian@google.com, Numfor Mbiziwo-Tiapo Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These patches are all errors found by running perf test with the ubsan (undefined behavior sanitizer version of perf). They are solutions to misaligned address errors caught by ubsan but they would break compatibility between perf data files. To build perf with ubsan run: make -C tools/perf USE_CLANG=1 EXTRA_CFLAGS="-fsanitize=undefined" Perf will throw errors that have been fixed in these patches that have not yet been merged: https://lore.kernel.org/patchwork/patch/1104065/ https://lore.kernel.org/patchwork/patch/1104066/ Please feel free to leave comments. Numfor Mbiziwo-Tiapo (2): Fix event.c misaligned address error Fix evsel.c misaligned address errors tools/perf/util/event.h | 1 + tools/perf/util/evsel.c | 28 ++++++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) -- 2.22.0.657.g960e92d24f-goog