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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7736DC43217 for ; Thu, 20 Oct 2022 18:41:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230071AbiJTSle (ORCPT ); Thu, 20 Oct 2022 14:41:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230040AbiJTSld (ORCPT ); Thu, 20 Oct 2022 14:41:33 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFB91208804 for ; Thu, 20 Oct 2022 11:41:31 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id 10so178813pli.0 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=oQY0rhU+Bdn8ddr0BQj74+Q5JTugDaUWntk1+iOGqMQO3Gi07XnBqSeHQIXH/oQlJB 3iAoE4+hpLxNVPb+WcKGqKOviRuA3NMoYmSiEKOQ4OdLh9RTtWlkxxccgHLtLN0Kre70 29ROodCMFzcklDivKrTLX1Vq0tGGaNDS9fOvnrDTA8klCFsxhAfWce8mVykO2RpyIcgc M1ChtSdMnDudzir2kkQt0MtRj8iTNhNEtZKl56l6IbMa75JGzETn9x197dnGj3KsNl90 gQlefs1LQIChdGTXIHYNDtl42/WEm1RPbzP6IkDFux3q6wN7GE64Ebxy38Of7kvEINFz vYSw== X-Gm-Message-State: ACrzQf23hvOsLanhS2bXEVzvhjYnPbOS+H4+OmWbNycVgbhfkeqT2Ytd Vg1m0EvW+YX2+SSJLBsFNduhtg== X-Google-Smtp-Source: AMsMyM7jtj0lrm66FgtcXeuW3VLHNK1EiZ1HwCHhzPxNj/ARdDq42D4QCAl03CKpknF5hSdF+2b6lg== 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: Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@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