Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1502468ybl; Thu, 5 Dec 2019 02:28:08 -0800 (PST) X-Google-Smtp-Source: APXvYqw58MyUfDCS+M4V6GAhJKShb/WUI2DxIPsPKngGQFiyCk/ZiLAUrPIA7OSyYdJnjzwr06Pk X-Received: by 2002:a05:6808:64d:: with SMTP id z13mr6721400oih.104.1575541688655; Thu, 05 Dec 2019 02:28:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575541688; cv=none; d=google.com; s=arc-20160816; b=vkp0ytkeTstjMa5u7XkaUGrT4+J+spjcWW6Fsb8YJzkdAu82PuOs9S3Dn69U4Pmaj3 vnlu/0kls3ETEyytVo2N25PXJdSAUHZFRC1nRsNNVne5OhxMIS1BrL9FYv0IWwgwEQR1 DztNZq65gUBV4gtud6GTFxv2Tzr3dkgaKVQZrG28aIqr/L1UaOjTlAB11835SjiUFfOT BrdgnewLWsYhoqomQXWsl1Uh4TDWL3YwbDAddHoou6vNf/sDBzvcT6dUD8/JVxnjRjDL qsevzVOSzUpJXKHw5BMXukWXU1dy+8yD/CHIz+nlhGG3lLPFQO59ZG4iotyTvu4uwT2M pjzA== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=9Ef/ULU1Kge+LKFh8Fh5zno0Gs8s7Fac2gwZZitwvws=; b=wiJhD0dVSUYQlaNccfIQUaRD7K90CylaPTC2k51gVrjZME9APof3fotnfyc7xKnbUQ bM3ALFhv8lPqj28lJO7GX+0crp8M7+6goLZIJl3KP2D7MHI+tmHVH+PkdBGN7WgiY0XN 2g1hVVDsFnFGRch0uvyfY2sVVmiqGTxnzkSjj5yYifJv9OgMyazndrQhHrg5S/8TRBkg CpVKHV+NGGWmCg5YcSBaVIzsTwud56p4vW8PVr9rX6RnnngmdKToqsamqBKEM6ltQKtk MDBmCD8YfKLvnb39RwAi0lbhy/zZjLrVkkVum6hUe9RFMyfwjzLj1ewAl8270O+Lfjs8 vf3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GuUc0Wc5; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h4si4742539otk.172.2019.12.05.02.27.55; Thu, 05 Dec 2019 02:28:08 -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=@gmail.com header.s=20161025 header.b=GuUc0Wc5; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729165AbfLEK1T (ORCPT + 99 others); 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-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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