From: Andrew Morton <akpm@linux-foundation.org>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] x86: Implement strict user copy checks for x86_64
Date: Thu, 30 Jun 2011 12:36:16 -0700 [thread overview]
Message-ID: <20110630123616.dc17cfa9.akpm@linux-foundation.org> (raw)
In-Reply-To: <4E0CCD4C.1090801@codeaurora.org>
On Thu, 30 Jun 2011 12:23:56 -0700
Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 06/30/2011 12:19 PM, Andrew Morton wrote:
> > On Tue, 31 May 2011 11:14:32 -0700
> > Stephen Boyd <sboyd@codeaurora.org> wrote:
> >
> >> Strict user copy checks are only really supported on x86_32 even
> >> though the config option is selectable on x86_64. Add the
> >> necessary support to the 64 bit code to trigger copy_from_user()
> >> warnings at compile time.
> >
> > So I'm getting 20-30 warnings from an x86_64 allmodconfig build.
> >
> > I don't think we want a million other people to have to put up with
> > those warnings too. Can you please take a look at fixing these up?
> >
>
> Care to share the warnings? I'll run a build again and fix any new
> warnings I find.
init/calibrate.c: In function 'calibrate_delay':
init/calibrate.c:251: warning: 'lpj' may be used uninitialized in this function
In file included from /usr/src/devel/arch/x86/include/asm/uaccess.h:572,
from include/linux/uaccess.h:5,
from include/linux/highmem.h:7,
from include/linux/pagemap.h:10,
from include/linux/mempolicy.h:70,
from mm/mempolicy.c:68:
In function 'copy_from_user',
inlined from 'compat_sys_get_mempolicy' at mm/mempolicy.c:1415:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
crypto/anubis.c: In function 'anubis_crypt':
crypto/anubis.c:581: warning: 'inter' is used uninitialized in this function
In file included from /usr/src/devel/arch/x86/include/asm/uaccess.h:572,
from include/drm/drmP.h:65,
from drivers/gpu/drm/radeon/radeon_state.c:30:
In function 'copy_from_user',
inlined from 'radeon_cp_clear' at drivers/gpu/drm/radeon/radeon_state.c:2171:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In file included from drivers/message/i2o/config-osm.c:39:
drivers/message/i2o/i2o_config.c: In function 'i2o_cfg_passthru':
drivers/message/i2o/i2o_config.c:881: warning: cast to pointer from integer of different size
drivers/message/i2o/i2o_config.c:936: warning: cast to pointer from integer of different size
In file included from /usr/src/devel/arch/x86/include/asm/uaccess.h:572,
from drivers/message/i2o/config-osm.c:22:
In function 'copy_from_user',
inlined from 'i2o_cfg_passthru32' at drivers/message/i2o/i2o_config.c:684:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'i2o_cfg_passthru' at drivers/message/i2o/i2o_config.c:919:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In file included from /usr/src/devel/arch/x86/include/asm/uaccess.h:572,
from /usr/src/devel/arch/x86/include/asm/sections.h:5,
from /usr/src/devel/arch/x86/include/asm/hw_irq.h:26,
from include/linux/irq.h:351,
from /usr/src/devel/arch/x86/include/asm/hardirq.h:5,
from include/linux/hardirq.h:7,
from include/linux/interrupt.h:12,
from net/core/pktgen.c:135:
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:877:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:1145:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:1252:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:1274:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:1298:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:1321:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:1344:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:1365:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:1386:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:1407:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:1429:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:1446:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_thread_write' at net/core/pktgen.c:1769:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_thread_write' at net/core/pktgen.c:1800:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In file included from /usr/src/devel/arch/x86/include/asm/uaccess.h:572,
from include/net/checksum.h:25,
from include/linux/skbuff.h:28,
from include/linux/icmpv6.h:82,
from net/compat.c:19:
In function 'copy_from_user',
inlined from 'compat_sys_socketcall' at net/compat.c:792:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
drivers/net/pcmcia/nmclan_cs.c: In function 'nmclan_config':
drivers/net/pcmcia/nmclan_cs.c:628: warning: 'pcmcia_request_exclusive_irq' is deprecated (declared at include/pcmcia/ds.h:201)
In file included from /usr/src/devel/arch/x86/include/asm/uaccess.h:572,
from include/linux/poll.h:14,
from drivers/scsi/sg.c:44:
In function 'copy_from_user',
inlined from 'sg_proc_write_dressz' at drivers/scsi/sg.c:2399:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'sg_proc_write_adio' at drivers/scsi/sg.c:2376:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In file included from /usr/src/devel/arch/x86/include/asm/uaccess.h:572,
from include/linux/poll.h:14,
from drivers/net/tun.c:49:
In function 'copy_from_user',
inlined from '__tun_chr_ioctl' at drivers/net/tun.c:1246:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
next prev parent reply other threads:[~2011-06-30 19:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-31 18:14 [PATCH 0/4] strict user copy checks on x86_64 Stephen Boyd
2011-05-31 18:14 ` [PATCH 1/4] [SCSI] lpfc: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning Stephen Boyd
2011-05-31 18:14 ` [PATCH 2/4] kprobes: " Stephen Boyd
2011-05-31 18:14 ` [PATCH 3/4] x86: Implement strict user copy checks for x86_64 Stephen Boyd
2011-06-30 19:19 ` Andrew Morton
2011-06-30 19:23 ` Stephen Boyd
2011-06-30 19:36 ` Andrew Morton [this message]
2011-07-06 4:33 ` Stephen Boyd
2011-07-07 21:54 ` Andrew Morton
2011-07-08 1:15 ` Stephen Boyd
2011-05-31 18:14 ` [PATCH 4/4] Consolidate CONFIG_DEBUG_STRICT_USER_COPY_CHECKS Stephen Boyd
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=20110630123616.dc17cfa9.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sboyd@codeaurora.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