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 9F6E1C433FE for ; Thu, 20 Oct 2022 00:11:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229826AbiJTALV (ORCPT ); Wed, 19 Oct 2022 20:11:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230089AbiJTALS (ORCPT ); Wed, 19 Oct 2022 20:11:18 -0400 Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CB291B8678 for ; Wed, 19 Oct 2022 17:11:15 -0700 (PDT) Received: by mail-qt1-x835.google.com with SMTP id f22so12790331qto.3 for ; Wed, 19 Oct 2022 17:11:15 -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=QgmCMGlR3g14Y9d9iiVuq+x0ODxhrTVQtuHgg6vYiT/PIMcWFA5h/D/grUxsMbxICG e711Lv+5wKDKFaW8KrS4ATo9WRJzyU62SRNzLFhzhOIKc9BpIkIhxWA7snbjc8OVdSj1 PwPP65vtpL8DUDClVA24MLC3pfC8oAIwAEmbZ9UedkxTF7NLVTF4Cf7gkfoWfj15bhpT /4bj+8PAOSuAY534lq1I3CUNlcQzmFogGxYSklLFOqkYAK6Yt7DSjm3+G1/sFLP8FMJ5 uN/99CksAmOTXF7CSBpG7VRSxUllWFb9zq7sj+va1XJ4CHg51OICHfbx9SR5ok04R267 zPQg== X-Gm-Message-State: ACrzQf18oC45/Mz59sVMjbsqDWIcnp9oAiB8ojP5vRFYwdDDr15kUck2 M2FkY1uhTe2NLJR7jGlYB81VLyyCi8Oplg== X-Google-Smtp-Source: AMsMyM4mSOa4C4DroN4tq/2Htxn33Tn6SUlnWv210Whntyvcev45bJ4CRz9nz601urjfo8sf/ewe5g== X-Received: by 2002:ac8:7f11:0:b0:39c:e908:6451 with SMTP id f17-20020ac87f11000000b0039ce9086451mr8905999qtk.560.1666224674246; Wed, 19 Oct 2022 17:11:14 -0700 (PDT) Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com. [209.85.219.169]) by smtp.gmail.com with ESMTPSA id gd21-20020a05622a5c1500b00399ad646794sm5081637qtb.41.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-f169.google.com with SMTP id o70so3529801yba.7 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-kernel@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