mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "He Zhe" <zhe.he@windriver.com>,
	"Clemens Ladisch" <clemens@ladisch.de>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] hpet: Support 32-bit userspace
Date: Thu, 06 Jun 2024 15:28:02 +0200	[thread overview]
Message-ID: <74c2e8ee-d2fa-4312-86f5-46e5c6da4047@app.fastmail.com> (raw)
In-Reply-To: <20240606123908.738733-1-zhe.he@windriver.com>

On Thu, Jun 6, 2024, at 14:39, He Zhe wrote:
> hpet_compat_ioctl and read file operations failed to handle parameters from
> 32-bit userspace and thus samples/timers/hpet_example.c fails as below.
>
> root@intel-x86-64:~# ./hpet_example-32.out poll /dev/hpet 1 2
> -hpet: executing poll
> hpet_poll: HPET_IRQFREQ failed
>
> This patch fixes cmd and arg handling in hpet_compat_ioctl and adds compat
> handling for 32-bit userspace in hpet_read.
>
> hpet_example now shows that it works for both 64-bit and 32-bit.
>
> root@intel-x86-64:~# ./hpet_example-32.out poll /dev/hpet 1 2
> -hpet: executing poll
> hpet_poll: info.hi_flags 0x0
> hpet_poll: expired time = 0xf4298
> hpet_poll: revents = 0x1
> hpet_poll: data 0x1
> hpet_poll: expired time = 0xf4235
> hpet_poll: revents = 0x1
> hpet_poll: data 0x1
> root@intel-x86-64:~# ./hpet_example-64.out poll /dev/hpet 1 2
> -hpet: executing poll
> hpet_poll: info.hi_flags 0x0
> hpet_poll: expired time = 0xf42a1
> hpet_poll: revents = 0x1
> hpet_poll: data 0x1
> hpet_poll: expired time = 0xf4232
> hpet_poll: revents = 0x1
> hpet_poll: data 0x1
>
> Cc: stable@vger.kernel.org
> Signed-off-by: He Zhe <zhe.he@windriver.com>

Fixes: 54066a57c584 ("hpet: kill BKL, add compat_ioctl")
Reviewed-by: Arnd Bergmann <arnd@arndb.de>

      reply	other threads:[~2024-06-06 13:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 12:39 He Zhe
2024-06-06 13:28 ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74c2e8ee-d2fa-4312-86f5-46e5c6da4047@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=clemens@ladisch.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhe.he@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®