From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E33C8C433EF for ; Sun, 3 Apr 2022 10:40:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2E3A383B0F; Sun, 3 Apr 2022 12:39:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="M0ttN0RL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 575F883B10; Sun, 3 Apr 2022 12:39:34 +0200 (CEST) Received: from mail-wm1-x34a.google.com (mail-wm1-x34a.google.com [IPv6:2a00:1450:4864:20::34a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EF47483994 for ; Sun, 3 Apr 2022 12:39:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=3VnlJYgYKBocl3n5wwrzzrwp.nzx5-mzz4wt343.opy8.op@flex--ascull.bounces.google.com Received: by mail-wm1-x34a.google.com with SMTP id k16-20020a7bc310000000b0038e6cf00439so1294467wmj.0 for ; Sun, 03 Apr 2022 03:39:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=DZMw1tEY6G2mmztBOU+oWELqW50QoYpJyeZfT/drn90=; b=M0ttN0RLhls38mHx0JqpqcuQFYL3RM3DFUgb0mObZLItFhqpuiUXXUqOlknJEQvWmk rmiw6fjWcMCTF3s7b3JsMo3H3Nm05t64CUcyvWjxf8wiY2I0HiET7keQYRTyg3B5bD7g Z2S/b1Oi3BzEwP/sn04bzt5fRvWZhHrpNEG2WeZExQxSki59gJ9zOZUPcG0wHvKZJkLh l1u6cb66F8KzpzrdkmIhV3NgOqRI+YMwbtMNwk8YWf01AVepz9jhAeJoBbRKqOIJBJBZ CAEgQNnZWCv1N/OWFDCHM93teBjiGdeDhXDXSqVsBh8aGf9etQ1+abmvc14AtPjpQSlV jhdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=DZMw1tEY6G2mmztBOU+oWELqW50QoYpJyeZfT/drn90=; b=uUFAxnqSjj+KM9e9XbY0FZ2e8vBqx7mG5n3A7/9yrpJrpGRNKGjrxjuQ3VJHnhQs+z UnQiC514EPQj/wo43ANeFH+LOu1360bJMKOZjuI/1o9wKZsXy2EMniIMKFJHtYwJwJ9T rhptPtmXleGIfSpsCiEPo0eW52mjtS4o7m16uHlb2ItDWvllMHAsOPeUQLhJ330k0SOS mfuzgbDsbintJrLuTHLWEmnizip8klw2fGXDsdsPGzIY4jpPBIhwbSf8DItr3bD/qBjp HjKn93IOdlnYdOfBtGDaM0IGqj2c5KpdNYdRkg2YFEgagZ88PhwVIs6Qp1AYFVwSQdPx LYig== X-Gm-Message-State: AOAM532SP66DfHpTGokXoH7KX2lTE82r7GSkQWpt3idMdY4bUrTBsQ2S XSKDYCHn2NqW9Qa2W1BzHUazE2eJ8L4LMGsGPwGe4ht3jduRMJI/oULj+rDMhc3KQF+M54dHMDA 4p2KK1oX5VHV6cgDeGlPG1LjEVQMjRP/CQtEuhp6lsQ9w60LCGyCY6joND4M= X-Google-Smtp-Source: ABdhPJw4WfAsxa5EzOixG4Jd36pK/RA80jqLYEefq11YDEY/OpOwK15WHdfQltqGbQDnhGWo2a8cavaclE0= X-Received: from ascull.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1510]) (user=ascull job=sendgmr) by 2002:a05:600c:49a9:b0:38c:987d:d692 with SMTP id h41-20020a05600c49a900b0038c987dd692mr15643056wmp.166.1648982358433; Sun, 03 Apr 2022 03:39:18 -0700 (PDT) Date: Sun, 3 Apr 2022 10:39:07 +0000 Message-Id: <20220403103915.3338027-1-ascull@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.35.1.1094.g7c7d902a7c-goog Subject: [PATCH 0/8] Fix misc ASAN reports From: Andrew Scull To: u-boot@lists.denx.de Cc: sjg@chromium.org, seanga2@gmail.com, Andrew Scull Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean I've been experimenting with ASAN on sandbox and turned up a few issues that are fixed in this series. Basic ASAN was easy to turn on, but integrating with dlmalloc was messier and fairly intrusive. Even when I had it working, there was only a small redzone between allocations which limits the usefulness. I saw another series on the list by Sean Anderson to enable valgrind which was finding a different set of issues, though there was one overlap that Sean is fixing with "[PATCH] IOMUX: Fix access past end of console_devices". With these issues fixed, I was able to run the dm tests without any ASAN issues. There are a couple of leaks reported at the end, but that's for another day. Andrew Scull (8): doc: Correct position of gdb '--args' parameter acpi: Fix buffer overflow in do_acpi_dump() x86: sandbox: Add missing PCI bar to barinfo usb: sandbox: Check for string end in copy_to_unicode() usb: sandbox: Bounds check read from buffer sound: Fix buffer overflow in square wave generation test: Fix pointer overrun in dm_test_devm_regmap() test: dm: devres: Remove use-after-free cmd/acpi.c | 2 +- doc/develop/tests_sandbox.rst | 2 +- drivers/power/acpi_pmc/pmc_emul.c | 1 + drivers/sound/sound.c | 6 ++---- drivers/usb/emul/sandbox_flash.c | 2 ++ drivers/usb/emul/usb-emul-uclass.c | 5 ++--- test/dm/devres.c | 5 +---- test/dm/regmap.c | 9 ++++----- 8 files changed, 14 insertions(+), 18 deletions(-) -- 2.35.1.1094.g7c7d902a7c-goog