Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8788701rwi; Tue, 25 Oct 2022 10:48:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5yJ8f0HM44oTu5okk/Gig7dBQ9/kbZ84g0T3GTD5Bom7VZqr5907BpYWP0NybXXvTJIfzY X-Received: by 2002:a63:d008:0:b0:46e:c359:7fa2 with SMTP id z8-20020a63d008000000b0046ec3597fa2mr19201309pgf.285.1666720094708; Tue, 25 Oct 2022 10:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666720094; cv=none; d=google.com; s=arc-20160816; b=d+sI2E8Pc06tQ8vdN4fSpnBuFLfNrCsfOKq2kb3TW92zW/U9YrACoe8PbJ0iMEKpuD afw4UfhXBta213AsWhZsa4TbzHKmra5llNwB+bRFRlW8KcTKo5nFkhcfA50i8/wx7mtk wffVmlW1B/ZIHHIoqdq+UMzQQ9pzCur07aTYB/X6O7JLamvL9Gzm+magNIk2Dg+VPvYf cKFfb1keZxwIrMRs7nhxjgyJ+u/NnAzQ7JYcsTT7C6n+6sRWk7d1n42gfF7QkhN3vM9X Svlt3hhtV1OvZWSuJ5WZsTUNw4S/8HGLb9GpGznmfJ4SNPOvIE0g9RC2b2BtFiXBgGO9 NVWw== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GCt/+KB0iwEr2A71lO58MOcwBnyEtvXPreo3s9yKZMk=; b=bP7hnmd1ZxBjvb0Iy21U6e6VajGAgouAI6N5eWaX4/GknMRtFySv71YYccBpVjdsWg Y7oIQCifYx+5i//dVPpnaeNPPHfBpagNmvIno9FKMeF7f8SouuCJzGIayPCApwnwEiZx FCs/yCB9JLTud9fKZnKQKZeP8DYlXajXq/pK4PopvjcujKYhg8gFYBUQ72AEy3wrtXM5 O6x2BeWXaCKaZz1Se8BDob9V7JqrgFZKiuGHZeKavkpdSlWRtd4s80na5i50HEKJVle3 n3mwGaaFyPAqIFiR4Mv7oIJ7pLeqUnXp1kgZYYQOF/iqfv55rcH3wOsLtPTBTwy03B7l My9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="l/+qixbZ"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nl12-20020a17090b384c00b002131d14d06dsi4480694pjb.159.2022.10.25.10.48.03; Tue, 25 Oct 2022 10:48:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@linuxfoundation.org header.s=korg header.b="l/+qixbZ"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231917AbiJYRl7 (ORCPT + 65 others); Tue, 25 Oct 2022 13:41:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231357AbiJYRl7 (ORCPT ); Tue, 25 Oct 2022 13:41:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BAAD17C155; Tue, 25 Oct 2022 10:41:57 -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 CC87661A6A; Tue, 25 Oct 2022 17:41:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0DF4C433C1; Tue, 25 Oct 2022 17:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666719716; bh=gv9PwVUyWgrXj7zQoxaQauZIPiBzecYujC3cS68ufB0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=l/+qixbZDZyHwATVQTlsAc+xvt4Ztq9XuVb8icE2DTH4DmXvht/Va8MftTTbmRtyo wxz7zc7ohfcwpDCCXABy26oXFN6kTdQbNomJTPGludml4ABp7mmJtytcPNCIkxCsh3 pzgDXtAVRP4VWUIcQNXFPALK/LHIjY2kxljoiQNA= Date: Tue, 25 Oct 2022 19:41:53 +0200 From: Greg KH To: Philipp Hortmann Cc: "Jason A. Donenfeld" , linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, dan.carpenter@oracle.com, kvalo@kernel.org, linux-wireless@vger.kernel.org Subject: Re: [PATCH v2] staging: rtl8192e: remove bogus ssid character sign test Message-ID: References: <20221025122150.583617-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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-wireless@vger.kernel.org On Tue, Oct 25, 2022 at 07:35:08PM +0200, Philipp Hortmann wrote: > On 10/25/22 14:21, Jason A. Donenfeld wrote: > > This error triggers on some architectures with unsigned `char` types: > > > > drivers/staging/rtl8192e/rtllib_softmac_wx.c:459 rtllib_wx_set_essid() warn: impossible condition '(extra[i] < 0) => (0-255 < 0)' > > > > But actually, the entire test is bogus, as ssids don't have any sign > > validity rules like that. So just remove this check look all together. > > > > Cc: Greg Kroah-Hartman > > Cc: linux-staging@lists.linux.dev > > Signed-off-by: Jason A. Donenfeld > > --- > > Changes v1->v2: > > - Remove ssid sign test entirely rather than casting to `s8 *`. > > > > drivers/staging/rtl8192e/rtllib_softmac_wx.c | 9 +-------- > > 1 file changed, 1 insertion(+), 8 deletions(-) > > > > diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c > > index f9589c5b62ba..1e5ad3b476ef 100644 > > --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c > > +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c > > @@ -439,7 +439,7 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee, > > union iwreq_data *wrqu, char *extra) > > { > > - int ret = 0, len, i; > > + int ret = 0, len; > > short proto_started; > > unsigned long flags; > > @@ -455,13 +455,6 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee, > > goto out; > > } > > - for (i = 0; i < len; i++) { > > - if (extra[i] < 0) { > > - ret = -1; > > - goto out; > > - } > > - } > > - > > if (proto_started) > > rtllib_stop_protocol(ieee, true); > > This patch cannot be applied on: > [PATCH] staging: rtl8192e: use explicitly signed char > On 10/24/22 18:30, Jason A. Donenfeld > As line 456 was changed. This now in my staging-linus branch, so perhaps you applied it to the wrong one. thanks, greg k-h