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 4B9ECC43219 for ; Wed, 19 Oct 2022 23:56:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229828AbiJSX40 (ORCPT ); Wed, 19 Oct 2022 19:56:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229850AbiJSX4Y (ORCPT ); Wed, 19 Oct 2022 19:56:24 -0400 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19DDD17C142 for ; Wed, 19 Oct 2022 16:56:22 -0700 (PDT) Received: by mail-oi1-x235.google.com with SMTP id g10so21079260oif.10 for ; Wed, 19 Oct 2022 16:56:22 -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=hfXkgdxbev+GaWtmTVRZPn32rO23Hz9lpssiWM/a7DdiyEhaVlNNLD2mb3mWKFIUwb RqkhdkvE8U4IoWs3pofYdrDt7J3FobHtcQySQcRWGIji+WDI0gMCi7HEHf/5us9LRLIu +6zegMX9z/hGrrMVerPyLnt7Xi9tjK/kLBR3+g+PQYclv8w7/LVembNk4/d9tVY/voyq aUmz/AaR/u3WV5mpmedzRxZvQvgACtuh6A6/1sHfHp3pQ7QT++NtE9GBzNNO9TM7d+Lj HqQ1ZtGZbktbqlS5s24hLKbbE6QdIucvrqLpBk6EerBwjEo20KKVlLMdUElVphM1vW9b PN0Q== X-Gm-Message-State: ACrzQf1DJNMQa2JMrKzHqRs6bEVepHC7/wtMTewI/wLJq7++gpaotV7w JuyzVokH+DhuAPPxXJHqhH5YOqlGRv9xUQ== X-Google-Smtp-Source: AMsMyM4jBeEeAW96O3feB4CtPEolfvuPibTR96YTOTEgxma2Doq1bVr6FmZnX7I2mCXL0Zjqn7Xc3w== X-Received: by 2002:a05:6808:f12:b0:354:b4c6:b4a3 with SMTP id m18-20020a0568080f1200b00354b4c6b4a3mr5762304oiw.123.1666223781023; Wed, 19 Oct 2022 16:56:21 -0700 (PDT) Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com. [209.85.210.42]) by smtp.gmail.com with ESMTPSA id x7-20020a056870434700b00130d060ce80sm8495871oah.31.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-f42.google.com with SMTP id v40-20020a056830092800b00661e37421c2so8268367ott.3 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-toolchains@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