Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1833611rwi; Thu, 20 Oct 2022 18:27:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6g6xpdS/SNp9KBgollTJWA8EOYGKbyN1x78Anf1NM4UfPRuTGXos+LWz73MGt330gweR12 X-Received: by 2002:a17:902:ce87:b0:181:e55d:2d4 with SMTP id f7-20020a170902ce8700b00181e55d02d4mr17027140plg.13.1666315679578; Thu, 20 Oct 2022 18:27:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666315679; cv=none; d=google.com; s=arc-20160816; b=kxwWpvYVIk3iriVNaLK9wPztjBpZz4grFnDa1Icj0qTYxFHVC1zG9I47MYfftKO3zE eJNUVvcPDKIza1bpt4VRShsBmtugXMTwcKFJaF5YMUKiBCiEbTmEkTgu8VXl5q3vP7A7 icJLtV0YcBc6J0g9JEsb/9rQ8VKmxG0kJSlSSidSxp5m6uE9YYidsBOpMwhu8omjSP15 WoD7GoNTSpqhDJ3k59wYUXL5NVRvpVyio/dSuyR1GRptWKnQ8kQq1b4dIdE+XDium9xV k0C2IaDttG8uTrRUwyS0RjCr/9XekaBU5yVYoL8mufPpOYAdIh2jjF02j96zi2xTpmpG 8ebQ== 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=6vjKU3y4XcGUvVhqTEBbIddmaW3jyno5zUCPx3v5JkA=; b=Gjv/u0LbcuQO+h3ZD39GIEWrqd+7EEN+9SbPubB9Or0avqg1I6NPDuf4oAqRupbRlB jblYIS84nwwSCIXjfmejQ3lbXfpQPfA0zCkS2MvzZTT7G7HDWAu7sdw965npeiS0juDu ZYYkppFU/qIs0mNPRJO0Sy9h3KIx6wrBwiLsnhZvYfps7jOSGtChGTMa4wwfVnQzfAbY b9QGcAhEEJH05lF6dHAZO8QndVoJR3ZfsaksWs8c9D4LrRYlMylSZgJiJqOkRyGGEIik MMGxhRNlfUditoKlnZ9c7qCLAs5QADFgmovi2CA5GfUoWXevJtCgZU5HjbSLwUTUCcgR B73w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=eIVWBMZa; 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=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v14-20020a63b64e000000b0043c05df34c0si23874410pgt.411.2022.10.20.18.27.44; Thu, 20 Oct 2022 18:27:59 -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=@zx2c4.com header.s=20210105 header.b=eIVWBMZa; 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=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229965AbiJUBCD (ORCPT + 99 others); Thu, 20 Oct 2022 21:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229967AbiJUBB7 (ORCPT ); Thu, 20 Oct 2022 21:01:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB65A229E44; Thu, 20 Oct 2022 18:01:58 -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 1437361D7E; Fri, 21 Oct 2022 01:01:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73175C433D6; Fri, 21 Oct 2022 01:01:56 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="eIVWBMZa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1666314114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6vjKU3y4XcGUvVhqTEBbIddmaW3jyno5zUCPx3v5JkA=; b=eIVWBMZawG1psqVjOZiZanO/BQ2VSLq8NLoiJb0IXdy9xayPA7uYHHQ/PnnaZCszmZFECu RVc/TpnhYGDL8phHLgu+fkZIOFJKGTBiZCz8syhVKy809yLcWNvMwEQ9G++I2DGm3hS+IU +CSVb6nHNk+WQZTciXnA/J4QMLKSd3c= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id f4dd807b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 21 Oct 2022 01:01:53 +0000 (UTC) Date: Thu, 20 Oct 2022 21:01:32 -0400 From: "Jason A. Donenfeld" To: Kees Cook Cc: Linus Torvalds , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, linux-toolchains@vger.kernel.org, Masahiro Yamada , Andrew Morton , Andy Shevchenko , Greg Kroah-Hartman , ndesaulniers@google.com Subject: Re: [PATCH v2] kbuild: treat char as always unsigned Message-ID: References: <20221019203034.3795710-1-Jason@zx2c4.com> <202210201056.DEE610F6F@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <202210201056.DEE610F6F@keescook> X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 11:41:29AM -0700, Kees Cook wrote: > On Wed, Oct 19, 2022 at 05:38:55PM -0700, Linus Torvalds wrote: > > Having some scripting automation that just notices "this changes code > > generation in function X" might actually be interesting, and judging > > by my quick tests might not be *too* verbose. > > On the reproducible build comparison system[1] we use for checking a lot > of the KSPP work for .text deltas, an allmodconfig finds a fair bit for > this change. Out of 33900 .o files, 1005 have changes. > > Spot checking matches a lot of what you found already... > > u64 flags = how->flags; > ... > fs/open.c:1123: > int acc_mode = ACC_MODE(flags); > - 1c86: movsbl 0x0(%rdx),%edx > + 1c86: movzbl 0x0(%rdx),%edx > > #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) > > Ignoring those, it goes down to 625, and spot checking those is more > difficult, but looks to be mostly register selection changes dominating > the delta. The resulting vmlinux sizes are identical, though. > > -Kees > > [1] A fancier version of: > https://outflux.net/blog/archives/2022/06/24/finding-binary-differences/ Say, don't we have some way of outputting LLVM IL? I saw some -fno-discard-value-names floating through a few days ago. Apparently you can do `make LLVM=1 fs/select.ll`? This might have less noise in it. I'll play on the airplane tomorrow. Jason