From: Arnd Bergmann <arnd@arndb.de>
To: Kees Cook <keescook@chromium.org>
Cc: Deepa Dinamani <deepa.kernel@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Anton Vorontsov <anton@enomsg.org>,
Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v2] pstore: Convert internal records to timespec64
Date: Wed, 30 May 2018 17:06:39 +0200 [thread overview]
Message-ID: <CAK8P3a3d=Jz36COfnGgUfbsp79RfSDOnjjc-N+iFGF-3aQM3vg@mail.gmail.com> (raw)
In-Reply-To: <20180514225052.GA39419@beast>
On Tue, May 15, 2018 at 12:50 AM, Kees Cook <keescook@chromium.org> wrote:
> diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
> index 49b2bc114868..69e893076ab7 100644
> --- a/fs/pstore/ram.c
> +++ b/fs/pstore/ram.c
> @@ -38,6 +38,11 @@
>
> #define RAMOOPS_KERNMSG_HDR "===="
> #define MIN_MEM_SIZE 4096UL
> +#if __BITS_PER_LONG == 64
> +# define TVSEC_FMT "%ld"
> +#else
> +# define TVSEC_FMT "%lld"
> +#endif
>
> static ulong record_size = MIN_MEM_SIZE;
> module_param(record_size, ulong, 0400);
Unfortunately, this bit conflicts with my patch "timekeeping: Remove
timespec64 hack"
that Thomas queued in tip: https://lkml.org/lkml/2018/5/19/115, causing
a harmless but annoying build warning on 64-bit machines:
fs/pstore/ram.c: In function 'ramoops_read_kmsg_hdr':
fs/pstore/ram.c:39:29: error: format '%ld' expects argument of type
'long int *', but argument 3 has type 'time64_t *' {aka 'long long int
*'} [-Werror=format=]
#define RAMOOPS_KERNMSG_HDR "===="
^~~~~~
fs/pstore/ram.c:167:21: note: in expansion of macro 'RAMOOPS_KERNMSG_HDR'
The tip/timers/y2038 branch is currently not part of linux-next. It should be
easy to fix it up with a patch on top that open-codes TVSEC_FMT as %lld,
and adds a cast to 'long long' like every other such printk has at the moment
(allowing them the casts to be mass-removed after my patch is merged).
Arnd
prev parent reply other threads:[~2018-05-30 15:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 22:50 [PATCH v2] pstore: Convert internal records to timespec64 Kees Cook
2018-05-15 17:42 ` Deepa Dinamani
2018-05-30 15:06 ` 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='CAK8P3a3d=Jz36COfnGgUfbsp79RfSDOnjjc-N+iFGF-3aQM3vg@mail.gmail.com' \
--to=arnd@arndb.de \
--cc=anton@enomsg.org \
--cc=ccross@android.com \
--cc=deepa.kernel@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.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;
as well as URLs for NNTP newsgroup(s).