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 4EACAC433FE for ; Wed, 19 Oct 2022 23:56:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229697AbiJSX42 (ORCPT ); Wed, 19 Oct 2022 19:56:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229929AbiJSX4Z (ORCPT ); Wed, 19 Oct 2022 19:56:25 -0400 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 452C817C157 for ; Wed, 19 Oct 2022 16:56:23 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id o64so21059366oib.12 for ; Wed, 19 Oct 2022 16:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VigXITkVLYj2H0N/7H5h8chIQ6OrSCW4jyaDySBHArA=; b=dVipe01F0+/PKATXxNO5MrvQYydwK3wDKFHJJPYZu33TRsdQlwODeaeTcxofz+TcBy i9QkXwhJMph9EfoGPMbJeRd2V3zcRj3Q1p7Ywf3RVXRl5yNd3cPt/0QbtxIPuhrUznxB QKXH8CkolwUIi7/w8E0M06X2b4SfFZEteQSOA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VigXITkVLYj2H0N/7H5h8chIQ6OrSCW4jyaDySBHArA=; b=Tk2rWCAi9tZJth3ylOj96kVchzWwRBjU1VuSI4EDPvdrkN4WH4vwGiIPk/2E9seMCp qWrGyUUxUMPPg9GohLwwPCJxAEj7JmTS9xDHBIszsI3u5fhQJaclnjIAAr62Laik78j8 A2X0flGNBxGDvSHiaGbkn6IS/OSgJIw3wLFAjMsfsH3qByNxCGbyq6Ql7jVab2gecCjc cHjQGYFZ6l0pqnFJjJ5IfralNDgna8NB8XRDhk9JwCDvUjAtBidF1f0fgTzN8p2+XhRb AauqPQHhr/tpL5N/YJ+6K7/ZmojqRxVJTi/X1Qa0KNgQvSw8f5YjdDbraMI2Bmt89g0h SYVQ== X-Gm-Message-State: ACrzQf03crogC4Icukmb48Ht8RXTUyMvs7m9fNW10XVqQnarqttA9Yrd m6gxZVzu/tteTCtGN4pDvNdkdp+Txatorg== X-Google-Smtp-Source: AMsMyM5ECZkJSLUeu/6ryrvXXm7zp+lx4HND1GCSHbaw8V/2HVmQmkYHgJOq2PkmcIuQtiUNiAyFBQ== X-Received: by 2002:aca:ac88:0:b0:355:200f:b5ac with SMTP id v130-20020acaac88000000b00355200fb5acmr13847080oie.46.1666223782401; Wed, 19 Oct 2022 16:56:22 -0700 (PDT) Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com. [209.85.210.41]) by smtp.gmail.com with ESMTPSA id s6-20020a056870ea8600b0010bf07976c9sm8039998oap.41.2022.10.19.16.56.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Oct 2022 16:56:20 -0700 (PDT) Received: by mail-ot1-f41.google.com with SMTP id br15-20020a056830390f00b0061c9d73b8bdso10458418otb.6 for ; Wed, 19 Oct 2022 16:56:19 -0700 (PDT) X-Received: by 2002:a9d:7745:0:b0:661:a3c9:3cff with SMTP id t5-20020a9d7745000000b00661a3c93cffmr5595353otl.176.1666223779433; Wed, 19 Oct 2022 16:56:19 -0700 (PDT) MIME-Version: 1.0 References: <20221019203034.3795710-1-Jason@zx2c4.com> In-Reply-To: <20221019203034.3795710-1-Jason@zx2c4.com> From: Linus Torvalds Date: Wed, 19 Oct 2022 16:56:03 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] kbuild: treat char as always unsigned To: "Jason A. Donenfeld" 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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. Linus