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 DB68FC4332F for ; Wed, 19 Oct 2022 20:35:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229954AbiJSUfa (ORCPT ); Wed, 19 Oct 2022 16:35:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230322AbiJSUf0 (ORCPT ); Wed, 19 Oct 2022 16:35:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5DD83FA34; Wed, 19 Oct 2022 13:35:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 72963619D2; Wed, 19 Oct 2022 20:35:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF9ACC433D6; Wed, 19 Oct 2022 20:35:22 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="ox4LmpHN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1666211721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=txdjrnQxkksG5klYgF5siV+ewaBIwJ9LoBxaecxqpbM=; b=ox4LmpHNCKy/7WPZCY7YOHMQ0vRz/vsVgq/eohG2xXAea9aXzjSWmRDnJSO0FjvzpzJeKG pNvC3iC9GgUPUdh0ge/wjY9HNVZHnjRyviwzo6em+tfsLxcnLqQJ3purFrPGM757Z4IsXA 2nmxgu2Zr0i+ZEDbZAA1U2q3qLRA1sk= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 8d11adb5 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 19 Oct 2022 20:35:20 +0000 (UTC) Date: Wed, 19 Oct 2022 14:35:15 -0600 From: "Jason A. Donenfeld" To: Linus Torvalds 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 Subject: Re: [PATCH] kbuild: treat char as always signed Message-ID: References: <20221019162648.3557490-1-Jason@zx2c4.com> <20221019165455.GL25951@gate.crashing.org> <20221019174345.GM25951@gate.crashing.org> <202210191209.919149F4@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org On Wed, Oct 19, 2022 at 12:30:59PM -0700, Linus Torvalds wrote: > The crypto code uses 'unsigned char *' a lot - which makes a lot of > sense, since the crypto code really does work basically with a "byte > array", and 'unsigned char *' tends to really be a good way to do > that. I wish folks would use `u8 *` when they mean "byte array". Maybe the attitude should just be -- use u8 for bytes, s8 for signed bytes, and char for characters/strings. Declare any use of char for something non-stringy forbidden, and call it a day. Yes, obviously u8 and s8 are just typedefs, but they're a lot more explicit of intent. Jason