From patchwork Thu Mar 3 22:42:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 8496951 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D40509F2F0 for ; Thu, 3 Mar 2016 22:42:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F07492039D for ; Thu, 3 Mar 2016 22:42:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 77CD12039C for ; Thu, 3 Mar 2016 22:42:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3CEB76EB16; Thu, 3 Mar 2016 22:42:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-f172.google.com (mail-yw0-f172.google.com [209.85.161.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id 59ADC6EB16 for ; Thu, 3 Mar 2016 22:42:51 +0000 (UTC) Received: by mail-yw0-f172.google.com with SMTP id i131so17395893ywc.3 for ; Thu, 03 Mar 2016 14:42:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=euRUxPAfvuIDa2ijFDy57JJZ8Zv49oN+MuhbWiVvD+k=; b=JV7qY4hG8hOG3RUBSsjjrPDnV/K3ucxiZtjg4s6psfyH9ZP6YCG+YJOndFz+1GxaR5 kCpU6Tdq3I0fteBS6swKS0kf9Z0LTG0JWelhjwPm9cvMqLCjXPA5XDAuVOurbuc1a87H W7k3sMzl1wrjUEVObVFcN80O0Z+v+QpEZcLjaQrRtoIBNCRtlkSWRpL6Ej2SMAHOQg+/ /5nDuXlYU/GaJSoC8jQTh2Gkc0pmPX8nOUA5P8VvHbKpCNxfnP5IfRoRSBmycjFdteJW J7wGOnf+YiXStBFqTKh5OJVbxev908K4YFshzIxpozifnU6ZSmJClTYe5yr8DaIAHpfo fBzw== X-Gm-Message-State: AD7BkJLviPD4cveuRomQQSqbwDxB6ahFg7pF+45fnIzVgsXE6tPpKb3jmrvC2qwHqpsqtg== X-Received: by 10.13.252.67 with SMTP id m64mr3269770ywf.67.1457044970399; Thu, 03 Mar 2016 14:42:50 -0800 (PST) Received: from jade.localdomain ([2804:14c:487:41f:6257:18ff:feab:2e8f]) by smtp.gmail.com with ESMTPSA id a205sm571948ywe.50.2016.03.03.14.42.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Mar 2016 14:42:49 -0800 (PST) From: Gustavo Padovan To: Greg Kroah-Hartman Subject: [PATCH] staging/android: change IOCTLs opcode after ABI change Date: Thu, 3 Mar 2016 19:42:43 -0300 Message-Id: <1457044963-5785-1-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1457034046-27678-5-git-send-email-gustavo@padovan.org> References: <1457034046-27678-5-git-send-email-gustavo@padovan.org> Cc: devel@driverdev.osuosl.org, Daniel Stone , Daniel Vetter , Riley Andrews , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Gustavo Padovan , John Harrison X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Gustavo Padovan Burn the old opcode to avoid any potential old userspace running the old API to get weird errors. Changing the opcodes will make them fail right away. This is just a precaution, there no upstream users of these interfaces yet and the only user is Android, but we don't expect anyone trying to run android userspace and all it dependencies on top of upstream kernels. Moreover Android should be converted to use upstream sync_files. Suggested-by: Rob Clark Signed-off-by: Gustavo Padovan Acked-by: Greg Hackmann --- drivers/staging/android/uapi/sync.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h index 859977c..fbadb8a 100644 --- a/drivers/staging/android/uapi/sync.h +++ b/drivers/staging/android/uapi/sync.h @@ -69,13 +69,20 @@ struct sync_file_info { #define SYNC_IOC_MAGIC '>' /** + * Opcodes 0, 1 and 2 were burned during a API change to avoid users of the + * old API to get weird errors when trying to handling sync_files. The API + * change happened during the de-stage of the Sync Framework when there was + * no upstream users available. + */ + +/** * DOC: SYNC_IOC_MERGE - merge two fences * * Takes a struct sync_merge_data. Creates a new fence containing copies of * the sync_pts in both the calling fd and sync_merge_data.fd2. Returns the * new fence's fd in sync_merge_data.fence */ -#define SYNC_IOC_MERGE _IOWR(SYNC_IOC_MAGIC, 1, struct sync_merge_data) +#define SYNC_IOC_MERGE _IOWR(SYNC_IOC_MAGIC, 3, struct sync_merge_data) /** * DOC: SYNC_IOC_FENCE_INFO - get detailed information on a fence @@ -88,6 +95,6 @@ struct sync_file_info { * pt_info is a buffer containing sync_pt_infos for every sync_pt in the fence. * To iterate over the sync_pt_infos, use the sync_pt_info.len field. */ -#define SYNC_IOC_FILE_INFO _IOWR(SYNC_IOC_MAGIC, 2, struct sync_file_info) +#define SYNC_IOC_FILE_INFO _IOWR(SYNC_IOC_MAGIC, 4, struct sync_file_info) #endif /* _UAPI_LINUX_SYNC_H */