From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA966C43603 for ; Thu, 5 Dec 2019 10:27:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BC6B12464F for ; Thu, 5 Dec 2019 10:27:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GuUc0Wc5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729041AbfLEK1T (ORCPT ); Thu, 5 Dec 2019 05:27:19 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36423 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728735AbfLEK1T (ORCPT ); Thu, 5 Dec 2019 05:27:19 -0500 Received: by mail-pf1-f193.google.com with SMTP id b19so1417579pfd.3; Thu, 05 Dec 2019 02:27:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=9Ef/ULU1Kge+LKFh8Fh5zno0Gs8s7Fac2gwZZitwvws=; b=GuUc0Wc5oPylsUhp/ivxIYWhGZFVRu3CxWq0tIaLEh3KLexjIu0YF3inaKgRxemq/o smcUmURO+bnsWrG37RAr2SMr34mupk/9PlGAex674fldyEUUirLHIco1DfPPIyvB8IS7 Lgaq2w4woRVywywkz43F0vt9jCVNtoYs6Jx/Uxp4ksGW5qYtpFGlSa1fq6lL0OiM9VMR ZBYkACskHxGYQlqRwDTBjqTKwXuWMNttuIXCVCpV42BVsC/0q+mo5y6DSvz1ybhWQBku C2zQRCx5AFpWBjbMHX+yode12nEUapPRrCTAsM0PNaGWFPXTSmvvJQDGVzS5tIq4EBnd dZjA== 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:content-transfer-encoding; bh=9Ef/ULU1Kge+LKFh8Fh5zno0Gs8s7Fac2gwZZitwvws=; b=lCp4jGbHVYu6XSx3WJZfVcJA/TvKDFmTW9GDWTNZ6PLgZNaGg4Eth9FPYxUxxemUpi Lqsl1woQlQ0n4+ezW3a8RTkRghvonPQAwKxS9c3dtTaj/sSLB0GhPEgd74ytVcsF5Bd4 IR7SyzVz/NQreVzI5WHGadPf2QzI/NHYYYMTQjn7Bc/D59YzgfT/LQkW7JT6GXl26XFt A6QMTM+ypvv2PW0raziL0y0Y840mxtZcouEN69jSFuetTxy9/Q4g6jQDRaODYyBhyeUN 2k+s4EV1qu2xFMXXqzxBhvImICNGuNcs9oES09vLiZFGz4lyMKYM2fHjP9gvb6i4+9WW aDpQ== X-Gm-Message-State: APjAAAWdhdxQdKGQBoVoGlZ4J/4RjbzbcuBg7qHMyxQtmipe2rQEG9sv vAMRi2GqKOBUWJethJPlOHJjEpuyRsznGdIB3RHeyNh6 X-Google-Smtp-Source: APXvYqxvHJo0ElWDiYwwFrbf1lm4Gp70OeitmtEpDaFZAsEn8ACG2g/DsguKfDXwFnPH/5HOLgQXM+FyqErLXso4fZc= X-Received: by 2002:a63:e14a:: with SMTP id h10mr8394575pgk.74.1575541638530; Thu, 05 Dec 2019 02:27:18 -0800 (PST) MIME-Version: 1.0 References: <20191204155941.17814-1-brgl@bgdev.pl> In-Reply-To: From: Andy Shevchenko Date: Thu, 5 Dec 2019 12:27:08 +0200 Message-ID: Subject: Re: [PATCH v2 10/11] gpiolib: add new ioctl() for monitoring changes in line info To: Bartosz Golaszewski Cc: Bartosz Golaszewski , Kent Gibson , Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Thu, Dec 5, 2019 at 11:42 AM Bartosz Golaszewski wrote: > =C5=9Br., 4 gru 2019 o 23:34 Andy Shevchenko = napisa=C5=82(a): > > On Wed, Dec 4, 2019 at 6:03 PM Bartosz Golaszewski wrot= e: > > > +struct gpioline_info_changed { > > > + __u64 timestamp; > > > + __u32 event_type; > > > + struct gpioline_info info; > > > + __u32 padding[4]; /* for future use */ > > > +}; > > > > Has this been tested against 64-bit kernel / 32-bit userspace case? > > > > No. Since this is a new thing - do you think it's possible to simply > arrange the fields or add padding such that the problem doesn't even > appear in the first place? Yes. this can be done, though be careful about potential endianess issues (the ABI must be tested on BE as well). So, the test cases, I can imagine of, should include (k - kernel, u - user)= : - 64k-64u: LE and BE - 64k-32u: LE and BE - 32k-32u: LE and BE --=20 With Best Regards, Andy Shevchenko