Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp9263016rwi; Tue, 25 Oct 2022 17:40:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6vHJQM6e+D3Ws/f7gvpDwmzIqMeeGHGZYV5hiVwAkIMnt4bfa+Wl0EB5LWjkMFWJ4SWpNZ X-Received: by 2002:a05:6a00:230f:b0:53e:2c2c:5c03 with SMTP id h15-20020a056a00230f00b0053e2c2c5c03mr41388217pfh.11.1666744854439; Tue, 25 Oct 2022 17:40:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666744854; cv=none; d=google.com; s=arc-20160816; b=X9HQLq9LrveXo+1VngalN6Llq8Gmm1AOZT1nK1MGAXplWffiuu2yh5cdES3eO14nsh rFYv3HOuIfXgNj0oVSI+DPNictiyUwbLENsFqUIFKgYZgXKeYtETnKzZVxOhGN2DhJ8J aPbUR41/CObwx8osE3F9RgcRfO6+29BVwTFtSTE6JA+5ZVr8tcHsarMMXIUpPHeUh1s5 EaR4pC1WvWN/cbAui01bEzRif8yQ5yRYhOSwk/ZDTYN1aEDgH97VkOcBTtkfL0r1CAdm tGq+BUavGWuprK+MOQm25YBZB/uCE6oJ/oqYAUlJpGGKpzxwpg5a6T3nhvaFDES63K+E E4ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=4taiE5ssQYH2zlfw716I5D+61K8WmNsXSyJ4aqN82N8=; b=YEsZhPCES6XJtoJahEac32Rh8FM2Sv4LnRSUEAWFwuy7BLod+/pqoKefLMEtmJ31h6 Ox4Wji75eo6g5EH/4lsKHBML6cnJtbPwh/2dUfVmcnB9ZWNWqQxNskutZvRL0au3yPTe 04Q7PE2Vk07cKSi3SZaL2gYg84rnCf+Qitm17TOlqw/aK08D/Et7oKnY8jvxa/RLGWPA 9EnrSoDlTTTd4XWHEjO8UyNzc1IXS01maURqpGq0EuY7Y/rhGMw6sq7VaPl4WIURwD34 nReL4szeJDbQLbSQu3KBSnwd9KPoxtz/Ak2m9bzPQLk9HWFLOekS+NSzSmKghUpGAwVZ 3AOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=icD7feog; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a10-20020a170902ecca00b001869347b0besi5754349plh.174.2022.10.25.17.40.40; Tue, 25 Oct 2022 17:40:54 -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=@rasmusvillemoes.dk header.s=google header.b=icD7feog; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232640AbiJZAKL (ORCPT + 99 others); Tue, 25 Oct 2022 20:10:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232237AbiJZAKH (ORCPT ); Tue, 25 Oct 2022 20:10:07 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4B3CA3446 for ; Tue, 25 Oct 2022 17:10:05 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id z97so38897865ede.8 for ; Tue, 25 Oct 2022 17:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=4taiE5ssQYH2zlfw716I5D+61K8WmNsXSyJ4aqN82N8=; b=icD7feogwbnZHXxEHSUlJiUdinyKhya/zRuuqtoVUhyaraQ0seuTNAk/XrxuwJ0hxQ +RHi4wpnmQXkdR81PLGgT49IxOWoALW+IFaAfe8ECx3bjTYBHnBCZBluni8j1cgygBJG xgmIG0ZBIm2nZn5xaAhnqeRvJwkGoND+Q7SEo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4taiE5ssQYH2zlfw716I5D+61K8WmNsXSyJ4aqN82N8=; b=d78nMFwf3zXgbB3wFQW7xWDbPqGQ7Y11nTtWwJnWG+VozEk4NhPJjuTt6ZOQBff1XL 1Mou/rqouoJ2Hlz3n0k/a8vIVtpy92uV11JTPVdmXpfpXrmzCneKw0/YNUPqut9jGDRa QAAtj3/LTlR0IClAx5/TuLg+yPNNnye7G9oZ/4FUtxebbd92eT2iaLMFuy7GFOt9BbvR YUZReWoW5rMjrJcUJ83/QguBg4n9phtNmu78v64GPjbh1zXkxf960ETEfUiO7xdN38BS twkeJW3qS9hvQd5mnMvhi1jCRQ6rLjphYtr1nuyXgk6DpxnI1nHI8b/3Mn+I4qomDhE2 UHlw== X-Gm-Message-State: ACrzQf2oct1hpOqm5uWKLigLlPp06E3uX1wJXLQhKDYItwcP4Nki5zol AC4tfY/LDe1rl798QSSEt9+vEw== X-Received: by 2002:a05:6402:5288:b0:457:22e5:8022 with SMTP id en8-20020a056402528800b0045722e58022mr37785972edb.244.1666743004203; Tue, 25 Oct 2022 17:10:04 -0700 (PDT) Received: from [192.168.1.149] ([80.208.71.65]) by smtp.gmail.com with ESMTPSA id a7-20020a17090640c700b0073d7bef38e3sm2104978ejk.45.2022.10.25.17.10.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Oct 2022 17:10:03 -0700 (PDT) Message-ID: <3a2fa7c1-2e31-0479-761f-9c189f8ed8c3@rasmusvillemoes.dk> Date: Wed, 26 Oct 2022 02:10:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: make ctype ascii only? (was [PATCH] kbuild: treat char as always signed) Content-Language: en-US To: Linus Torvalds , "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 References: <20221019162648.3557490-1-Jason@zx2c4.com> From: Rasmus Villemoes In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 19/10/2022 21.54, Linus Torvalds wrote: > On Wed, Oct 19, 2022 at 9:27 AM Jason A. Donenfeld wrote: >> >> So let's just eliminate this particular variety of heisensigned bugs >> entirely. Set `-fsigned-char` globally, so that gcc makes the type >> signed on all architectures. > > Btw, I do wonder if we might actually be better off doing this - but > doing it the other way around. Only very tangentially related (because it has to do with chars...): Can we switch our ctype to be ASCII only, just as it was back in the good'ol mid 90s [i.e. before https://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux-fullhistory.git/commit/lib/ctype.c?id=036b97b05489161be06e63be77c5fad9247d23ff]. It bugs me that it's almost-but-not-quite-latin1, that toupper() isn't idempotent, and that one can hit an isalpha() with toupper() and get something that isn't isalpha(). Rasmus