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 7746BC433FE for ; Thu, 20 Oct 2022 00:11:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229675AbiJTALS (ORCPT ); Wed, 19 Oct 2022 20:11:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229826AbiJTALQ (ORCPT ); Wed, 19 Oct 2022 20:11:16 -0400 Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EAE11ACA9C for ; Wed, 19 Oct 2022 17:11:14 -0700 (PDT) Received: by mail-qv1-xf30.google.com with SMTP id j8so1120111qvo.6 for ; Wed, 19 Oct 2022 17:11:14 -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=TvTy8n6C/1bhGfXbm3sWLXfdEs9qoqny5LEASHEaNLk=; b=XUuyKUtVk/E8FvAa0yrjE7arzz1tSezBbWYYJSXcz6sxfS6RHTtGrPKvwnKEOdW3oD RsfHg547QyRyTxoGJWre6JJxFdMYHlAnnqnNTo5EIUQ7RxnVkA1jAWPv3TG/Y8W+QUJ+ IgidGLePtNsUdi3C/qbpsGAfSgrU0ybb6wqpk= 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=TvTy8n6C/1bhGfXbm3sWLXfdEs9qoqny5LEASHEaNLk=; b=lj9B+s+VA3CpCf55jOi13eHPVocOf3ZQDF6glkdTFTp/bBxhIrQqyg0xjuZil3aq8h YotBHXYMdLY1hwvrF9d8Y1rFnctyEH6Ykek6LHBlR3WG3C2tKkObyGzGEERzD2BQzCzn G5mreBywnT9tK8zC9ZdWVBYyJzaBrOMOim6fDFM6G+k7gajkRipETX0zqQARMvviPYKI e/+2ElXs3iLeqpa3uCEZ6tl/o5IelHHdwY3BDwkls1fXRD6MYn1v/fs2Ve0IBQgZLe8d 0g2IN3pA3sxXqHdlysWTVzCkhWjUQI68Medwg1eBcbsFpA8ggAPZHEEny+JTm8F77I4v mh0g== X-Gm-Message-State: ACrzQf2IN1uuRzkB0Qvb4j2J0fQe9pPWL0z4Fwypz/w71mlS95Zog37P fZF8bg7FlZyKDNPaULGRAc1xNez8V0Sj4A== X-Google-Smtp-Source: AMsMyM6uWt4GleFBrTtB01dyz/EGv8c6vFquMsNSZ2geoZOrGVj8nY3SOWUrZc1DmEn93kt2fM2dAA== X-Received: by 2002:a05:6214:27c5:b0:4b1:7b3b:4098 with SMTP id ge5-20020a05621427c500b004b17b3b4098mr8924946qvb.27.1666224673493; Wed, 19 Oct 2022 17:11:13 -0700 (PDT) Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com. [209.85.219.180]) by smtp.gmail.com with ESMTPSA id h3-20020a05620a13e300b006ea7f9d8644sm5770341qkl.96.2022.10.19.17.11.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Oct 2022 17:11:12 -0700 (PDT) Received: by mail-yb1-f180.google.com with SMTP id n130so822957yba.10 for ; Wed, 19 Oct 2022 17:11:11 -0700 (PDT) X-Received: by 2002:a05:6902:1002:b0:6be:d89d:98d0 with SMTP id w2-20020a056902100200b006bed89d98d0mr8880613ybt.571.1666224671596; Wed, 19 Oct 2022 17:11:11 -0700 (PDT) MIME-Version: 1.0 References: <20221019162648.3557490-1-Jason@zx2c4.com> <20221019165455.GL25951@gate.crashing.org> <20221019174345.GM25951@gate.crashing.org> <202210191209.919149F4@keescook> In-Reply-To: From: Linus Torvalds Date: Wed, 19 Oct 2022 17:10:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild: treat char as always signed To: "Jason A. Donenfeld" Cc: Kees Cook , Nick Desaulniers , Segher Boessenkool , 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 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:35 PM Jason A. Donenfeld wrote: > > I wish folks would use `u8 *` when they mean "byte array". Together with '-funsigned-char', we could typedef 'u8' to just 'char' (just for __KERNEL__ code, though!), and then we really could just use 'strlen()' and friends on said kind of arrays without any warnings. But we do have a *lot* of 'unsigned char' users, so it would be a huge amount of churn to do this kind of thing. And as mentioned, right now we definitely have a lot of other "ignore sign" code. Much of it is probably simply because we haven't been able to ever use that warning flag, so it's just accumulated and might be trivial to fix. But I wouldn't be surprised at all if some of it ends up somewhat fundamental. Linus