Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2180235rwi; Fri, 21 Oct 2022 00:15:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5yoCoXbRCrPuXmFFm9cHHiE1j1mXHYlrsLaIwwOrnbt82RpErQ5y6UmFMvxHSfkMBxaiiY X-Received: by 2002:a17:907:70b:b0:740:ef93:2ffb with SMTP id xb11-20020a170907070b00b00740ef932ffbmr14002676ejb.93.1666336514370; Fri, 21 Oct 2022 00:15:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666336514; cv=none; d=google.com; s=arc-20160816; b=AVe7acIJktkIXQLxGclZINj5413jbsimcJpzA8CorQT/JoHU+JSsJicDYvN40LZ60G 05E+y1hy2nlzWYczmL5F7msiKLk/4svr6YyoEWKFCnvp6YK3BSauC7oFyHUDGyLuUm0r 9nH9dzyRNh5pwwJZGpZpaU4acOgNK4QBTjn+VQFL++Jgw6wALpTeNo7y2DZBia0/ZN5A uefVSoPyTGz2/QIiA38+R2nOOmPq5cPahUhx9sYvORc+moeDvNj99v+ccQ9UcB9WEshe APceTH6ZH49Qb5d6XGml08FIzkPWGX+8aCpm5uqJQNsOuHDC+U6SVy8GUMTFpE/Tu6cK U9fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7MBNKwMqavEt7RzgLAyEsEHMnhM+8/DLirWjewHhIaA=; b=Yc2Pls5k6ZNWY+GGifyLNzygBghigeXnaipnkmsbueClSPtBDJVaPSXsPmAPvo/3S2 H8WqoXu/q7d3R4U0zZzGKkGrjNGr1bEItSATxopdJY08nQvVHU8t6sw6IaK97VnMR2jU wIQElZsLSFaqxEKbEVtdtIB/wUaeNKm7pYza9Ms/YgfN/pXZHeE9ut1jpjHJTBW6jZa7 CDXzpTavL7pG3lGRCjUWt1F3n2VJM1Xfo5aD4KU4ojXj198vtnfiermA5IcZ11KwdcII 6LgE51lUdf9qyt/0l5qKx8RU8Pe8nE7A751hl/1aofYjWV3AQ/iMwUOoq15DJ8WBRxJq NbZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AFpVfJBk; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r14-20020a056402018e00b0045c7c7b95easi16966555edv.73.2022.10.21.00.14.44; Fri, 21 Oct 2022 00:15:14 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=AFpVfJBk; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229602AbiJUGtX (ORCPT + 99 others); Fri, 21 Oct 2022 02:49:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230331AbiJUGtM (ORCPT ); Fri, 21 Oct 2022 02:49:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11253244191; Thu, 20 Oct 2022 23:48:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0B56B61B39; Fri, 21 Oct 2022 06:48:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2EEAC433B5; Fri, 21 Oct 2022 06:48:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666334932; bh=GkJW0rhkNtgNET6DTbBjkqNJSetsUPif97QcFj6cITM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AFpVfJBkCtT8rtyEZ8VWmgJPv4V9sZOIwi1hyEhZzwRic/j8fBDyJSWoWhx0u6Ykn ftTsmDSLbGNgRHMEhJsra6zAkEs0wA0WlYOUkx+KMMeUfWrnqg+FcTDsa2LD9z/AFb c7kwtvv5igsR0AgKdoNA1p4dcMAgWU1PeBJpP3Wk= Date: Fri, 21 Oct 2022 08:48:49 +0200 From: Greg KH To: Linus Torvalds Cc: Kees Cook , "Jason A. Donenfeld" , Alexey Dobriyan , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, mm-commits@vger.kernel.org, masahiroy@kernel.org, andriy.shevchenko@linux.intel.com, Stephen Rothwell Subject: Re: [PATCH -mm] -funsigned-char, x86: make struct p4_event_bind::cntr signed array Message-ID: References: <20221020000356.177CDC433C1@smtp.kernel.org> <202210201151.ECC19BC97A@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 On Thu, Oct 20, 2022 at 01:17:33PM -0700, Linus Torvalds wrote: > And in other cases, there's no actual difference at all, just > different register usage, so the diff looks fairly big, but doesn't > seem to be real. In one case I looked at, it started with a 'movzbl', > but it was that in both cases, because the type was actually 'unsigned > char' to begin with. But for some reason it just used different > registers. Example: > > - handle_control_request() in drivers/usb/gadget/udc/dummy_hcd.c > > The reason here *seems* to be that > > char *buf; > buf = (char *)urb->transfer_buffer; > > where it really probably should be 'u8 *buf', since it actually > does a cast to 'u8' in one place, but there isn't even any read of > that 'buf' pointer. So the difference seems to be entirely just some > "different type in assignment" cast internal to gcc that then > incidentally generated a random other choice in register allocation. I've send a patch for this now: https://lore.kernel.org/r/20221021064453.3341050-1-gregkh@linuxfoundation.org and will take it through the USB tree, unless Jason wants to grab it through his tree. thanks, greg k-h