From: 'Szabolcs Nagy' <szabolcs.nagy@arm.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: Theodore Ts'o <tytso@mit.edu>,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: linux interprets an fcntl int arg as long
Date: Tue, 1 Nov 2022 12:49:11 +0000 [thread overview]
Message-ID: <Y2EVx95XUEVOn7p3@arm.com> (raw)
In-Reply-To: <0030a20a94cd49628c5461d044bb28ed@AcuMS.aculab.com>
The 11/01/2022 12:19, David Laight wrote:
> From: 'Szabolcs Nagy' <szabolcs.nagy@arm.com>
> > SYSCALL_DEFINE3(fcntl, unsigned int, fd, unsigned int, cmd, unsigned long, arg)
> > {
>
> That is just a wrapper and calls do_fcntl().
> which needs changing to be add:
> arg &= ~0U;
> before the switch(cmd) {
this makes sense.
i thought previously you meant masking in userspace.
although if you mask there then many linux internal
apis could use int instead of long arg.
do you want me to post a patch? (i'm not a kernel
developer)
WARNING: multiple messages have this Message-ID (diff)
From: 'Szabolcs Nagy' <szabolcs.nagy@arm.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: Theodore Ts'o <tytso@mit.edu>,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: linux interprets an fcntl int arg as long
Date: Tue, 1 Nov 2022 12:49:11 +0000 [thread overview]
Message-ID: <Y2EVx95XUEVOn7p3@arm.com> (raw)
In-Reply-To: <0030a20a94cd49628c5461d044bb28ed@AcuMS.aculab.com>
The 11/01/2022 12:19, David Laight wrote:
> From: 'Szabolcs Nagy' <szabolcs.nagy@arm.com>
> > SYSCALL_DEFINE3(fcntl, unsigned int, fd, unsigned int, cmd, unsigned long, arg)
> > {
>
> That is just a wrapper and calls do_fcntl().
> which needs changing to be add:
> arg &= ~0U;
> before the switch(cmd) {
this makes sense.
i thought previously you meant masking in userspace.
although if you mask there then many linux internal
apis could use int instead of long arg.
do you want me to post a patch? (i'm not a kernel
developer)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-11-01 12:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-31 12:44 linux interprets an fcntl int arg as long Szabolcs Nagy
2022-10-31 12:44 ` Szabolcs Nagy
2022-11-01 1:46 ` Theodore Ts'o
2022-11-01 1:46 ` Theodore Ts'o
2022-11-01 9:11 ` Szabolcs Nagy
2022-11-01 9:11 ` Szabolcs Nagy
2022-11-01 10:02 ` David Laight
2022-11-01 10:02 ` David Laight
2022-11-01 11:44 ` 'Szabolcs Nagy'
2022-11-01 11:44 ` 'Szabolcs Nagy'
2022-11-01 12:19 ` David Laight
2022-11-01 12:19 ` David Laight
2022-11-01 12:49 ` 'Szabolcs Nagy' [this message]
2022-11-01 12:49 ` 'Szabolcs Nagy'
2022-11-01 13:12 ` Mark Rutland
2022-11-01 13:12 ` Mark Rutland
2022-11-01 13:29 ` David Laight
2022-11-01 13:29 ` David Laight
2022-11-01 13:35 ` David Laight
2022-11-01 13:35 ` David Laight
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=Y2EVx95XUEVOn7p3@arm.com \
--to=szabolcs.nagy@arm.com \
--cc=David.Laight@ACULAB.COM \
--cc=linux-api@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.