Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3829401pxj; Mon, 21 Jun 2021 07:31:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDVa6jbQXw3KVKEP4AYWLeghqH7CiPdEyumZ2gtJm9CGS/oe4kuxTOFMzA3qiQw4VcZQJ3 X-Received: by 2002:a50:d943:: with SMTP id u3mr22496577edj.175.1624285871915; Mon, 21 Jun 2021 07:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624285871; cv=none; d=google.com; s=arc-20160816; b=CFdcnaNZ5MM7RIyQ9ehJdbIp6qYaQPlCv8UMChMr39TbS6qPYNK3dw1es+uNEDIg6/ 76u4CywbglFsRre4rLlJj1+VThOvr4ZBokkKWGE/ynUKRB9HJHwCBokSBT9Jhomd9p23 IHczH5gBgmBI3AVCcaKVQXwAIXY5RoOo/n+DurWOZnyYVmOb6x2NhZVuhTAMKhDGCN7Y WT9vXxky6tgwlvnSntsDNzr8P4EIvIXWNymA4SOgtHHESNFgAfMBbP3oMc8eTTtAJ/0t w47dBN+rmdve1bU5/csXGCgLswRxulkE6Uo6d4LzeMCeDTqn3CPvE/gKMm3cYusx7u/K TeqQ== 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=HRj6jgpuI+cB6PDpqLiq6EiwF1c8kXiEkJQw6hQEm+I=; b=KRpJ3AVPjJHzBzc3NPH63t6aAhi4DIvNOFDL3vjRP0+1598F2di2E9igMnac8URtyA mJf9t1zoYWeV5Hd0xkZ8GSVynzYnVRNcVd5Z44rJGV/eIrCA6tW0QPhctxYz+pIUiWu1 jn7qORxH3zt6stdFXCrTt8lohNRiLAEaIb+CyojoI0Rd8T08yGiuCKDKnfJXad3Fonn+ 5dDmeKfouEmWW7L+VesVUyEKbtLVrOvguwESVT5DOGfz4F0sYYUStnxehcECBFw15Kg0 NkiXIxgNE1HQeID3YWgS2i98TepHQF1kbvKlwIeAjyWayfN0UgTRR536vAlf0+hdW9ZB 9SVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mTZ7WQlw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de6si11177968ejc.483.2021.06.21.07.30.49; Mon, 21 Jun 2021 07:31:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mTZ7WQlw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229790AbhFUOa5 (ORCPT + 99 others); Mon, 21 Jun 2021 10:30:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbhFUOa4 (ORCPT ); Mon, 21 Jun 2021 10:30:56 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4154C061574 for ; Mon, 21 Jun 2021 07:28:40 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id e22so8127412pgv.10 for ; Mon, 21 Jun 2021 07:28:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=HRj6jgpuI+cB6PDpqLiq6EiwF1c8kXiEkJQw6hQEm+I=; b=mTZ7WQlwbzQk4gLECW7X3QARCyfrBR8joUnqTeTEIY7DXMFL1wvwZeLRm/dXLg3dAq elpj5NsV88/ynmX9WeRqZZVIBlJbhMbehCVsrE2uxm7vyaBQdzK+qo2MSYM+DKUOZKNB 2sW9Ucnr21Nk76Tc6UFhLVds9CasDcCUoJzHoPusKuRFQYYtHqlym6SJ5CblH9oMjnDC cuAHoIes0Ixjj3l6F7E4bqu4vpoGYvX2Fwk77s4IdHuiHUDp11Uyr9eF4wwAoEWRtxcA y45vECWxVDe9uIfyCWnK0gL7+HMNrFt7tfO2k/u5hMAyYSa9vP6kugG4fhSA2J7aK67+ sGXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=HRj6jgpuI+cB6PDpqLiq6EiwF1c8kXiEkJQw6hQEm+I=; b=I0/va5mXD0BV8l+QBrM1E2Z39tCM3qtUf8TG6Ede8TA/SbZmItB1cgMvzyvf9i8Zz4 bw1keAUtGQH3qF8HWTNpt2u6lRDEbD56GlEbCpSMVgXeNmZ+haOG7OokzKSrkKgOvMdD awr85TnFS55+Rvbh2jBiy453xEQV3RlI9jdRGto6WXArUGsE//1h43XxDN828WZd6g71 avlJZzkvL7KLtDvah/LdBml8KUNnPF17ObquYzsObYM/n4EiCBzYqILomAUdyaT6RuLG 0ODctuw3V5b8luY1WXC6os580hInrsOEyAjxQnBVwvIvcTAJ7IjWVbYWKbkzpeZHGiou pjQg== X-Gm-Message-State: AOAM532a744x4Cc5asgNHyw66DogVrqvGkgvgqs84COFPfqTUX9eJaAb 8VshtJY5leLgVmj414ZCQ7w= X-Received: by 2002:a63:c1e:: with SMTP id b30mr24435102pgl.118.1624285720505; Mon, 21 Jun 2021 07:28:40 -0700 (PDT) Received: from ojas ([122.177.154.120]) by smtp.gmail.com with ESMTPSA id 10sm13203713pfh.174.2021.06.21.07.28.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 07:28:40 -0700 (PDT) Date: Mon, 21 Jun 2021 19:58:33 +0530 From: Ojaswin Mujoo To: Dan Carpenter Cc: nsaenz@kernel.org, gregkh@linuxfoundation.org, stefan.wahren@i2se.com, arnd@arndb.de, phil@raspberrypi.com, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/5] staging: vchiq: Move vchiq char driver to its own file Message-ID: <20210621142833.GB186979@ojas> References: <8cd9b5899f82eaf2efdc9caa8d07f719a592a94d.1624185152.git.ojaswin98@gmail.com> <20210621095631.GF1901@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210621095631.GF1901@kadam> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 21, 2021 at 12:56:31PM +0300, Dan Carpenter wrote: > On Sun, Jun 20, 2021 at 06:26:34PM +0530, Ojaswin Mujoo wrote: > > +/* read a user pointer value from an array pointers in user space */ > > +static inline int vchiq_get_user_ptr(void __user **buf, void __user *ubuf, int index) > > +{ > > + int ret; > > + > > + if (in_compat_syscall()) { > > + compat_uptr_t ptr32; > > + > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > When I'm reviewing these sorts of patches then what I'm trying to verify > is that you are not a UMN "researcher" trying to change the code without > anyone noticing. In the orignal code, there was no blank line here > > > + compat_uptr_t __user *uptr = ubuf; > > but there was a blank line here. > > > + ret = get_user(ptr32, uptr + index); > > + *buf = compat_ptr(ptr32); > > + } else { > > These sorts of minor white space changes make it hard to verify the code > in an automated way. > Ohh I see, I get the point. I'm not sure how this creeped in here. Especially with this patch, the git diff looks very ugly and confusing to me. I'm not sure if that is because I unknownigly introduced some whitespace changes or if thats normal when shifting a lof of code around. Anyways, I'll fix this in the next revision. PS: I was unable to get mainline kernel working on my Pi and instead submitted this patch which is built against the raspberry downstream kernel. I now know this definitely not the right thing to do and am trying to recreate this patchset with mainline. Hopefully I'll be able to iron out all such anomalies in the next revision > > + uintptr_t ptr, __user *uptr = ubuf; > > + > > + ret = get_user(ptr, uptr + index); > > + *buf = (void __user *)ptr; > > + } > > + > > + return ret; > > +} > > + > > regards, > dan carpenter > Thank you for the help! Ojaswin