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 61636C433FE for ; Thu, 20 Oct 2022 18:41:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230058AbiJTSle (ORCPT ); Thu, 20 Oct 2022 14:41:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229936AbiJTSld (ORCPT ); Thu, 20 Oct 2022 14:41:33 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF91F208802 for ; Thu, 20 Oct 2022 11:41:31 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id z20so114992plb.10 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=pt6Y8f0OnvPn1l/Kn4/P7yia8Osk5BGO9qKM9Q4L+5dXK6uh2aL+DWcfrPosFjmF1V s/dLOR9pwEaawWkxWtA3HLXAp5eoUiXSNmHaRxnftKuD6+WuRGoE74FmuOuq3uI/PFy+ i+jhnoeSIC7flfHRkquYulQDVrkTpm/tbM6cyDoiogLMabXNoclWKpxwzO80OwDQquRa YCvtFNIigAnX/RR4GLAg9hUlj4CtI67qD2cFB9hkAd3OMCBiu0yxP4vuQnmm6fjfoYqI R5DrJ6mm32+sPjr/mSf41IuP0FghkWoOzd2rGzJmZ67/Fuqmj5HYrADufqi7AMIaUt9a IYKw== X-Gm-Message-State: ACrzQf3rHH2hMgt4a2UmvGJrd5arvkcSv4DBuWOEdREsbGVFWLDPUTki l6tiEx9wN1Iujnp1+ESt39+OIg== 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-toolchains@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