Message ID | 20180826231332.2491-3-erosca@de.adit-jv.com |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="IyO45HNB"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41zDLr0ktCz9ryn for <incoming@patchwork.ozlabs.org>; Mon, 27 Aug 2018 11:09:40 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C7B1CC21DD4; Mon, 27 Aug 2018 01:09:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, KHOP_BIG_TO_CC, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E31DAC21DD9; Mon, 27 Aug 2018 01:08:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D343CC21C3F; Sun, 26 Aug 2018 23:15:39 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id 829A4C21C27 for <u-boot@lists.denx.de>; Sun, 26 Aug 2018 23:15:39 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id o18-v6so6612365wmc.0 for <u-boot@lists.denx.de>; Sun, 26 Aug 2018 16:15:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rJmWqh/CUOOm9yjJalFmzSN9fxLib2cCQwmyyPYrOFU=; b=IyO45HNBw6D13jvE5a5h0iEUzFoHEVzymimX14xEys7M3ZwAZomPr55w3bZezLJCYn VJJIIrlgaMO42CbbNGkjAGCbOr3KUYEs8lLPLYH5mGgU6RjkvQx5QUVeSG5+37VyMbfD 66Bm7oIYQEoUeXJS7qYCE8/+RQ8CGRrsU13LLs6I9g/4VyiOD4pko1rIfOap7HrpnOaY E1qEA9bmZN2Tg2HCwqk9oO3dgr36nsgqpxuvrEN2LfJJbAzzbiCEiRX+4ICL97QRIhyu G2XfoswNXLpZ0Ypj6rsgKi0D9xJpN3yrNiPZtLCTI1uICfkb9WeAEXhIb6j0ey0AtoH4 TQJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rJmWqh/CUOOm9yjJalFmzSN9fxLib2cCQwmyyPYrOFU=; b=VuJDRXP09+y51CnYsBVeDdqV7yZtrUzpfT+AJQgdPExBqqUeDxzmoWjYsYr0v7P+ln 3tb6zY+5hpE8vCiRCHRgWLfq53r7ovPZJMFw8IhmnzozzWPisobrzSbrQBcttNoil7Nb sPoNx+nMqdTa+bvIuPEeuWKWMfXpEgHWp3Dq008AMpteprSfVqQ/glinskM4kD0mX2XA aT9dNRYFiGmZc8fAb9XKHaRRXdDpfT0v4o1by/L999H0su6Zy2BSpA2qv7DSxgsbfAtk Ff9qy707gGXFFHdKAeqHarZvaQHXg0wFV5mn/rnv9dTGWn+DfE6Wgn8x1aKL2CLS2Wqa I2kA== X-Gm-Message-State: APzg51ClH21Zi6oMcfVcBb36++j+YAPa2y0waqkBEIEoY+2cwI+3QBq+ P2zemtEUgKIWEaJ/BLyl3sY= X-Google-Smtp-Source: ANB0Vda6xtbH/I5UAtPyquZKwEhJEXtXtn5twAHhZsjor+6D+f30yxOvhqIXKlOoH/h0ndv/U6lLCA== X-Received: by 2002:a1c:5e48:: with SMTP id s69-v6mr3963916wmb.19.1535325339168; Sun, 26 Aug 2018 16:15:39 -0700 (PDT) Received: from localhost.localdomain (ipb218f467.dynamic.kabel-deutschland.de. [178.24.244.103]) by smtp.gmail.com with ESMTPSA id e141-v6sm10828362wmd.32.2018.08.26.16.15.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Aug 2018 16:15:38 -0700 (PDT) From: Eugeniu Rosca <roscaeugeniu@gmail.com> X-Google-Original-From: Eugeniu Rosca <erosca@de.adit-jv.com> To: Tom Rini <trini@konsulko.com>, u-boot@lists.denx.de Date: Mon, 27 Aug 2018 01:13:20 +0200 Message-Id: <20180826231332.2491-3-erosca@de.adit-jv.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180826231332.2491-1-erosca@de.adit-jv.com> References: <20180826231332.2491-1-erosca@de.adit-jv.com> X-Mailman-Approved-At: Mon, 27 Aug 2018 01:08:09 +0000 Cc: Baruch Siach <baruch@tkos.co.il>, Michal Simek <michal.simek@xilinx.com>, Eugeniu Rosca <erosca@de.adit-jv.com>, Suniel Mahesh <sunil.m@techveda.org>, Vipul Kumar <vipul.kumar@xilinx.com>, Stephen Warren <swarren@nvidia.com>, eil Eilmsteiner Heribert <eil@keba.com>, Karthik Tummala <karthik@techveda.org>, Kishon Vijay Abraham I <kishon@ti.com>, Eugeniu Rosca <roscaeugeniu@gmail.com>, Guillaume GARDET <guillaume.gardet@free.fr>, Jonathan Gray <jsg@jsg.id.au> Subject: [U-Boot] [PATCH v2 02/13] mmc: Fix signed shift overflow X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
Import Undefined Behavior Sanitizer
|
expand
|
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index ad429f49c992..447519f46f15 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1136,7 +1136,7 @@ int mmc_getcd(struct mmc *mmc) #endif #if !CONFIG_IS_ENABLED(MMC_TINY) -static int sd_switch(struct mmc *mmc, int mode, int group, u8 value, u8 *resp) +static int sd_switch(struct mmc *mmc, uint mode, int group, u8 value, u8 *resp) { struct mmc_cmd cmd; struct mmc_data data;
Below is reproduced both with sandbox and R-Car Gen3 arm64 U-Boot: =================================================================== UBSAN: Undefined behaviour in drivers/mmc/mmc.c:1147:21 left shift of 1 by 31 places cannot be represented in type 'int' =================================================================== Fixes: 272cc70b211e ("Add MMC Framework") Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> --- Changes in v2: - Shorten the summary line --- drivers/mmc/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)