Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3770227imu; Fri, 30 Nov 2018 05:52:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vq/OEx7LXHwq7xbzsVCcqQoZiIXF4ODLRsjNa1RCmVHJL5Z5JDwdX+OrqMaELzOBX2fEIb X-Received: by 2002:a62:13c3:: with SMTP id 64mr5649165pft.93.1543585966141; Fri, 30 Nov 2018 05:52:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543585966; cv=none; d=google.com; s=arc-20160816; b=HZQC4CoQvodMnT23IItiXeAZypttYNkPJcS9r7BFQP7slFIMXlVWBanTyOA+2Veeig k6ClS0JZeJjHYbBm6ucGQQJHsn2AN7jlkCe+1yIWEHD/vKWxyS3ErlOhMqig9I6MQ7nB vJZeytftzzMdMejKkHMif2t03luGbELs4iLovjPsSRjNVowuBi9aqWb1akKVszsYzNJt DoRjPcuj3pmlEadIrECWT5GX/a9Ktv1ZNxIqHiOE7YZEJw3TwUptVicnI/xjaKMols9B QgC9WsRUyxfDECw4N5zFzmtbnWIeyzjY/8XdSO/f9g2DXqEiawKK9HJubZKwf1kijMbt A/OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=n3sAUM3ZXV+uBWTxeruxfPgRuVdikWgC6Q4vCJn4PRo=; b=DZYjmajggu0kG1F0XA59GkpVyXHTPQPjxg9kgq2Qi29nS7stPnvS8VLcmw/+qWZM88 Wu+/xRHT1V3C/wFxNDt2+9QvlRujbKHzlnw1SK5ZMh/dGJHH29VgAIMn5wVx2T7QODbX NcynRKuM13XpHquG3cEIZU/pCFCR03E+dfli0EMRQYhveJ7DsiERnsFta7WIxlMB1zwl DIq4j6bguZmEkhmidHiAPWGXspWKiJOHwsamddpLwGyfGjkYeGwGx1hgsx5aO3cjIWZn 9saH9issHne0NErKN/xF9oPqj7m/oi+Wtt1Vx7KoUj/XPq0Wau8TGN2gpqVZZ7TNhihX IqYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dX215uVV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a190si4916564pgc.423.2018.11.30.05.52.31; Fri, 30 Nov 2018 05:52:46 -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; dkim=pass header.i=@linaro.org header.s=google header.b=dX215uVV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726852AbeLAA75 (ORCPT + 99 others); Fri, 30 Nov 2018 19:59:57 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:35277 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726409AbeLAA75 (ORCPT ); Fri, 30 Nov 2018 19:59:57 -0500 Received: by mail-wm1-f66.google.com with SMTP id c126so5781140wmh.0 for ; Fri, 30 Nov 2018 05:50:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=n3sAUM3ZXV+uBWTxeruxfPgRuVdikWgC6Q4vCJn4PRo=; b=dX215uVVo95HfXo38o+feJyGt2oLNkuQttt1mIMF5/AB14OGVdHOJM9qBP6MQmMagn rUbLF7ybQDUukO0B/rmqwauXjDUnEll2hZVAJggCQ0QNOuyrV1NIHr608bv3Jnt8X1Zs CG3HC1/oXQAiLUJ2hlECAIbHQAy3IPecsdroU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=n3sAUM3ZXV+uBWTxeruxfPgRuVdikWgC6Q4vCJn4PRo=; b=tewCpPSA6wNP0aDGUL2fgUm9sbS8IU+8LgD2CGcRIWNDQduNBr9y69wX+VXF/JZu8+ UzleWrqw20TUfRPTMr45UdCThngx/Tl+tmUp3wADc/WtZxlaABu0orWW8JEVkJmUSxcG 3NpiIRZMgu0KybZslhsqdzD2CmrjM+svXkzF0M1iRfRiWNwc2M+807fD6QJcOpjxXfyW zFHX5/ItsS3WBpS6Ep6qjhOwwf/U/dhx5/EBQEOBQxU7sLDdBIg8ZqkccJeUlyC4ykdm 8Qlr5UpAlhd4bpJ6Yk/NG8FGyCcrcYmPEnaUVXfJ1v/+IwQos2cnoQ5ChvBegaR2tzHG JuGw== X-Gm-Message-State: AA+aEWbesiauVrN0X4bMPaHPCOfn35vyeU+OlK+6WWxAlQLnH0gQNav/ DE5PT6psdRPUTgakXhaF9ZS2fA== X-Received: by 2002:a1c:dc86:: with SMTP id t128mr5946208wmg.42.1543585833712; Fri, 30 Nov 2018 05:50:33 -0800 (PST) Received: from ?IPv6:2a01:e35:8a7e:4790:488f:ca49:e154:1ce0? ([2a01:e35:8a7e:4790:488f:ca49:e154:1ce0]) by smtp.gmail.com with ESMTPSA id j8sm6619557wmd.0.2018.11.30.05.50.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 05:50:33 -0800 (PST) Subject: Re: [RFC PATCH 6/6] char: fastrpc: Add support for compat ioctls To: Arnd Bergmann 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 References: <20181130104657.14875-1-srinivas.kandagatla@linaro.org> <20181130104657.14875-7-srinivas.kandagatla@linaro.org> <2dbd06c5-d094-6d16-2983-131d3ae24c8d@linaro.org> From: Thierry Escande Message-ID: Date: Fri, 30 Nov 2018 14:50:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/11/2018 14:46, Arnd Bergmann wrote: > 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. As you suggested for the other patches in this series, we will rework these ioctl data structures and then use the same function. Regards, Thierry