From: Arnd Bergmann <arnd@arndb.de>
To: Palmer Dabbelt <palmer@dabbelt.com>
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h
Date: Mon, 07 Sep 2015 15:16:37 +0200 [thread overview]
Message-ID: <17166105.3lntxUsXFt@wuerfel> (raw)
In-Reply-To: <1441152610-22566-1-git-send-email-palmer@dabbelt.com>
On Tuesday 01 September 2015 17:10:10 Palmer Dabbelt wrote:
> From: Palmer Dabbelt <palmer.dabbelt@eecs.berkeley.edu>
>
> When working on the RISC-V port I noticed that F_SETLK64 was being
> defined on our 64-bit platform, despite our port being so new that
> we've only ever had the 64-bit file ops. Since there's not compat
> layer for these, this causes fcntl to bail out.
>
> It turns out that one of the ways in with F_SETLK64 was being defined
> (there's some more in glibc, but that's a whole different story... :))
> is the result of CONFIG_64BIT showing up in this user-visible header.
> <asm-generic/bitsperlong.h> confirms this isn't sane, so I replaced it
> with a __BITS_PER_LONG check.
>
> I went ahead and grep'd for any more of these (with
> headers_install_all), and this was the only one I found.
>
> Signed-off-by: Palmer Dabbelt <palmer.dabbelt@eecs.berkeley.edu>
> Reviewed-by: Andrew Waterman <waterman@eecs.berkeley.edu>
> Reviewed-by: Albert Ou <aou@eecs.berkeley.edu>
Looks good to me. Are you planning to submit the RISC-V port upstream
any time soon? If so, just keep the patch in your tree and add my
Acked-by: Arnd Bergmann <arnd@arndb.de>
However, I did see a lot of similar bugs now that you point me to it:
$ grep -r \\\<CONFIG obj-tmp/usr/include/
obj-tmp/usr/include/asm-generic/fcntl.h:#ifndef CONFIG_64BIT
obj-tmp/usr/include/asm-generic/mman-common.h:#ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED
obj-tmp/usr/include/asm-generic/unistd.h:#ifdef CONFIG_MMU
obj-tmp/usr/include/asm-generic/unistd.h:#endif /* CONFIG_MMU */
obj-tmp/usr/include/linux/atmdev.h:#ifdef CONFIG_COMPAT
obj-tmp/usr/include/linux/elfcore.h:#ifdef CONFIG_BINFMT_ELF_FDPIC
obj-tmp/usr/include/linux/eventpoll.h:#ifdef CONFIG_PM_SLEEP
obj-tmp/usr/include/linux/fb.h:#ifdef CONFIG_FB_BACKLIGHT
obj-tmp/usr/include/linux/flat.h:#ifdef CONFIG_BINFMT_SHARED_FLAT
obj-tmp/usr/include/linux/hw_breakpoint.h:#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS
obj-tmp/usr/include/linux/pktcdvd.h:#if defined(CONFIG_CDROM_PKTCDVD_WCACHE)
obj-tmp/usr/include/linux/raw.h:#define MAX_RAW_MINORS CONFIG_MAX_RAW_DEVS
obj-tmp/usr/include/asm/ptrace.h:#ifdef CONFIG_CPU_ENDIAN_BE8
These all have the same problem, and we should fix them, as well as
(probably) adding an automated check to scripts/headers_install.sh.
Arnd
next prev parent reply other threads:[~2015-09-07 13:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 0:10 Palmer Dabbelt
2015-09-07 13:16 ` Arnd Bergmann [this message]
2015-09-07 13:35 ` Palmer Dabbelt
[not found] <2644177.lVCYzIBfPW@wuerfel>
2015-09-09 21:08 ` Palmer Dabbelt
2015-09-10 11:15 ` David Howells
2015-09-10 11:18 ` David Howells
2015-09-14 22:50 ` Palmer Dabbelt
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=17166105.3lntxUsXFt@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=palmer@dabbelt.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
all inboxes | Powered by JetHome®