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 BBF64C76195 for ; Mon, 27 Mar 2023 19:19:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1FE7986103; Mon, 27 Mar 2023 21:19:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="Y27FNdjm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 04DE88609D; Mon, 27 Mar 2023 21:19:55 +0200 (CEST) Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) (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 A706E860FB for ; Mon, 27 Mar 2023 21:19:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-54184571389so189347267b3.4 for ; Mon, 27 Mar 2023 12:19:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1679944788; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=lXj1c/9CjgmSdNmLE+vh743zqK1i0LriD1noKUAFaWA=; b=Y27FNdjmh9FlT8qk3N0PmSR50/k1kMfkglSAXba/QuSLppaSwRdHlx2QpQUlpX5CC6 7XuSwjEYQEUxbAWD0II7GiOwP5I76U7PLK7vgKxPmkQ8NwHP1PPFzIatjxcRBFbAR/vc 7uNXYInoMVRl/2p/zDWxC46MccQkdfibUZBOY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679944788; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lXj1c/9CjgmSdNmLE+vh743zqK1i0LriD1noKUAFaWA=; b=pq4jqLtyqRP0HOZJwK4E3TIM7eiMS1Ml7Pwj+/pT8LXJ8saKYgKurvFtYldRNIhWJh 4KjxR6jDuRPSX79f3/T9mJ88RcQfKtdiIqM41+zlG950w0ZQ6B7WIdOub4zHN8qS2Jy2 htkuahibgxgysdVktiBKE7FiYuefE43C+lkCdCGfNTNcG2YOYlklzqyxysqPiYJ7oV6h 8RDMD+rTXVcdH/a4zYccDuuokhb2Eq1p4GcR7YRo4OhARjYSy+ep6NANr3LNDGUDbazs leSpLveZaWS2G9S0IZTMOchYONj/DDkR1D1CKqYlr/+m8AoimMNjHBXgmT5giaUt+oNB y2vQ== X-Gm-Message-State: AAQBX9eDUZZEPz952uW3pnEZfSlZM2NM5iSiB/80tf7oGWB0c2BNBP5y dyaEzV0WktdKrRJacgFz1QL0UbHhAufk5kj1T5uY2A== X-Google-Smtp-Source: AKy350a6g3BmWlOUPJZPd28cA5lwm734Dc7jS2WRMQo5/ykMcGumq3UR3ETFBpZI6aNJilmyhitefA== X-Received: by 2002:a0d:d74e:0:b0:544:b872:77a0 with SMTP id z75-20020a0dd74e000000b00544b87277a0mr12753443ywd.19.1679944787979; Mon, 27 Mar 2023 12:19:47 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-1fd9-0d41-fdf6-01a5.res6.spectrum.com. [2603:6081:7b00:6400:1fd9:d41:fdf6:1a5]) by smtp.gmail.com with ESMTPSA id p184-20020a81b1c1000000b00545a08184bbsm2068794ywh.75.2023.03.27.12.19.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 12:19:47 -0700 (PDT) Date: Mon, 27 Mar 2023 15:19:46 -0400 From: Tom Rini To: u-boot@lists.denx.de Subject: [tom.rini@gmail.com: Fwd: New Defects reported by Coverity Scan for Das U-Boot] Message-ID: <20230327191946.GF2040436@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="K2OpNyhxvXjWcm+a" Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett 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.8 at phobos.denx.de X-Virus-Status: Clean --K2OpNyhxvXjWcm+a Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Here's the latest report. ---------- Forwarded message --------- =46rom: Date: Mon, Mar 27, 2023 at 2:36=E2=80=AFPM Subject: New Defects reported by Coverity Scan for Das U-Boot To: Hi, Please find the latest report on new defect(s) introduced to Das U-Boot found with Coverity Scan. 6 new defect(s) introduced to Das U-Boot found with Coverity Scan. 2 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 6 of 6 defect(s) ** CID 451089: Incorrect expression (EVALUATION_ORDER) /lib/efi_loader/efi_device_path.c: 752 in dp_fill() ___________________________________________________________________________= _____________________________ *** CID 451089: Incorrect expression (EVALUATION_ORDER) /lib/efi_loader/efi_device_path.c: 752 in dp_fill() 746 memcpy(&dp->ns_id, &ns_id, sizeof(ns_id)); 747 return &dp[1]; 748 } 749 #endif 750 #if defined(CONFIG_USB) 751 case UCLASS_MASS_STORAGE: { >>> CID 451089: Incorrect expression (EVALUATION_ORDER) >>> In "desc =3D desc =3D dev_get_uclass_plat(dev)", "desc" is written = twice with the same value. 752 struct blk_desc *desc =3D desc =3D dev_get_uclass_plat(dev); 753 struct efi_device_path_controller *dp =3D 754 dp_fill(buf, dev->parent); 755 756 dp->dp.type =3D DEVICE_PATH_TYPE_HARDWARE_DEVICE; 757 dp->dp.sub_type =3D DEVICE_PATH_SUB_TYPE_CONTROLLER; ** CID 450973: (TAINTED_SCALAR) ___________________________________________________________________________= _____________________________ *** CID 450973: (TAINTED_SCALAR) /test/cmd/fdt.c: 133 in make_fuller_fdt() 127 ut_assertok(fdt_property_cell(fdt, "#size-cells", 0)); 128 ut_assertok(fdt_property_string(fdt, "compatible", "u-boot,fdt-subnode-test-device")); 129 ut_assertok(fdt_end_node(fdt)); 130 ut_assertok(fdt_end_node(fdt)); 131 132 ut_assertok(fdt_end_node(fdt)); >>> CID 450973: (TAINTED_SCALAR) >>> Passing tainted expression "fdt->size_dt_strings" to "fdt_finish", = which uses it as an offset. 133 ut_assertok(fdt_finish(fdt)); 134 135 return 0; 136 } 137 138 /* Test 'fdt addr' getting/setting address */ /test/cmd/fdt.c: 133 in make_fuller_fdt() 127 ut_assertok(fdt_property_cell(fdt, "#size-cells", 0)); 128 ut_assertok(fdt_property_string(fdt, "compatible", "u-boot,fdt-subnode-test-device")); 129 ut_assertok(fdt_end_node(fdt)); 130 ut_assertok(fdt_end_node(fdt)); 131 132 ut_assertok(fdt_end_node(fdt)); >>> CID 450973: (TAINTED_SCALAR) >>> Passing tainted expression "fdt->size_dt_strings" to "fdt_finish", = which uses it as an offset. 133 ut_assertok(fdt_finish(fdt)); 134 135 return 0; 136 } 137 138 /* Test 'fdt addr' getting/setting address */ /test/cmd/fdt.c: 133 in make_fuller_fdt() 127 ut_assertok(fdt_property_cell(fdt, "#size-cells", 0)); 128 ut_assertok(fdt_property_string(fdt, "compatible", "u-boot,fdt-subnode-test-device")); 129 ut_assertok(fdt_end_node(fdt)); 130 ut_assertok(fdt_end_node(fdt)); 131 132 ut_assertok(fdt_end_node(fdt)); >>> CID 450973: (TAINTED_SCALAR) >>> Passing tainted expression "fdt->size_dt_strings" to "fdt_finish", = which uses it as an offset. 133 ut_assertok(fdt_finish(fdt)); 134 135 return 0; 136 } 137 138 /* Test 'fdt addr' getting/setting address */ /test/cmd/fdt.c: 133 in make_fuller_fdt() 127 ut_assertok(fdt_property_cell(fdt, "#size-cells", 0)); 128 ut_assertok(fdt_property_string(fdt, "compatible", "u-boot,fdt-subnode-test-device")); 129 ut_assertok(fdt_end_node(fdt)); 130 ut_assertok(fdt_end_node(fdt)); 131 132 ut_assertok(fdt_end_node(fdt)); >>> CID 450973: (TAINTED_SCALAR) >>> Passing tainted expression "fdt->size_dt_strings" to "fdt_finish", = which uses it as an offset. 133 ut_assertok(fdt_finish(fdt)); 134 135 return 0; 136 } 137 138 /* Test 'fdt addr' getting/setting address */ /test/cmd/fdt.c: 133 in make_fuller_fdt() 127 ut_assertok(fdt_property_cell(fdt, "#size-cells", 0)); 128 ut_assertok(fdt_property_string(fdt, "compatible", "u-boot,fdt-subnode-test-device")); 129 ut_assertok(fdt_end_node(fdt)); 130 ut_assertok(fdt_end_node(fdt)); 131 132 ut_assertok(fdt_end_node(fdt)); >>> CID 450973: (TAINTED_SCALAR) >>> Passing tainted expression "fdt->size_dt_strings" to "fdt_finish", = which uses it as an offset. 133 ut_assertok(fdt_finish(fdt)); 134 135 return 0; 136 } 137 138 /* Test 'fdt addr' getting/setting address */ /test/cmd/fdt.c: 133 in make_fuller_fdt() 127 ut_assertok(fdt_property_cell(fdt, "#size-cells", 0)); 128 ut_assertok(fdt_property_string(fdt, "compatible", "u-boot,fdt-subnode-test-device")); 129 ut_assertok(fdt_end_node(fdt)); 130 ut_assertok(fdt_end_node(fdt)); 131 132 ut_assertok(fdt_end_node(fdt)); >>> CID 450973: (TAINTED_SCALAR) >>> Passing tainted expression "fdt->size_dt_strings" to "fdt_finish", = which uses it as an offset. 133 ut_assertok(fdt_finish(fdt)); 134 135 return 0; 136 } 137 138 /* Test 'fdt addr' getting/setting address */ /test/cmd/fdt.c: 133 in make_fuller_fdt() 127 ut_assertok(fdt_property_cell(fdt, "#size-cells", 0)); 128 ut_assertok(fdt_property_string(fdt, "compatible", "u-boot,fdt-subnode-test-device")); 129 ut_assertok(fdt_end_node(fdt)); 130 ut_assertok(fdt_end_node(fdt)); 131 132 ut_assertok(fdt_end_node(fdt)); >>> CID 450973: (TAINTED_SCALAR) >>> Passing tainted expression "fdt->size_dt_strings" to "fdt_finish", = which uses it as an offset. 133 ut_assertok(fdt_finish(fdt)); 134 135 return 0; 136 } 137 138 /* Test 'fdt addr' getting/setting address */ ** CID 450972: (PRINTF_ARGS) ___________________________________________________________________________= _____________________________ *** CID 450972: (PRINTF_ARGS) /test/cmd/fdt.c: 267 in fdt_test_move() 261 ut_assertok(run_commandf("fdt move %08x %08x %x", addr, newaddr, ts)); 262 ut_assert_nextline("Working FDT set to %lx", newaddr); 263 ut_assertok(ut_check_console_end(uts)); 264 265 /* Compare the source and destination DTs */ 266 ut_assertok(console_record_reset_enable()); >>> CID 450972: (PRINTF_ARGS) >>> Argument "addr" to format specifier "%08x" was expected to have typ= e "unsigned int" but has type "unsigned long". 267 ut_assertok(run_commandf("cmp.b %08x %08x %x", addr, newaddr, ts)); 268 ut_assert_nextline("Total of %d byte(s) were the same", ts); 269 ut_assertok(ut_check_console_end(uts)); 270 271 return 0; 272 } /test/cmd/fdt.c: 261 in fdt_test_move() 255 /* Moved target DT location */ 256 buf =3D map_sysmem(newaddr, size); 257 memset(buf, 0, size); 258 259 /* Test moving the working FDT to a new location */ 260 ut_assertok(console_record_reset_enable()); >>> CID 450972: (PRINTF_ARGS) >>> Argument "addr" to format specifier "%08x" was expected to have typ= e "unsigned int" but has type "unsigned long". 261 ut_assertok(run_commandf("fdt move %08x %08x %x", addr, newaddr, ts)); 262 ut_assert_nextline("Working FDT set to %lx", newaddr); 263 ut_assertok(ut_check_console_end(uts)); 264 265 /* Compare the source and destination DTs */ 266 ut_assertok(console_record_reset_enable()); ** CID 450970: (PRINTF_ARGS) ___________________________________________________________________________= _____________________________ *** CID 450970: (PRINTF_ARGS) /test/cmd/fdt.c: 224 in fdt_test_addr_resize() 218 ut_assertok(console_record_reset_enable()); 219 ut_assertok(run_commandf("fdt addr %08x %x", addr, newsize)= ); 220 ut_assert_nextline("Working FDT set to %lx", addr); 221 ut_assertok(ut_check_console_end(uts)); 222 223 /* Try shrinking it */ >>> CID 450970: (PRINTF_ARGS) >>> Argument "addr" to format specifier "%08x" was expected to have typ= e "unsigned int" but has type "unsigned long". 224 ut_assertok(run_commandf("fdt addr %08x %x", addr, sizeof(fdt) / 4)); 225 ut_assert_nextline("Working FDT set to %lx", addr); 226 ut_assert_nextline("New length %d < existing length %d, ignoring", 227 (int)sizeof(fdt) / 4, newsize); 228 ut_assertok(ut_check_console_end(uts)); 229 /test/cmd/fdt.c: 219 in fdt_test_addr_resize() 213 ut_assertok(make_test_fdt(uts, fdt, sizeof(fdt))); 214 addr =3D map_to_sysmem(fdt); 215 set_working_fdt_addr(addr); 216 217 /* Test setting and resizing the working FDT to a larger si= ze */ 218 ut_assertok(console_record_reset_enable()); >>> CID 450970: (PRINTF_ARGS) >>> Argument "addr" to format specifier "%08x" was expected to have typ= e "unsigned int" but has type "unsigned long". 219 ut_assertok(run_commandf("fdt addr %08x %x", addr, newsize)= ); 220 ut_assert_nextline("Working FDT set to %lx", addr); 221 ut_assertok(ut_check_console_end(uts)); 222 223 /* Try shrinking it */ 224 ut_assertok(run_commandf("fdt addr %08x %x", addr, sizeof(fdt) / 4)); /test/cmd/fdt.c: 231 in fdt_test_addr_resize() 225 ut_assert_nextline("Working FDT set to %lx", addr); 226 ut_assert_nextline("New length %d < existing length %d, ignoring", 227 (int)sizeof(fdt) / 4, newsize); 228 ut_assertok(ut_check_console_end(uts)); 229 230 /* ...quietly */ >>> CID 450970: (PRINTF_ARGS) >>> Argument "addr" to format specifier "%08x" was expected to have typ= e "unsigned int" but has type "unsigned long". 231 ut_assertok(run_commandf("fdt addr -q %08x %x", addr, sizeof(fdt) / 4)); 232 ut_assert_nextline("Working FDT set to %lx", addr); 233 ut_assertok(ut_check_console_end(uts)); 234 235 /* We cannot easily provoke errors in fdt_open_into(), so ignore that */ 236 ** CID 450968: (PRINTF_ARGS) ___________________________________________________________________________= _____________________________ *** CID 450968: (PRINTF_ARGS) /test/cmd/fdt.c: 224 in fdt_test_addr_resize() 218 ut_assertok(console_record_reset_enable()); 219 ut_assertok(run_commandf("fdt addr %08x %x", addr, newsize)= ); 220 ut_assert_nextline("Working FDT set to %lx", addr); 221 ut_assertok(ut_check_console_end(uts)); 222 223 /* Try shrinking it */ >>> CID 450968: (PRINTF_ARGS) >>> Argument "64UL" to format specifier "%x" was expected to have type = "unsigned int" but has type "unsigned long". 224 ut_assertok(run_commandf("fdt addr %08x %x", addr, sizeof(fdt) / 4)); 225 ut_assert_nextline("Working FDT set to %lx", addr); 226 ut_assert_nextline("New length %d < existing length %d, ignoring", 227 (int)sizeof(fdt) / 4, newsize); 228 ut_assertok(ut_check_console_end(uts)); 229 /test/cmd/fdt.c: 231 in fdt_test_addr_resize() 225 ut_assert_nextline("Working FDT set to %lx", addr); 226 ut_assert_nextline("New length %d < existing length %d, ignoring", 227 (int)sizeof(fdt) / 4, newsize); 228 ut_assertok(ut_check_console_end(uts)); 229 230 /* ...quietly */ >>> CID 450968: (PRINTF_ARGS) >>> Argument "64UL" to format specifier "%x" was expected to have type = "unsigned int" but has type "unsigned long". 231 ut_assertok(run_commandf("fdt addr -q %08x %x", addr, sizeof(fdt) / 4)); 232 ut_assert_nextline("Working FDT set to %lx", addr); 233 ut_assertok(ut_check_console_end(uts)); 234 235 /* We cannot easily provoke errors in fdt_open_into(), so ignore that */ 236 ** CID 450967: (PRINTF_ARGS) ___________________________________________________________________________= _____________________________ *** CID 450967: (PRINTF_ARGS) /test/cmd/fdt.c: 261 in fdt_test_move() 255 /* Moved target DT location */ 256 buf =3D map_sysmem(newaddr, size); 257 memset(buf, 0, size); 258 259 /* Test moving the working FDT to a new location */ 260 ut_assertok(console_record_reset_enable()); >>> CID 450967: (PRINTF_ARGS) >>> Argument "newaddr" to format specifier "%08x" was expected to have = type "unsigned int" but has type "unsigned long". 261 ut_assertok(run_commandf("fdt move %08x %08x %x", addr, newaddr, ts)); 262 ut_assert_nextline("Working FDT set to %lx", newaddr); 263 ut_assertok(ut_check_console_end(uts)); 264 265 /* Compare the source and destination DTs */ 266 ut_assertok(console_record_reset_enable()); /test/cmd/fdt.c: 267 in fdt_test_move() 261 ut_assertok(run_commandf("fdt move %08x %08x %x", addr, newaddr, ts)); 262 ut_assert_nextline("Working FDT set to %lx", newaddr); 263 ut_assertok(ut_check_console_end(uts)); 264 265 /* Compare the source and destination DTs */ 266 ut_assertok(console_record_reset_enable()); >>> CID 450967: (PRINTF_ARGS) >>> Argument "newaddr" to format specifier "%08x" was expected to have = type "unsigned int" but has type "unsigned long". 267 ut_assertok(run_commandf("cmp.b %08x %08x %x", addr, newaddr, ts)); 268 ut_assert_nextline("Total of %d byte(s) were the same", ts); 269 ut_assertok(ut_check_console_end(uts)); 270 271 return 0; 272 } ----- End forwarded message ----- --=20 Tom --K2OpNyhxvXjWcm+a Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmQh7E4ACgkQFHw5/5Y0 tywm7wv/ZcI1i7veC1hXZRmppAnmqK/bz/qvtfDljPlvt94C1NZTTtj6p0Iqvs71 AY2N5/sH9273yzuOTyhy07AEwHGsR3ePL0IPMAlE0l8cLAweQ/UhRzTwpOri1Z5U j7W7Lm++8jrJqldgD7FdP1J0q0wChkrmPZYROM/XRgMWNi7ewfsRCoLw117ZH0dR XItxtsDqUr1qnTZO/BFBdOHT4N3t/XlyU3Jb/GIPqSk9BjLCbN2xb8wPKJyRsTZe UbU9AkHrq9yphA9lWwWDPFDVW8nxd9JRbqe9Gs2bZ8lXQHtr+5l9Kf2IJzxk3sqR NnPc85/U/PAQjvxpTWX7c3UTNTgZWrtaMc/7m5ub+tVKGD9XhrEUr3dlxeXO4K47 nyArHzHYMcQf41+Ac5ai8JwRA/E0fYISaRdjl2IrVeFhQtdUZwvP1BrvqhGUi5b8 p0O+D1C6Xy/IDfuPL9I2aN+AzwmIdWuImlOEcbsjTXWVmT/ercxFnZxQXFvXI48Z kkflcGtM =gmai -----END PGP SIGNATURE----- --K2OpNyhxvXjWcm+a--