Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3765569imu; Fri, 30 Nov 2018 05:47:49 -0800 (PST) X-Google-Smtp-Source: AFSGD/UZNn+BN1a/DXL4dM1BESfKSi7RkME9wHCxFBNHOLbEqY+4NBXAj/W9TrCyC3PBgCtFHbId X-Received: by 2002:a63:d604:: with SMTP id q4mr4855512pgg.175.1543585669690; Fri, 30 Nov 2018 05:47:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543585669; cv=none; d=google.com; s=arc-20160816; b=IapNvC+pM8w2FPqgWnYU/h3d0PgdXAtWLRxKp6R5PfQzcdZgbg/wAfcng+SkWasI7b hBtKHzEz2g7SXNc1AkD/R5eOk+D3RtvBHjPlkII03ZFJcHbCxjMamXM8hjHYj/IuE2vC 6yVY2GmLseWCTtvLcvevcPFo8MfW86RXxUghaXgHICSb4Dg9EkGeTgv4P+ChnTccMKRe Ve8c2/7Zug/7Mca5GFYnfJf5o3eMh2c1FLwMlPiltDQapqGTO2f00PRYO+pu0ERcougQ tnD/Dlo/p4piBjmMKfhmxpIgoG/e2ZvZiKq1eMq75ZOCHjKAFpe0yevSyWEaHiw02Bo/ NCpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=tIdeg+oMgzcGZ402w5TMrHUL5oRSMJL2//KB9mDZoes=; b=MhM76dp8UOSdqzp0WJk68x8CJ0synLEzSL1XjUTVc5zt/iEvt3AE9zzLwKKDWL5Dj5 XwOOKpeluo8ATJycPyeCD2N7LYzsbByodXF8OZA9tAL3k1acN5S2/CfmUvCZeVR45NxF N/7QrIRoQYi48MjqIX6mJTyNahjLlnvA9mMWbyLnAeDCw9RLs6AFhDH3mVdD5jI3msA0 mHVWFLHyuOzHMNXK/WcqPJ0vhWnbapoSXNNsh50d5QuRxo2+5/eYSW0/RSrDUiuiWgKy D0h+lwwq0DgNoOCcLc4hcKi76ex+wBnj0ZvsU+Wg4nKOnSCuJ/YmL/zGaZfND6NKretZ 3Gww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y12si5216402plk.174.2018.11.30.05.47.34; Fri, 30 Nov 2018 05:47:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726909AbeLAA4I (ORCPT + 99 others); Fri, 30 Nov 2018 19:56:08 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:33241 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726398AbeLAA4H (ORCPT ); Fri, 30 Nov 2018 19:56:07 -0500 Received: by mail-qt1-f195.google.com with SMTP id l11so5945542qtp.0; Fri, 30 Nov 2018 05:46:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tIdeg+oMgzcGZ402w5TMrHUL5oRSMJL2//KB9mDZoes=; b=tSLMT9SHz9EpAOplIg06FIbcVbkLtQCOE0jhrj1tE5hP7FYDKg64n5egPFgTXgS1Xd OxVAZ7enRPlAKK1n1h40eW8kQ0JsTKV62tLRW69p/CAeR7CABP+xr2XV7krKmsaHGkSZ /okHL8yGH5B93yYFXtk1+bdOGDzxs2ATAfllz56qBlWqJ1E5jthINdTsie31VzncPYRb yOeXz5bowo9wbZEYlKFaj1IBgXC/PmnAHFxJLSh1LMAp8Z55nYiPt2oGJiWUIh2bRTs3 MQ6/PjXlescvcAV/411QC38idJhHcx707wybg68vVoWESccNl+RLKcDDHI3NJDFsJFiu 8T/Q== X-Gm-Message-State: AA+aEWYtMUMGqTjKSDdiis3k91DWKKcMftbet4lRUhS0JNyKC28tyeWM gHv3Ax/a1siPOx/9YBq5MswH/Z7qB/FvWbzC9ts= X-Received: by 2002:ac8:1d12:: with SMTP id d18mr5413334qtl.343.1543585605559; Fri, 30 Nov 2018 05:46:45 -0800 (PST) MIME-Version: 1.0 References: <20181130104657.14875-1-srinivas.kandagatla@linaro.org> <20181130104657.14875-7-srinivas.kandagatla@linaro.org> <2dbd06c5-d094-6d16-2983-131d3ae24c8d@linaro.org> In-Reply-To: <2dbd06c5-d094-6d16-2983-131d3ae24c8d@linaro.org> From: Arnd Bergmann Date: Fri, 30 Nov 2018 14:46:27 +0100 Message-ID: Subject: Re: [RFC PATCH 6/6] char: fastrpc: Add support for compat ioctls To: thierry.escande@linaro.org Cc: Srinivas Kandagatla , Rob Herring , gregkh , Mark Rutland , DTML , Linux Kernel Mailing List , Bjorn Andersson , linux-arm-msm@vger.kernel.org, bkumar@qti.qualcomm.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 30, 2018 at 2:20 PM Thierry Escande wrote: > On 30/11/2018 13:58, Arnd Bergmann wrote: > > On Fri, Nov 30, 2018 at 11:48 AM Srinivas Kandagatla > > wrote: > >> > >> From: Thierry Escande > >> > >> This patch adds support for compat ioctl from 32 bits userland to > >> Qualcomm fastrpc driver. > >> > >> Supported ioctls in this change are INIT, INVOKE, and ALLOC/FREE_DMA. > >> > >> Most of the work is derived from various downstream Qualcomm kernels. > >> Credits to various Qualcomm authors who have contributed to this code. > >> Specially Tharun Kumar Merugu > >> > >> Signed-off-by: Thierry Escande > >> Signed-off-by: Srinivas Kandagatla > > > > Can't you just define the native ioctls so that you don't need this. > > There are long time defined structures that are passed as argument to > these ioctls and their sizes vary between 32 and 64 bits userlands, so > the ioctl command values. Where? I don't see them in linux-4.19. > Unless I'm missing something here this also has the advantage not to be > compiled if CONFIG_COMPAT is not set. You can normally just set .compat_ioctl() to the same function as .unlocked_ioctl(), and get no overhead either way. Arnd