Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1454011rwi; Thu, 20 Oct 2022 12:41:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6gjplHGUe530uE2yDVeJaYl8Wfy5OiPMJ4molan9H6cTHnLi6QTax/j5nMN/FAWy5WFm9T X-Received: by 2002:a17:902:f549:b0:185:3b98:380f with SMTP id h9-20020a170902f54900b001853b98380fmr15477216plf.36.1666294894290; Thu, 20 Oct 2022 12:41:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666294894; cv=none; d=google.com; s=arc-20160816; b=PHh1cFkgDYTMHUHh5mM6ot78aNjJoBGcJU/sr29ySowp/ZApHYzpnxmRg0xb71rthg cIsA5yjJJT40iZ0YW7SjO9fdzhcBsKxEN1os2z9e8zSH3pTPXb6Jzx1vcQC6Ww40Sbgl Of3cNm4JrF5JvBsPtlDAfrX6L27NrefHxwD+PJmpHjGpKbYEOuiHKAmBt84JG6drfdGX C4PGJ6UEs0TxXm5nmp4Gd+4untEsVdtrY3ZAxqeFjM0XxaIK5LWya5zmusFRpdNGvLQu BKtDP8Zz6nVIJqd8jSv+uh8Ixq8pNcATJqmN/hs7F6ACI0IzeH9vXboweHB1vaQ4h07H cXQA== 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=7nPBTU3PqdP5EK9iSk8h8ufgxACQharp0pBd9nt0BIc=; b=bPZpz4QPWSSii9028511BeS1WyeLW2Yv5xXLXDRUs4rxkFhg+S1Mwcy6hF9LQKI9NC 1ZGq0GNDn1ROURkJos21CCi7OvlPOq3XigG+qD14lg8SdYlC5kqOlH3FTuTrJ3WTgO+p n4OBRCHsR9UwCK+ck5cRW8Wtr9/rkjnld7wvYV7r7XM8JCTbu77TP4lE34no5UNGZxQz A7RPhP97wRoJyZlau3y9pbHKACVuVIDjVbJZfv40z/Vm9zdshxzWjJPCW6G7O9s3DTPZ bW5fUzZeIJwiuXVq2hEXWjxcTztHlM98kIwri09soO89J9C4UZxqtOV52qV4Ta2wYrc5 DOow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=V87BkIgQ; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ot1-20020a17090b3b4100b0020de216d0c4si5391412pjb.61.2022.10.20.12.41.21; Thu, 20 Oct 2022 12:41:34 -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=@chromium.org header.s=google header.b=V87BkIgQ; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230039AbiJTSlg (ORCPT + 99 others); Thu, 20 Oct 2022 14:41:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbiJTSld (ORCPT ); Thu, 20 Oct 2022 14:41:33 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D104F208805 for ; Thu, 20 Oct 2022 11:41:31 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id x1-20020a17090ab00100b001fda21bbc90so4336019pjq.3 for ; Thu, 20 Oct 2022 11:41:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=7nPBTU3PqdP5EK9iSk8h8ufgxACQharp0pBd9nt0BIc=; b=V87BkIgQjC4K7MYDNkBaUMfBiwNsRounMByDxYac7tRM8jK6sBUrEZidRmmlXpC9YB Ie7MDrLvE6AArCQgek5J0VqBNd+y0aPXnEktH0qMOtcLrMv3Jw3ejmBf8/tdQz1xaKPC A7AUcNXuDyNgx3VmkwC8GEorFfF+SdXKj2Enc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7nPBTU3PqdP5EK9iSk8h8ufgxACQharp0pBd9nt0BIc=; b=rmuaUezkxSOWHPm6HvlyalMmLgeTuVXmsaqDROFaIOTwOXli2yla1ThiSDXydlI1FM CeR8IaASdonS2yfvl2L6ybXJ/G6P1qObyVYAzAkPbDR0BKAHdUIunInKmfm1rHRS9DBq yGQmgFP4DzsxC5XUjxNtrzUR27YXgUKLBel9DlFo9wklBnylomEXWs1O3jLFDD2DGKib U8p09P/1c027wwG9UHk4NUyiwaClA3OXF4hQJvP6jA7aiRwXU+ANvWk2gn1TgIqJA36A 1YvnMZbctQWjZSILnYxceJ9q+YCgpNY8cySbSJUlC7AvLp/dMzAFQCIcLrg5rxYe/7mK G8Aw== X-Gm-Message-State: ACrzQf1hS6ensCur1i5oFp5rwgL6B4xmUuU0dlZTRSJJp6TOmvlNRNPs ACEL4qGuVA1xVJtglI8/1uFJfUqa7k0+ew== X-Received: by 2002:a17:903:22c1:b0:184:983f:11b2 with SMTP id y1-20020a17090322c100b00184983f11b2mr15663540plg.40.1666291291263; Thu, 20 Oct 2022 11:41:31 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id p7-20020a170902780700b0017bb38e4591sm178160pll.41.2022.10.20.11.41.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 11:41:30 -0700 (PDT) Date: Thu, 20 Oct 2022 11:41:29 -0700 From: Kees Cook To: Linus Torvalds Cc: "Jason A. Donenfeld" , 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 Subject: Re: [PATCH v2] kbuild: treat char as always unsigned Message-ID: <202210201056.DEE610F6F@keescook> References: <20221019203034.3795710-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 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/ -- Kees Cook