Re: [PATCH] time: fix a assignment error in ntp module

2019-06-17 Thread Thomas Gleixner
Miroslav, On Mon, 17 Jun 2019, Miroslav Lichvar wrote: > On Mon, Jun 17, 2019 at 02:14:57PM +0200, Thomas Gleixner wrote: > > On Mon, 17 Jun 2019, 维康石 wrote: > > > Yes,the >UINT_MAX value can be passed by > > > syscall adjtimex->do_adjtimex->__do_adjtimex->process_adjtimex_modes by > > > the >

Re: [PATCH] time: fix a assignment error in ntp module

2019-06-17 Thread Miroslav Lichvar
On Mon, Jun 17, 2019 at 02:14:57PM +0200, Thomas Gleixner wrote: > On Mon, 17 Jun 2019, 维康石 wrote: > > Yes,the >UINT_MAX value can be passed by > > syscall adjtimex->do_adjtimex->__do_adjtimex->process_adjtimex_modes by the > > proper arugments. > > So there is clearly some sanity check missing,

Re: [PATCH] time: fix a assignment error in ntp module

2019-06-17 Thread Thomas Gleixner
On Mon, 17 Jun 2019, 维康石 wrote: A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I include quotations after my reply?

Re: [PATCH] time: fix a assignment error in ntp module

2019-06-17 Thread Thomas Gleixner
On Mon, 22 Apr 2019, Weikang shi wrote: > From: swkhack > > It is meanless to check a 64bit(txc->constant) value is postive > when the value has to be assigned to a 32 bit variable(*time_tai). > So I make a temp type conversion before the compare. What? Casting it to int makes it more

Re: [PATCH] time: fix a assignment error in ntp module

2019-04-24 Thread Thomas Gleixner
On Mon, 22 Apr 2019, Weikang shi wrote: > From: swkhack > > It is meanless to check a 64bit(txc->constant) value is postive > when the value has to be assigned to a 32 bit variable(*time_tai). > So I make a temp type conversion before the compare. Errm no. This is missing a proper range check

[PATCH] time: fix a assignment error in ntp module

2019-04-22 Thread Weikang shi
From: swkhack It is meanless to check a 64bit(txc->constant) value is postive when the value has to be assigned to a 32 bit variable(*time_tai). So I make a temp type conversion before the compare. Signed-off-by: swkhack --- kernel/time/ntp.c | 2 +- 1 file changed, 1 insertion(+), 1