Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp6029753rwj; Wed, 21 Dec 2022 09:50:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXt9rwr5/Q3AeWJrRZbBRmSXnNzfRM6slN6BQ6gxWL55LDgqvJxCF4/u+KgMGZIjC5awo7G0 X-Received: by 2002:a17:902:dac9:b0:191:3e64:6362 with SMTP id q9-20020a170902dac900b001913e646362mr4303993plx.27.1671645052832; Wed, 21 Dec 2022 09:50:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671645052; cv=none; d=google.com; s=arc-20160816; b=LSmGBOb+FNqeXxkAerMtsLkskELJ5I/FO/IcKkRBCQ2tJtl9/qKKUD4ziluTqJKhj2 +PO/S2BqFMghbSGJdkxtvKFDfhwt1lqPwiiuQCdPDKnS7SohXZ7vJ8qTYXPoEJGIqsqZ WctD+fURwzUP0SWvKQxhkaa9O409Ie8R8EzzcM493gWOs3BdpHvs1MeFGCFrXKpa30TJ pJ5AK5s2zxtyiy9bZz5QbVNGJvEXGNP+CCBCYNn8c2YQQ0lZ1z7uh9LdvFqg3U8tOLyd 2ZcZ1s3QfJmlzt46JXM2WPMH4YRpX6lnRdVm8z6kOcbqeM/p1jT2vPI2mdqGz1R5UREc hIVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=I3f0UiW+/YoUBXR0TYEPPrtQ962Pvq8PyjcKApLuolY=; b=itNHEwO8MeZsJN0k3+sADoHnXghY/+0zygJrpqZ0U2IFPwUYCr6zZGveZjllrZJwzG iap8Fr1t4Yk9iN2EvYnY9eXzvlTDevKXUaY16gQLFnPMRmhkB8drj7yfktKCXJARX2Vx N7gk5LxTk8OBzJyHD90d9WiiFr0sk4APHMMK4xEnFLymqG/VEP4bOlcGvRKia6SYbISV zcAIsdlhJFdjemtuLReVynSvp2iUZ3gZAdb9bZLbBQZ8mfCCxvzzyloh8vgTwKmv4Gvj hHGjTe+IUOWpa25DiIgaLF5cDV27YvR4fmc7/dmAJ/8vO0gNs8XGWbZidHEI8B3NZSQE oLmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=S4JDz4fw; 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 l6-20020a17090270c600b00189d6969658si15814026plt.342.2022.12.21.09.50.39; Wed, 21 Dec 2022 09:50:52 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=S4JDz4fw; 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 S234729AbiLURVB (ORCPT + 67 others); Wed, 21 Dec 2022 12:21:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234958AbiLURUb (ORCPT ); Wed, 21 Dec 2022 12:20:31 -0500 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7732B4B; Wed, 21 Dec 2022 09:19:25 -0800 (PST) Received: by mail-ot1-x336.google.com with SMTP id k7-20020a056830168700b0067832816190so4575513otr.1; Wed, 21 Dec 2022 09:19:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=I3f0UiW+/YoUBXR0TYEPPrtQ962Pvq8PyjcKApLuolY=; b=S4JDz4fwJKnV0j2t+m3muAgfmV/i9v941+5H/WJccBUYbdnIgsgPX1hsplf1lkWywn LPmwsR7CREX8GM2K+FgIWNqn2RPJeUWoRfvoUZA9KgsCHYUb2OHx47O/Yr/+zO3V8fvW e9+is3kGg7xnW5j56R/KzPqFMy7sqXpaAgbT+KFGkNVA9xzWWZUWE5nnXvl2vrZ0OcuE qhfq5HGatwlHJs/MMATO0vpWXoHI0A7mmg0mB+DcJ1I87EbHZu3srhnDjNFExkEYVzGJ BxxYjI5nbfyBLmrnJo204A7t446z1aPtQd2Bt5gQakxLLM0B2bcpMZkFe6OUwvvP4uqI vi2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=I3f0UiW+/YoUBXR0TYEPPrtQ962Pvq8PyjcKApLuolY=; b=LRJ38qPI4peWMAKanj8fLowA/Csbmk7wAQSw+STV0XckZim0TAV3OJWqy9ocKfDIfh AZ0VhHAyIuuoHiJbkbi7Z5jkeESubp8paxCipiopl2xy2Xhr1rX0BnWFvsbFSLHMd4HR 8PsoEmm5a4GvOJedV21ubJ2ojaHSiKcdU0AByU/L1xPteSWdB24LAdm/1G/zQk7I5iJj 93vnFMuDzL8W3hGp6W0JLvHf1o88zDrYA7PygaG2LGRqmvWEa/ejtBsdm7U4HBax2vbF G7NzFrOPOzvHsHZB9WAKmsukEWGvd/jnbjLEF4BLdMeX6t63uqzofkjjPr2eoQmMv6G8 EhsA== X-Gm-Message-State: AFqh2koE00JRPy/cD55nXLMrd1OsXYhWztot6Uhs82TpC1N8C+/BjUKP /ph0Us/jzJxehoeQD4tXGic= X-Received: by 2002:a9d:6a11:0:b0:670:8270:1290 with SMTP id g17-20020a9d6a11000000b0067082701290mr1201996otn.38.1671643165022; Wed, 21 Dec 2022 09:19:25 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id v17-20020a0568301bd100b0067c87f23476sm1074448ota.57.2022.12.21.09.19.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 09:19:24 -0800 (PST) Sender: Guenter Roeck Date: Wed, 21 Dec 2022 09:19:22 -0800 From: Guenter Roeck To: Linus Torvalds Cc: Rasmus Villemoes , Geert Uytterhoeven , "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 , linux-m68k@lists.linux-m68k.org Subject: Re: [PATCH v2] kbuild: treat char as always unsigned Message-ID: <20221221171922.GA2470607@roeck-us.net> References: <20221019203034.3795710-1-Jason@zx2c4.com> <20221221145332.GA2399037@roeck-us.net> <1a27385c-cca6-888b-1125-d6383e48c0f5@prevas.dk> <20221221155641.GB2468105@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Wed, Dec 21, 2022 at 09:06:41AM -0800, Linus Torvalds wrote: > On Wed, Dec 21, 2022 at 7:56 AM Guenter Roeck wrote: > > > > The above assumes an unsigned char as input to strcmp(). I consider that > > a hypothetical problem because "comparing" strings with upper bits > > set doesn't really make sense in practice (How does one compare Günter > > against Gunter ? And how about Gǖnter ?). On the other side, the problem > > observed here is real and immediate. > > POSIX does actually specify "Günter" vs "Gunter". > > The way strcmp is supposed to work is to return the sign of the > difference between the byte values ("unsigned char"). > > But that sign has to be computed in 'int', not in 'signed char'. > > So yes, the m68k implementation is broken regardless, but with a > signed char it just happened to work for the US-ASCII case that the > crypto case tested. > I understand. I just prefer a known limited breakage to completely broken code. > I think the real fix is to just remove that broken implementation > entirely, and rely on the generic one. Perfectly fine with me. Thanks, Guenter