Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7263100rwi; Mon, 24 Oct 2022 12:03:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5fE0ZZAocvusM8PsW+9VLUz4cSPy/1N6U7yPQwcgTkZJAmJHuL4/Pd7N8aTj3mwxYhFmHg X-Received: by 2002:a17:902:a9c6:b0:178:b2d4:f8b2 with SMTP id b6-20020a170902a9c600b00178b2d4f8b2mr34611810plr.79.1666638231556; Mon, 24 Oct 2022 12:03:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666638231; cv=none; d=google.com; s=arc-20160816; b=ELq4I0TEoveEmbCVPrKntvQFJ1XgnACeKe05ryD+vnk4zHK5ZfSo0niffYm9DRcuzh GDU2NXZ83LUxcGpsH4qmSllYVWiyg2FrLSjBkOV5QgXfl6QhUBWDcTX6uBZ8ZZBtVe1W 8JCUMnP5sqUNmIxxjVJaHMpusuZbD1LlOKAiRxd9BRSNFObVz2z3MUosGlgWW31ckNdQ 98TzUHs7IUfqBNS7vb6HXbtMUtQhNmuLprOdremQka2EBd9r6tPkGvn+bFmCz5mXlFsc B5yLSaw5PTT1Zc6sxLXE73aJgoZas8nW4i3l8QUc0AH0PCNHRU4JCzikrAPW29TRwtj/ 79cA== 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=0joR9m5MfF36iKnJOfK3TU4JQ6XnOTGKpE1xroKpqN0=; b=Or9CY/1lTvQmvVy1VwnB+udkldMdyrhw/1iOvCKN4epK5QZqQ7qUChF2vWuY8+J4SF Ic8Z4xz6SeMEsaje5sOcTkg9Yds47E9RSrbuU2jCN5nRAVCWrnos//NxbJScjH1U19I/ lG4Gb1cN7Iva9XrXFJ08Pu31pZ7UAuwouSCEFE5xHxJwUdbfw29J4oGH+6ejas1aJo+y fCeXBeGmc47mMfkYdVqciF5Efw+agM8jAfbaNzKbVcHmIkT+zMGPO70P759qu+OrVnEy 5KflCKMU7k2TnFgnjNCpN7+Y6j+dcFUI4JtXyRpg+749rTKAnWO6zFUgMyVg/C6U2QTG i+wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=W4OnCup5; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u37-20020a631425000000b0046ec2ad4a97si333902pgl.163.2022.10.24.12.03.38; Mon, 24 Oct 2022 12:03:51 -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=@zx2c4.com header.s=20210105 header.b=W4OnCup5; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231862AbiJXSxH (ORCPT + 99 others); Mon, 24 Oct 2022 14:53:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232727AbiJXSwh (ORCPT ); Mon, 24 Oct 2022 14:52:37 -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 CDC20224A90; Mon, 24 Oct 2022 10:34:00 -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 28E5661500; Mon, 24 Oct 2022 17:17:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2964C433B5; Mon, 24 Oct 2022 17:17:43 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="W4OnCup5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1666631860; 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=0joR9m5MfF36iKnJOfK3TU4JQ6XnOTGKpE1xroKpqN0=; b=W4OnCup5gOPU0F9sVbRAhDz1YfbDgcVtsT5zZm8fxkWFH8QlP4LKuTC6ARb/4ATDp8w/1W CCDuos+lBAaTbcSwhdf/q9N8iqY1xl/kWWbeSWwm/vEu50CwFDzYa1ofruMc1cxK9QzNmf t+vcDeOf7nOyQGTvT2VGAme4/SxiP2I= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id a8144f99 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 24 Oct 2022 17:17:39 +0000 (UTC) Received: by mail-vk1-f173.google.com with SMTP id h16so2250291vkn.4; Mon, 24 Oct 2022 10:17:38 -0700 (PDT) X-Gm-Message-State: ACrzQf0qLIXypCUMqGeOiOukf248s+qYN28YnkOm4IFEsYD0QnGvPn0i 3ownY4C99S5qa4SB4MrJ07YjDagFH3QeUSOKPik= X-Received: by 2002:a1f:ecc6:0:b0:3aa:a785:5e2f with SMTP id k189-20020a1fecc6000000b003aaa7855e2fmr18797456vkh.6.1666631857723; Mon, 24 Oct 2022 10:17:37 -0700 (PDT) MIME-Version: 1.0 References: <20221019203034.3795710-1-Jason@zx2c4.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Mon, 24 Oct 2022 19:17:25 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] kbuild: treat char as always unsigned To: Linus Torvalds Cc: Dan Carpenter , 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 , Kalle Valo , linux-wireless , Larry Finger , mikem@ring3k.org, wlanfae@realtek.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Hi Linus, On Mon, Oct 24, 2022 at 7:11 PM Linus Torvalds wrote: > IOW, I don't think these are 6.1 material as some kind of obvious > fixes, at least not without driver author acks. Right, these are posted to the authors and maintainers to look at. Maybe they punt them until 6.2 which would be fine too. > On Mon, Oct 24, 2022 at 9:34 AM Jason A. Donenfeld wrote: > Some of those may need more thought. For example, that first one: > > > https://lore.kernel.org/all/20221024163005.536097-1-Jason@zx2c4.com > > looks just *strange*. As far as I can tell, no other wireless drivers > do any sign checks at all. > > Now, I didn't really look around a lot, but looking at a few other > SIOCSIWESSID users, most don't even seem to treat it as a string at > all, but as just a byte dump (so memcpy() instead of strncpy()) > > As far as I know, there are no actual rules for SSID character sets, > and while using utf-8 or something else might cause interoperability > problems, this driver seems to be just confused. If you want to check > for "printable characters", that check is still wrong. > > So I don't think this is a "assume char is signed" issue. I think this > is a "driver is confused" issue. Yea I had a few versions of this. In one of them, I changed `char *extra` throughout the wireless stack into `s8 *extra` and in another `u8 *extra`, after realizing they're mostly just bags of bits. But that seemed pretty invasive when, indeed, this staging driver is just a little screwy. So perhaps the right fix is to just kill that whole snippet? Kalle - opinions? Jason