Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2998974pxm; Mon, 28 Feb 2022 10:01:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEoXKYvYNuf00qmAKavK/E5HMRA4Xf1yYkkdXF6EGmJvxR+dv250UnpeY9oysk82StE802 X-Received: by 2002:a17:903:291:b0:14d:522c:fe3d with SMTP id j17-20020a170903029100b0014d522cfe3dmr21754616plr.100.1646071314121; Mon, 28 Feb 2022 10:01:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646071314; cv=none; d=google.com; s=arc-20160816; b=ZeQRfgK8L6lLx1ah0WJ5gApTmcg9wbG08tqWXJTfUaWWhPimsrs2qvVAaidF1AuS5i WBvKRTP+ctY2ukP4NJkwa6BQYzO4MgRhbfebuVrGfDirv3QfoYg7mEAtqFf8Q6ULZkDk z2VDA2FxooZVMFbAKHbsi9d7LQ3Qyfct5NQsUb3vTbNHwpBVBBLrOO/kKJJCj8w+rdrC IsVgX8TF0bpPsai19SUnEszjI3plnHqb2LbVavNma5MU4W3IoLGT3oTZb5Dy8Td8bjr3 +NxfJbKNER54x6pigY1+VY0S61dI6tcA5OHYHuobY03jNbSXGYeNz9eRW1jrMmfoke2g QECw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=+JW2ocuDNtQZWRPsfo4murD1s5BVXtRPB2waQk8WwMk=; b=rGTSvu9+YVgO4OaEwoVDo6dZM7wg/ZkN/4Efob1iULgVWj9W2QfxTFVUp24CLXlVGj 0V2rsxSQmEKzAC3WYJoA3u1cp/jdfv90XSv4mUkzPNvZTd/KBrIp+2T8509DFiGLgXBp 64WMWED6jhL0jcRp40twjMoyM8PupgGtSV6cOseewZk6g1ZReXiEN/cSvfyAk2rSyuEo H7m4cZkfH2MnCcK0o4KuVHELaSghPqCQbBrjFzD7kC4/GqqGwaBMqvwHddsPs/BZG2TE x6eb8wXkXFhQ54mAPsaWWGovF8jVxp/lIaa4KgE+/aJQpSGbL1nRbw2r3kSueTzFV20L OWBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tugraz.at header.s=mailrelay header.b=hKEwIYsC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=tugraz.at Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p37-20020a056a000a2500b004bec040c9c9si11828337pfh.37.2022.02.28.10.01.36; Mon, 28 Feb 2022 10:01:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@tugraz.at header.s=mailrelay header.b=hKEwIYsC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=tugraz.at Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233575AbiB1HIs (ORCPT + 99 others); Mon, 28 Feb 2022 02:08:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbiB1HIr (ORCPT ); Mon, 28 Feb 2022 02:08:47 -0500 Received: from mailrelay.tugraz.at (mailrelay.tugraz.at [129.27.2.202]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2135660ABB for ; Sun, 27 Feb 2022 23:08:07 -0800 (PST) Received: from [192.168.0.150] (84-115-212-199.cable.dynamic.surfer.at [84.115.212.199]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4K6Wg75JVBz3xVf; Mon, 28 Feb 2022 08:08:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1646032083; bh=+JW2ocuDNtQZWRPsfo4murD1s5BVXtRPB2waQk8WwMk=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=hKEwIYsCo7sbSCMFB1sptFjNojejP+SEikz70Lk+S/NwjhxT08MPoY/Soog2UeoJp 30c67OaZMnxz598DJU7e9h02vc9+csDp42INRhy1lZsqbsHZrjjnVvN98G0mmlCRCd LoaX51sMeJ1HUd6wPDBgS5J9A0hCJhtzLNST5FJI= Message-ID: Subject: Re: [RFC PATCH 03/13] usb: remove the usage of the list iterator after the loop From: Martin Uecker To: Miguel Ojeda Cc: Linus Torvalds , "linux-kernel@vger.kernel.org" Date: Mon, 28 Feb 2022 08:08:03 +0100 In-Reply-To: References: <979af7ae9b7e8baf080ef6f8d42d48d7f5d2c5b4.camel@tugraz.at> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: G/VXY7/6zeyuAY/PU2/0qw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Sonntag, den 27.02.2022, 19:12 +0100 schrieb Miguel Ojeda: > On Sat, Feb 26, 2022 at 3:43 AM Martin Uecker wrote: > > Roughly the same group of people / companies that > > write the compilers also control what goes into the > > standard. They then like to point to the standard > > Indeed, at least to a substantial degree. > > > For signed overflow, I am not entirely sure what the > > right choice is. Wrapping for signed overflow also seems > > dangerous. I use UBsan to find such issues in my code, and > > this would not really work if signed overflow was defined > > to wrap. > > UBsan and similar tooling may still be used to find whatever behavior > one wants, whether defined or not. UBSan already has non-UB checks. Technically, this is true but not really in practice. If signed overflow would be defined to wrap, then code would start to rely on it and detecting it becomes useless because there are too many false positives. In your own small controlled code base it could work though. Martin