Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1160810rwi; Wed, 26 Oct 2022 11:29:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4yjW2Z7hq8DoJQLmzOg9Sc0eb4iFoxiyBSBPxgAQ4SHlnkBMeEjk7YpDWjIMlNU3/3yH/9 X-Received: by 2002:a63:5a0b:0:b0:434:4748:4e7a with SMTP id o11-20020a635a0b000000b0043447484e7amr38058572pgb.561.1666808948482; Wed, 26 Oct 2022 11:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666808948; cv=none; d=google.com; s=arc-20160816; b=0LPUfJCvmmuyxsppScdzOFNrEWJ7GWCONm3/mraE0+sSeFPljpJ06ihKea3WXaLqy8 FnsR8wHTvH72z6SEAMe+8nNzQG6QM4vAJk+HNreAg95Ji794SKNuQT88u4l/8mADC138 i5YBFZW+mHYDGvSymIB4aXb6YHBk47+YmhQ9EPQI+B3Nsb31Uq+4BPpOfbosxt00PRUX x9foURf1y3HCSJ1l5lniiBWdlFUZTaQP33WIhiiWf9XeF0pDpXyl1TWtG2+PMr0sE/IO qoIXY23TwfifHcB18N4UCDFXP7Is/RNXIltbz76f0hglP+xRk677mzc42yTFTo4kkiUN d91Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ITulc6XgqsqjNhbd41aCpior1CUyIgJHMI2V6YZSYqc=; b=C/AU+4iEKVzuiRIPpduhsQfWVaNCJUc+SLS32R4oq8+keYV+BdN/wBQ7EHoFrnPaPC SAfR0SOqS0KEPt42EGWl+6O/Fz4ebhyaucGRIehbjk+cIJYzhgFPRgylX/81cCweTU4O nfIwFjIEhpLC/3HD0aw+93/qlrD1PPjUNd1zIh1kV6GGcw55gVGkHOejfj/BpLzCzuDT tj6d9WyFHOo4w1Fyx31tsVO26eVniakiGQ0hGYmMfO6bN2Rf0SN2GX7YVquDVLS2R+Ww NNAi9ZCA0XHR+pf3ise4+/Ntx/35qJnkYHUSqivyZa838ScfjnWnQYaTWfJ8Ry307Qsk gOeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=euOzt4Ot; 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 go24-20020a17090b03d800b00213353d1107si2939687pjb.172.2022.10.26.11.28.56; Wed, 26 Oct 2022 11:29:08 -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=@linux-foundation.org header.s=google header.b=euOzt4Ot; 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 S233966AbiJZSL1 (ORCPT + 99 others); Wed, 26 Oct 2022 14:11:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233986AbiJZSLY (ORCPT ); Wed, 26 Oct 2022 14:11:24 -0400 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 824B084E5B for ; Wed, 26 Oct 2022 11:11:17 -0700 (PDT) Received: by mail-qk1-x729.google.com with SMTP id l9so8685577qkk.11 for ; Wed, 26 Oct 2022 11:11:17 -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=ITulc6XgqsqjNhbd41aCpior1CUyIgJHMI2V6YZSYqc=; b=euOzt4OtQ6r2FoqktgoiitkA8qilHqWaety7Buy4Wc/kLai3+4S/yKJ+b8cr/78vie 65EAmm5Nk2Ou8O4UkVxUCQrdIYy4Jt0zqWrXA2jzp/FrxwIK4YXMEVDcaQQgF11XbHVL dUvryBX9A+1fa9gOcaAoRkiAkEUCX4yINBJmM= 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=ITulc6XgqsqjNhbd41aCpior1CUyIgJHMI2V6YZSYqc=; b=OfjiFpDTUmHe0/+yygDQCQD4GncCNB4oI6QBlIeVKd55DgsPbaeAskMmXzO9XMA8s0 CWK6AOIE5F6FGbGh0gDKqPXQGUm+mnyp6ie/4iWX8dSeUxwOzp9SU+jTiw0WMR4yfASR bamX28riSP1JQIcjYPlZrt+/AC7EtDkWsIBfAr569iV0LS90qx8y9Jibkhz2Jz1X4JyH for0EgxWIvrZOHT7J8IIne3+91J5rkcGxK+2oK7Lc/+Tzvam8WpFSMN1bQhsIkDO2iwT jxDEKw0og63z7COI+gmMms20/Nfycjx3C30tNzoJC9sbQPF3fuPlJuzs8RdrPcGqk0un Ao/w== X-Gm-Message-State: ACrzQf30nus0QFMVJz23j8pIJEF5pCNOcIf2ZTpNODG2sd7zvmulymPr j2pnAIMcGX4HeoVnT/R9S/tKKGJdKcmmkg== X-Received: by 2002:a05:620a:2627:b0:6b8:c8c3:78f9 with SMTP id z39-20020a05620a262700b006b8c8c378f9mr31400082qko.641.1666807876301; Wed, 26 Oct 2022 11:11:16 -0700 (PDT) Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com. [209.85.219.170]) by smtp.gmail.com with ESMTPSA id fp9-20020a05622a508900b0039a08c0a594sm3481688qtb.82.2022.10.26.11.11.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Oct 2022 11:11:14 -0700 (PDT) Received: by mail-yb1-f170.google.com with SMTP id y72so19939557yby.13 for ; Wed, 26 Oct 2022 11:11:14 -0700 (PDT) X-Received: by 2002:a5b:984:0:b0:6ca:9345:b2ee with SMTP id c4-20020a5b0984000000b006ca9345b2eemr3573582ybq.362.1666807873800; Wed, 26 Oct 2022 11:11:13 -0700 (PDT) MIME-Version: 1.0 References: <20221019162648.3557490-1-Jason@zx2c4.com> <3a2fa7c1-2e31-0479-761f-9c189f8ed8c3@rasmusvillemoes.dk> In-Reply-To: <3a2fa7c1-2e31-0479-761f-9c189f8ed8c3@rasmusvillemoes.dk> From: Linus Torvalds Date: Wed, 26 Oct 2022 11:10:57 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: make ctype ascii only? (was [PATCH] kbuild: treat char as always signed) To: Rasmus Villemoes Cc: "Jason A. Donenfeld" , 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" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 Tue, Oct 25, 2022 at 5:10 PM Rasmus Villemoes wrote: > > 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 Those US-ASCII days weren't really very "good" old days, but I forget why we did this (it's attributed to me, but that's from the pre-BK/pre-git days before we actually tracked things all that well, so..) Anyway, I think anybody using ctype.h on 8-bit chars gets what they deserve, and I think Latin1 (or something close to it) is better than US-ASCII, in that it's at least the same as Unicode in the low 8 chars. So no, I'm disinclined to go back in time to what I think is an even worse situation. Latin1 isn't great, but it sure beats US-ASCII. And if you really want just US-ASII, then don't use the high bit, and make your disgusting 7-bit code be *explicitly* 7-bit. Now, if there are errors in that table wrt Latin1 / "first 256 codepoints of Unicode" too, then we can fix those. Not that anybody has apparently cared since 2.0.1 was released back in July of 1996 (btw, it's sad how none of the old linux git archive creations seem to have tried to import the dates, so you have to look those up separately) And if nobody has cared since 1996, I don't really think it matters. But fundamentally, I think anybody calling US-ASCII "good" is either very very very confused, or is comparing it to EBCDIC. Linus