Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1271866 > unrolled thread

[PATCH] net: dns_resolver: convert time_t to time64_t

Started byAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
First post2015-11-18 07:40 +0100
Last post2015-11-18 23:30 +0100
Articles 5 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] net: dns_resolver: convert time_t to time64_t Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> - 2015-11-18 07:40 +0100
    Re: [PATCH] net: dns_resolver: convert time_t to time64_t David Miller <davem@davemloft.net> - 2015-11-18 21:30 +0100
      Re: [PATCH] net: dns_resolver: convert time_t to time64_t Arnd Bergmann <arnd@arndb.de> - 2015-11-18 22:10 +0100
        Re: [PATCH] net: dns_resolver: convert time_t to time64_t David Miller <davem@davemloft.net> - 2015-11-18 22:40 +0100
      Re: [PATCH] net: dns_resolver: convert time_t to time64_t David Howells <dhowells@redhat.com> - 2015-11-18 23:30 +0100

#1271866 — [PATCH] net: dns_resolver: convert time_t to time64_t

FromAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Date2015-11-18 07:40 +0100
Subject[PATCH] net: dns_resolver: convert time_t to time64_t
Message-ID<qw4zn-7DL-3@gated-at.bofh.it>
Changes the definition of the pointer _expiry from time_t to
time64_t. This is to handle the Y2038 problem where time_t
will overflow in the year 2038. The change is safe because
the kernel subsystems that call dns_query pass NULL.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
---
Changelog:
v1: The changes were originally made by Arnd Bergmann in
relation to time_t. I've broken down a patch sent to me
into two independent patches.

 include/linux/dns_resolver.h | 2 +-
 net/dns_resolver/dns_query.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/dns_resolver.h b/include/linux/dns_resolver.h
index cc92268..6ac3cad 100644
--- a/include/linux/dns_resolver.h
+++ b/include/linux/dns_resolver.h
@@ -27,7 +27,7 @@
 #ifdef __KERNEL__
 
 extern int dns_query(const char *type, const char *name, size_t namelen,
-		     const char *options, char **_result, time_t *_expiry);
+		     const char *options, char **_result, time64_t *_expiry);
 
 #endif /* KERNEL */
 
diff --git a/net/dns_resolver/dns_query.c b/net/dns_resolver/dns_query.c
index 4677b6f..ecc28cf 100644
--- a/net/dns_resolver/dns_query.c
+++ b/net/dns_resolver/dns_query.c
@@ -67,7 +67,7 @@
  * Returns the size of the result on success, -ve error code otherwise.
  */
 int dns_query(const char *type, const char *name, size_t namelen,
-	      const char *options, char **_result, time_t *_expiry)
+	      const char *options, char **_result, time64_t *_expiry)
 {
 	struct key *rkey;
 	const struct user_key_payload *upayload;
-- 
2.4.3


-- 
Kind Regards,
Aya Saif El-yazal Mahfouz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1272533

FromDavid Miller <davem@davemloft.net>
Date2015-11-18 21:30 +0100
Message-ID<qwhwB-7V2-5@gated-at.bofh.it>
In reply to#1271866
From: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Date: Wed, 18 Nov 2015 08:36:44 +0200

> Changes the definition of the pointer _expiry from time_t to
> time64_t. This is to handle the Y2038 problem where time_t
> will overflow in the year 2038. The change is safe because
> the kernel subsystems that call dns_query pass NULL.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> ---
> Changelog:
> v1: The changes were originally made by Arnd Bergmann in
> relation to time_t. I've broken down a patch sent to me
> into two independent patches.

Want me to apply this to 'net'?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1272573

FromArnd Bergmann <arnd@arndb.de>
Date2015-11-18 22:10 +0100
Message-ID<qwi9j-8vZ-9@gated-at.bofh.it>
In reply to#1272533
On Wednesday 18 November 2015 15:20:25 David Miller wrote:
> From: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> Date: Wed, 18 Nov 2015 08:36:44 +0200
> 
> > Changes the definition of the pointer _expiry from time_t to
> > time64_t. This is to handle the Y2038 problem where time_t
> > will overflow in the year 2038. The change is safe because
> > the kernel subsystems that call dns_query pass NULL.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> > ---
> > Changelog:
> > v1: The changes were originally made by Arnd Bergmann in
> > relation to time_t. I've broken down a patch sent to me
> > into two independent patches.
> 
> Want me to apply this to 'net'?

Yes, I think that would be good. The original patch was touching
both the key and net subsystems, but this patch makes sense by itself
now, and it helps keep the other half isolated to the key code.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1272598

FromDavid Miller <davem@davemloft.net>
Date2015-11-18 22:40 +0100
Message-ID<qwiCm-f0-19@gated-at.bofh.it>
In reply to#1272573
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 18 Nov 2015 22:08:54 +0100

> On Wednesday 18 November 2015 15:20:25 David Miller wrote:
>> From: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
>> Date: Wed, 18 Nov 2015 08:36:44 +0200
>> 
>> > Changes the definition of the pointer _expiry from time_t to
>> > time64_t. This is to handle the Y2038 problem where time_t
>> > will overflow in the year 2038. The change is safe because
>> > the kernel subsystems that call dns_query pass NULL.
>> > 
>> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> > Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
>> > ---
>> > Changelog:
>> > v1: The changes were originally made by Arnd Bergmann in
>> > relation to time_t. I've broken down a patch sent to me
>> > into two independent patches.
>> 
>> Want me to apply this to 'net'?
> 
> Yes, I think that would be good. The original patch was touching
> both the key and net subsystems, but this patch makes sense by itself
> now, and it helps keep the other half isolated to the key code.

OK, it sounds like we can simply delete the argument if nobody in-tree
uses it.

But whatever... applied thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1272626

FromDavid Howells <dhowells@redhat.com>
Date2015-11-18 23:30 +0100
Message-ID<qwjoJ-O1-1@gated-at.bofh.it>
In reply to#1272533
David Miller <davem@davemloft.net> wrote:

> From: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> Date: Wed, 18 Nov 2015 08:36:44 +0200
> 
> > Changes the definition of the pointer _expiry from time_t to
> > time64_t. This is to handle the Y2038 problem where time_t
> > will overflow in the year 2038. The change is safe because
> > the kernel subsystems that call dns_query pass NULL.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> > ---
> > Changelog:
> > v1: The changes were originally made by Arnd Bergmann in
> > relation to time_t. I've broken down a patch sent to me
> > into two independent patches.
> 
> Want me to apply this to 'net'?

Fine by me.

Acked-by: David Howells <dhowells@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web