Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp59039rwi; Wed, 19 Oct 2022 17:23:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7G+NmCN/GK/Z05hL1yluSP+g0s4vFq4T8uAakMfLzICrZ/ubsVqIzCg2AJOxZndztQXiN3 X-Received: by 2002:a05:6402:c7:b0:457:cd5d:d777 with SMTP id i7-20020a05640200c700b00457cd5dd777mr9551632edu.245.1666225396864; Wed, 19 Oct 2022 17:23:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666225396; cv=none; d=google.com; s=arc-20160816; b=viIQ/VU/i9mOp7+F0J8A6NEUqLDr8oII+dUb9/kfIgaFxYIUPbo8K6dJG1RYjhqZ3C MPJLm0dX9ifCLqhif0GxKaIjSrIfhRAVXxxjViib9VYE97jc3IEkfYmOVdA7g6MdZeOf iJncDibJ6VZpj0ketoKiSRyRhhkGVw0gN+1fUK1/ansJ5a3BQIzVR8nKu/Pg4uemEr68 sVbEESDAH1e9uDGObVAJvGp3Gy19wAckeSZFjQLS1ndI0ylMsWmaAHnd2ChYlNcSpcH6 ae60rIontHPKJjrVPoWlSpIGfOOonRdNkBft68+mXt8jMw8Hrfizkg3RnbmAEb+z2xMi lD3w== 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=QdiTrD4WRRi0FnFVPAP7IMCKeplG6Uwrive2CyE+3Ps=; b=dGzmAUkhn7oL9ltwwFyNwZnukRMAJZjlg8mE21utClRQhG/5YfOHU99ncQsAB0Fz4P xYz+8x1C0K/b8STnrPwPZyrtkUxYMcv9wdmYV3HplPoY69jlfzUuXpepD9x4XoDobQVB NKPzNZ0T9Af0KOzhFFggvmHiGaO0pO0jXtV3itOHZ9rH5ZQL6dy1hEHZEynvcHJFq/7C LYFJC5uGucV8bERChJ9NJuQJOBS4IrEDhMXP23Mq1Qpe92IynKiV//zFeF2iZaLO3HRG kksYaubbWaX+6eilFEWY+RJzKrZguLVJ3wmr86mKV8s2S/luFOBrj737kWL6bV/nj3e1 Ezkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=pNySuLQh; 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 dn15-20020a17090794cf00b0078d2ecb1d38si16706204ejc.832.2022.10.19.17.22.47; Wed, 19 Oct 2022 17:23:16 -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=pNySuLQh; 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 S229921AbiJTACW (ORCPT + 99 others); Wed, 19 Oct 2022 20:02:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230496AbiJTACS (ORCPT ); Wed, 19 Oct 2022 20:02:18 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B7A31870B2; Wed, 19 Oct 2022 17:02:15 -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 sin.source.kernel.org (Postfix) with ESMTPS id 69731CE24C6; Thu, 20 Oct 2022 00:02:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89D6DC433C1; Thu, 20 Oct 2022 00:02:10 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="pNySuLQh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1666224128; 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=QdiTrD4WRRi0FnFVPAP7IMCKeplG6Uwrive2CyE+3Ps=; b=pNySuLQh14w537yyHgsQHnDwsqOQA2ANKrrcA6IZcLUYTjdg6wXflf/bSRWyiy9ieNA+5Y uqCJKo+GL0UxOqeOWorCgjZ0ZQBFisuALuiCyM9dtLKO2Xw4bNArFqukyFTc/ByjmCf9G/ xguHH8FdWAhU64Fw3O3FpwaF07YxsjU= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id e61d4d12 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 20 Oct 2022 00:02:07 +0000 (UTC) Date: Thu, 20 Oct 2022 02:02:06 +0200 From: "Jason A. Donenfeld" To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, linux-toolchains@vger.kernel.org, Masahiro Yamada , Kees Cook , Andrew Morton , Andy Shevchenko , Greg Kroah-Hartman Subject: Re: [PATCH v2] kbuild: treat char as always unsigned Message-ID: References: <20221019203034.3795710-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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 Wed, Oct 19, 2022 at 04:56:03PM -0700, Linus Torvalds wrote: > On Wed, Oct 19, 2022 at 1:30 PM Jason A. Donenfeld wrote: > > > > So let's just eliminate this particular variety of heisensign bugs > > entirely. Set `-funsigned-char` globally, so that gcc makes the type > > unsigned on all architectures. > > > > This will break things in some places and fix things in others, so this > > will likely cause a bit of churn while reconciling the type misuse. > > Yeah, if we were still in the merge window, I'd probably apply this, > but as things stand, I think it should go into linux-next and cook > there for the next merge window. > > Anybody willing to put this in their -next trees? Sure, happy to take it. > > Any breakage it causes is likely going to be fairly subtle, and in > some random driver that isn't used on architectures that already have > an unsigned 'char' type. > > I think the architectures with an unsigned 'char' are arm, powerpc and > s390, in all their variations (ie both 32- and 64-bit). > > So all *core* code should be fine with this, but that still leaves a > lot of drivers that have likely never been tested on anything but x86, > and could just stop working. > > I don't think breakage is very *likely*, but I suspect it exists. Given I've started with cleaning up one driver already, I'll keep my eye on further breakage. Jason > > Linus