From: naresh kamboju <naresh.kernel@gmail.com>
To: mtk.manpages@gmail.com
Cc: mtk.manpages@googlemail.com, ziegler@uni-freiburg.de,
akpm@linux-foundation.org, johnstul@us.ibm.com,
zippel@linux-m68k.org, linux-kernel@vger.kernel.org,
saji.kumar@wipro.com, ltp-list <ltp-list@lists.sourceforge.net>,
michal.simek@petalogix.com, Garrett Cooper <yanegomi@gmail.com>,
Mike Frysinger <vapier@gentoo.org>,
Subrata Modak <subrata@linux.vnet.ibm.com>
Subject: Re: adjtimex system man page EINVAL
Date: Wed, 29 Jul 2009 13:52:51 +0530 [thread overview]
Message-ID: <f5a7b3810907290122q21745252n620c3a25ee35b1eb@mail.gmail.com> (raw)
In-Reply-To: <f5a7b3810907170007i33bc5b01sf2dd2810e4615c41@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4825 bytes --]
Hi Michael Kerrisk,
With reference to the LTP (Linux Test Project) test cases
ltp/testcases/kernel/syscalls/adjtimex/adjtimex02.c
GIT commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=eea83d896e318bda54be2d2770d2c5d6668d11db
There are changes noticed in latest kernel from 2.6.26 and above.
adjtimex EINVAL error check for offset is removed from 2.6.26 and above kernels
Kernels source lines are
To make sure the offset value following lines are added in
linux/kernel/time/ntp.c
+ /*
+ * Scale the phase adjustment and
+ * clamp to the operating range.
+ */
+ offset = min(offset, MAXPHASE);
+ offset = max(offset, -MAXPHASE);
+
Please review the patch.
If you have any issues please let me know.
Ref Links:
GIT commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=eea83d896e318bda54be2d2770d2c5d6668d11db
LTP:
http://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg02498.html
http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/kernel/syscalls/adjtimex/adjtimex02.c?view=log
Best regards,
Naresh Kamboju
Signed-off-by: Naresh Kamboju < naresh.kernel@gmail.com >
diff -Naurb man-pages-3.21/man2/adjtimex.2 man-pages-3.21_mod/man2/adjtimex.2
--- man-pages-3.21/man2/adjtimex.2 2009-04-15 21:35:32.000000000 +0530
+++ man-pages-3.21_mod/man2/adjtimex.2 2009-06-04 14:19:34.000000000 +0530
@@ -118,7 +118,8 @@
.B EINVAL
An attempt is made to set
.I buf.offset
-to a value outside the range \-131071 to +131071,
+to a value outside the range \-131071 to +131071 applicable upto 2.6.25
+kernels, EINVAL error check with buf.offset been removed from 2.6.25 and above,
or to set
.I buf.status
to a value other than those listed above,
On Fri, Jul 17, 2009 at 12:37 PM, naresh kamboju<naresh.kernel@gmail.com> wrote:
> Dear Michael Kerrisk,
>
> As per our discussion … I have sent below mail explaining the issue
> with adjtimex man page.
> Is that information and patch OK?
>
> When would be the next man page release?
>
> Please let me know if there are any issues.
>
> Best regards
> Naresh Kamboju
>
>
>
> On Thu, Jun 4, 2009 at 4:44 PM, naresh kamboju<naresh.kernel@gmail.com> wrote:
>> Dear Michael Kerrisk,
>>
>> After comparing the changes between 2.6.25 and 2.6.29 kernels
>> As per my understanding EINVAL error check is removed with
>> timex.offset after 2.6.25 kernels and above.
>>
>> To make sure the offset value following lines are added in
>> linux-2.6.29/kernel/time/ntp.c +80
>>
>>
>> + /*
>> + * Scale the phase adjustment and
>> + * clamp to the operating range.
>> + */
>> + offset = min(offset, MAXPHASE);
>> + offset = max(offset, -MAXPHASE);
>> +
>>
>>
>> I have attached patch as adjtimex_man.patch
>>
>>
>> Best wishes,
>> Naresh Kamboju
>>
>> Signed-off-by: Naresh Kamboju < naresh.kernel@gmail.com >
>> diff -Naurb man-pages-3.21/man2/adjtimex.2 man-pages-3.21_mod/man2/adjtimex.2
>> --- man-pages-3.21/man2/adjtimex.2 2009-04-15 21:35:32.000000000 +0530
>> +++ man-pages-3.21_mod/man2/adjtimex.2 2009-06-04 14:19:34.000000000 +0530
>> @@ -118,7 +118,8 @@
>> .B EINVAL
>> An attempt is made to set
>> .I buf.offset
>> -to a value outside the range \-131071 to +131071,
>> +to a value outside the range \-131071 to +131071 applicable upto 2.6.25
>> +kernels, EINVAL error check with buf.offset been removed from 2.6.25 and above,
>> or to set
>> .I buf.status
>> to a value other than those listed above,
>>
>>
>>
>>
>>
>> On Tue, Jun 2, 2009 at 10:37 AM, Michael Kerrisk
>> <mtk.manpages@googlemail.com> wrote:
>>> Naresh,
>>>
>>> On Fri, May 22, 2009 at 1:17 PM, naresh kamboju <naresh.kernel@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> Regarding adjtimex system man page,
>>>>
>>>> Since there are modifications noticed in
>>>> /kerel/time/ntp.c
>>>> /include/linux/timex.h
>>>>
>>>> compared with /kerel/time/ntp.c 2.6.23 and 2.6.29 and above i have
>>>> attached adjtimex_2.6.23_vs_2.6.29.log : line number 330.
>>>>
>>>> In adjtimex (2) man page under the EINVAL Error check section changes
>>>> are required w.r.t buf.offset.
>>>> Could you conform and update the man page.
>>>
>>> Could you please summarize in a couple of sentence what the actual
>>> changes are that you think are required.
>>>
>>> Cheers,
>>>
>>> Michael
>>>
>>>
>>> --
>>> Michael Kerrisk
>>> Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
>>> git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
>>> man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
>>> Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
>>>
>>
>
[-- Attachment #2: adjtimex_man.patch --]
[-- Type: application/octet-stream, Size: 572 bytes --]
diff -Naurb man-pages-3.21/man2/adjtimex.2 man-pages-3.21_mod/man2/adjtimex.2
--- man-pages-3.21/man2/adjtimex.2 2009-04-15 21:35:32.000000000 +0530
+++ man-pages-3.21_mod/man2/adjtimex.2 2009-06-04 14:19:34.000000000 +0530
@@ -118,7 +118,8 @@
.B EINVAL
An attempt is made to set
.I buf.offset
-to a value outside the range \-131071 to +131071,
+to a value outside the range \-131071 to +131071 applicable upto 2.6.25
+kernels, EINVAL error check with buf.offset been removed from 2.6.25 and above,
or to set
.I buf.status
to a value other than those listed above,
prev parent reply other threads:[~2009-07-29 8:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 11:17 naresh kamboju
2009-06-02 5:07 ` Michael Kerrisk
2009-06-04 11:14 ` naresh kamboju
2009-07-17 7:07 ` naresh kamboju
2009-07-29 8:22 ` naresh kamboju [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=f5a7b3810907290122q21745252n620c3a25ee35b1eb@mail.gmail.com \
--to=naresh.kernel@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ltp-list@lists.sourceforge.net \
--cc=michal.simek@petalogix.com \
--cc=mtk.manpages@gmail.com \
--cc=mtk.manpages@googlemail.com \
--cc=saji.kumar@wipro.com \
--cc=subrata@linux.vnet.ibm.com \
--cc=vapier@gentoo.org \
--cc=yanegomi@gmail.com \
--cc=ziegler@uni-freiburg.de \
--cc=zippel@linux-m68k.org \
/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®