Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3498878pxb; Mon, 4 Apr 2022 18:56:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRudplYI7Ksg8ZWEWC0ggP6g+/nO3BARkfLaAsoiPzAOMwMXRBkZriRjgoGmudPbaM4k7F X-Received: by 2002:a17:90b:1c8b:b0:1ca:1ff6:607b with SMTP id oo11-20020a17090b1c8b00b001ca1ff6607bmr1341485pjb.244.1649123791307; Mon, 04 Apr 2022 18:56:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649123791; cv=none; d=google.com; s=arc-20160816; b=VN0Ts/aZVixydxhsbpxAXc0xkFoxP/AOI1tFh9SXB0cyVaP0y4582aZb3EOoTZHqt7 PFMjZnHoFmT6GuKtSX/OpTl6uyK3doF4kq1B9vTY+nltvXha3QTcAhqIpyVhblCCdzt0 bSKUZhmpzphElCi10Q9a1790iEvdF86qIB6RxwrchhiJ2tEmVVmBL0gtbTZm+jC2aShA nZBLzfjqFTOJZEIDH2Hlw8TfLvbrP8EwzWFhDrcEDKwTXgCli0XsprfPXecf5+avLzTv QXm5mpI5QyAwbENNfnNG2kB/yNl5hHXf/emEd0zf9JtMHcBQgKNMsSnjHdsoC+JhTytj eLww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=1JgldMjDiu5zvK43QVM+MblMzFJyCLm6wag4GS38NI8=; b=0hnS6vy/+zQjm0mNaHvFPob5wRegVLZm1saTHn0BtDLxhJUB73yXlVo35kxoGnWj2J f6iexoWxEoAPKuZIN0PEfIcaYAn1bxS7cjLsEqtLXiuShvE0XGNrEVAtqCvcw5Gx95Rl j3fZ2CJLdSMalt/P0vo4sZxtZFHOKPhN6vNyl5sqg7lkKK9QmYN39qP87Yjcie8zpMC0 078IaOfWUx0vMvE1q1T5a3JAbWx9kHhySe4a1/2VbdMU/mmH9aNwi+QjPq3ihyNPbVEq 0sr7x1PFBbpRdPLQPweCTNcHyyx/sOw+0a06xcIfG7TkLC7meNwJNf1XLjOnX77qsiyX pXKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ga3t17CY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id lw6-20020a17090b180600b001bd14e01fb8si640594pjb.166.2022.04.04.18.56.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 18:56:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ga3t17CY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EA68738FEC0; Mon, 4 Apr 2022 18:01:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234539AbiDDIEZ (ORCPT + 99 others); Mon, 4 Apr 2022 04:04:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377882AbiDDIEQ (ORCPT ); Mon, 4 Apr 2022 04:04:16 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F5B23B3D6 for ; Mon, 4 Apr 2022 01:02:20 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id g20so10011219edw.6 for ; Mon, 04 Apr 2022 01:02:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=1JgldMjDiu5zvK43QVM+MblMzFJyCLm6wag4GS38NI8=; b=ga3t17CYfB+KE5TsU35ymU7gxz3it957Oe4YUouw/nV0JQpApURccq9lNMFMZlgmex jCH1hxwg5j0DpUWw2a1DWbHQB4XgKTwrjQLTEiZi2wOOW6MxKBUVYR1hDcbLYo1rlNlA VVcEn6ELp11wq8wEBmvX58dV37HR66tsvubuyNwohvs0eIJr2lMksepdj7hQ45NQXcPh TkSJ1HyTe1fD15uHj35aLRr/2cKRM00z4bBP89rwISORGPjxUqwJSivRjVDrtgKQ+smB khIsYorPHxcGCaV0PH/16q+MJeOcAG+AcxMlNGiKD/8fnyBLsO1VkADj1b9Z0B3XcgGU +Q6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=1JgldMjDiu5zvK43QVM+MblMzFJyCLm6wag4GS38NI8=; b=fSp9NTFBnyirMbAWMbVyDfWc44RgRbjk39X84m41Y/Xt/zrxRDYSubHzZG0kIWFKKd n9Vk548EFnIAHkG70VgFu/nZ7t7irWmsixODAf6asbi+rA06T90EYwmYC/GSYPoLGxDX 93K7gqMuRcYsXw9vhcdGsffGOeaWTjLbh7I1qDv0RooLicrNC5guYiJ7+Q1sRuk9CKNn rlXSJ7aus/vX8vf7m/vVg9BWnxi0iiNpfF50RBhxzoXkhuZZPtwve9y1EftvaaJGrHQ5 v1c6xvKnPDYMJQl/9vHcaLY6UEobzgcavMrmfxauEz1L6H9vGQ7gMwABCM1GdMTfL0kj KONg== X-Gm-Message-State: AOAM532Op6ie3eHBgGBCTscGFg0FEQK1PdfjE6FVsk9dS8YL3fdl7I8X 3td2N3LaYQ1iaG+WIGQLR7c= X-Received: by 2002:a05:6402:4247:b0:419:3990:3db6 with SMTP id g7-20020a056402424700b0041939903db6mr31362069edb.193.1649059338902; Mon, 04 Apr 2022 01:02:18 -0700 (PDT) Received: from [192.168.0.253] (ip5f5abb55.dynamic.kabel-deutschland.de. [95.90.187.85]) by smtp.gmail.com with ESMTPSA id jt8-20020a170906ca0800b006df9b29eaf1sm4039632ejb.8.2022.04.04.01.02.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Apr 2022 01:02:18 -0700 (PDT) Message-ID: Date: Mon, 4 Apr 2022 10:02:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH V2] Fix unsafe memory access by memcmp Content-Language: en-US To: Charlie Sands , gregkh@linuxfoundation.org Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com References: From: Michael Straube In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 4/4/22 04:52, Charlie Sands wrote: > This patch fixes sparse warnings about the memcmp function unsafely > accessing userspace memory without first copying it to kernel space. > > Signed-off-by: Charlie Sands > --- > > V2: Fixed checkpatch.pl warning and changed variable name as suggested > by Greg K. H. and improved error checking on the "copy_from_user" function as > suggested by Pavel Skripkin. > > drivers/staging/r8188eu/os_dep/ioctl_linux.c | 21 ++++++++++++-------- > 1 file changed, 13 insertions(+), 8 deletions(-) > Hi Charlie, thanks for your patch. Looks good to me, but you should include staging: r8188eu: in the subject line. "staging: r8188eu: Fix unsafe memory access by memcmp" thanks, Michael