From patchwork Sun Feb 21 21:36:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 8369431 Return-Path: X-Original-To: patchwork-linux-media@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 6911A9F314 for ; Sun, 21 Feb 2016 21:36:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8CC12203C4 for ; Sun, 21 Feb 2016 21:36:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 678A820396 for ; Sun, 21 Feb 2016 21:36:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751820AbcBUVgU (ORCPT ); Sun, 21 Feb 2016 16:36:20 -0500 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:55518 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750708AbcBUVgU (ORCPT ); Sun, 21 Feb 2016 16:36:20 -0500 Received: from lanttu.localdomain (unknown [192.168.15.166]) by hillosipuli.retiisi.org.uk (Postfix) with ESMTP id 20C9F600A0; Sun, 21 Feb 2016 23:36:17 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: mchehab@osg.samsung.com, hverkuil@xs4all.nl, shuahkh@osg.samsung.com, laurent.pinchart@ideasonboard.com, Sakari Ailus Subject: [RFC 1/4] media: Sanitise the reserved fields of the G_TOPOLOGY IOCTL arguments Date: Sun, 21 Feb 2016 23:36:12 +0200 Message-Id: <1456090575-28354-2-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456090575-28354-1-git-send-email-sakari.ailus@linux.intel.com> References: <1456090575-28354-1-git-send-email-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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: Sakari Ailus Align them up to a power of two. Signed-off-by: Sakari Ailus --- include/uapi/linux/media.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h index 6aac2f0..008d077 100644 --- a/include/uapi/linux/media.h +++ b/include/uapi/linux/media.h @@ -302,7 +302,7 @@ struct media_v2_entity { __u32 id; char name[64]; /* FIXME: move to a property? (RFC says so) */ __u32 function; /* Main function of the entity */ - __u16 reserved[12]; + __u32 reserved[14]; }; /* Should match the specific fields at media_intf_devnode */ @@ -315,7 +315,7 @@ struct media_v2_interface { __u32 id; __u32 intf_type; __u32 flags; - __u32 reserved[9]; + __u32 reserved[13]; union { struct media_v2_intf_devnode devnode; @@ -327,7 +327,7 @@ struct media_v2_pad { __u32 id; __u32 entity_id; __u32 flags; - __u16 reserved[9]; + __u32 reserved[5]; }; struct media_v2_link { @@ -335,7 +335,7 @@ struct media_v2_link { __u32 source_id; __u32 sink_id; __u32 flags; - __u32 reserved[5]; + __u32 reserved[4]; }; struct media_v2_topology {