All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roberts, William C" <william.c.roberts@intel.com>
To: "Roberts, William C" <william.c.roberts@intel.com>,
	Joe Perches <joe@perches.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"apw@canonical.com" <apw@canonical.com>,
	"kernel-hardening@lists.openwall.com" 
	<kernel-hardening@lists.openwall.com>
Subject: RE: [PATCH] checkpatch: add warning on %pk instead of %pK usage
Date: Mon, 27 Feb 2017 16:26:30 +0000	[thread overview]
Message-ID: <476DC76E7D1DF2438D32BFADF679FC562307BAE6@ORSMSX103.amr.corp.intel.com> (raw)
In-Reply-To: <476DC76E7D1DF2438D32BFADF679FC5623064D3F@ORSMSX103.amr.corp.intel.com>



> -----Original Message-----
> From: Roberts, William C [mailto:william.c.roberts@intel.com]
> Sent: Wednesday, February 15, 2017 3:49 PM
> To: Joe Perches <joe@perches.com>
> Cc: linux-kernel@vger.kernel.org; apw@canonical.com; kernel-
> hardening@lists.openwall.com
> Subject: [kernel-hardening] RE: [PATCH] checkpatch: add warning on %pk instead
> of %pK usage
> 
> 
> 
> > -----Original Message-----
> > From: Joe Perches [mailto:joe@perches.com]
> > Sent: Monday, February 13, 2017 2:21 PM
> > To: Roberts, William C <william.c.roberts@intel.com>
> > Cc: linux-kernel@vger.kernel.org; apw@canonical.com; kernel-
> > hardening@lists.openwall.com
> > Subject: Re: [PATCH] checkpatch: add warning on %pk instead of %pK
> > usage
> >
> > (Adding back the cc's)
> >
> > On Mon, 2017-02-13 at 21:28 +0000, Roberts, William C wrote:
> > > <snip>
> > > > No worries.
> > > > No idea why it doesn't work for you.
> > > > Maybe the hand applying was somehow faulty?
> > > >
> > > > The attached is on top of -next so it does have offsets on Linus'
> > > > tree, but it seems to work.
> > > >
> > > > (on -linux)
> > > >
> > > > $ patch -p1 < cp_vsp.diff
> > > > patching file scripts/checkpatch.pl Hunk #1 succeeded at 5634
> > > > (offset -36 lines).
> > > >
> > > > $ cat t_block.c
> > > > {
> > > > 	MY_DEBUG(drv->foo,
> > > > 		 "%pk",
> > > > 		 foo->boo);
> > > > }
> > > > $ ./scripts/checkpatch.pl -f t_block.c
> > > > WARNING: Invalid vsprintf pointer extension '%pk'
> > > > #2: FILE: t_block.c:2:
> > > > +	MY_DEBUG(drv->foo,
> > > > +		 "%pk",
> > > > +		 foo->boo);
> > > >
> > > > total: 0 errors, 1 warnings, 5 lines checked
> > > >
> > > > NOTE: For some of the reported defects, checkpatch may be able to
> > > >       mechanically convert to the typical style using --fix or --fix-inplace.
> > > >
> > > > t_block.c has style problems, please review.
> > > >
> > > > NOTE: If any of the errors are false positives, please report
> > > >       them to the maintainer, see CHECKPATCH in MAINTAINERS.
> > >
> > >
> > > Applied. It works fine with your example (see attached
> > > 0001-tblock.patch) but it doesn't provide Output for me with
> > > 0002-drv-hack.patch (attached as well)
> > >
> > > $ ./scripts/checkpatch.pl 0002-drv-hack.patch
> > > total: 0 errors, 0 warnings, 10 lines checked
> > >
> > > 0002-drv-hack.patch has no obvious style problems and is ready for
> submission.
> > >
> > > ./scripts/checkpatch.pl 0001-tblock.patch
> > > WARNING: added, moved or deleted file(s), does MAINTAINERS need
> > updating?
> > > #13:
> > > new file mode 100644
> > >
> > > WARNING: Invalid vsprintf pointer extension '%pk'
> > > #19: FILE: t_block.c:2:
> > > +	MY_DEBUG(drv->foo,
> > > +		"%pk",
> > > +		 foo->boo);
> > >
> > > total: 0 errors, 2 warnings, 6 lines checked
> > >
> > > NOTE: For some of the reported defects, checkpatch may be able to
> > >       mechanically convert to the typical style using --fix or --fix-inplace.
> > >
> > > 0001-tblock.patch has style problems, please review.
> > >
> > > NOTE: If any of the errors are false positives, please report
> > >       them to the maintainer, see CHECKPATCH in MAINTAINERS.
> >
> > This means _all_ the $stat checks aren't being done on patches that
> > add just a single multi-line statement.
> >
> > Andrew?  Any thoughts on how to enable $stat appropriately for patch
> > contexts with a single multi-line statement?
> 
> I'm for merging your patch as is, and then take up the fact that $stat is not
> working correctly as a separate change, does that seem reasonable?

I haven't seen anything on list about your patch, are we kind of stuck or do you
have some plan on adding your stat patch in the future?

WARNING: multiple messages have this Message-ID (diff)
From: "Roberts, William C" <william.c.roberts@intel.com>
To: "Roberts, William C" <william.c.roberts@intel.com>,
	Joe Perches <joe@perches.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"apw@canonical.com" <apw@canonical.com>,
	"kernel-hardening@lists.openwall.com"
	<kernel-hardening@lists.openwall.com>
Subject: [kernel-hardening] RE: [PATCH] checkpatch: add warning on %pk instead of %pK usage
Date: Mon, 27 Feb 2017 16:26:30 +0000	[thread overview]
Message-ID: <476DC76E7D1DF2438D32BFADF679FC562307BAE6@ORSMSX103.amr.corp.intel.com> (raw)
In-Reply-To: <476DC76E7D1DF2438D32BFADF679FC5623064D3F@ORSMSX103.amr.corp.intel.com>



> -----Original Message-----
> From: Roberts, William C [mailto:william.c.roberts@intel.com]
> Sent: Wednesday, February 15, 2017 3:49 PM
> To: Joe Perches <joe@perches.com>
> Cc: linux-kernel@vger.kernel.org; apw@canonical.com; kernel-
> hardening@lists.openwall.com
> Subject: [kernel-hardening] RE: [PATCH] checkpatch: add warning on %pk instead
> of %pK usage
> 
> 
> 
> > -----Original Message-----
> > From: Joe Perches [mailto:joe@perches.com]
> > Sent: Monday, February 13, 2017 2:21 PM
> > To: Roberts, William C <william.c.roberts@intel.com>
> > Cc: linux-kernel@vger.kernel.org; apw@canonical.com; kernel-
> > hardening@lists.openwall.com
> > Subject: Re: [PATCH] checkpatch: add warning on %pk instead of %pK
> > usage
> >
> > (Adding back the cc's)
> >
> > On Mon, 2017-02-13 at 21:28 +0000, Roberts, William C wrote:
> > > <snip>
> > > > No worries.
> > > > No idea why it doesn't work for you.
> > > > Maybe the hand applying was somehow faulty?
> > > >
> > > > The attached is on top of -next so it does have offsets on Linus'
> > > > tree, but it seems to work.
> > > >
> > > > (on -linux)
> > > >
> > > > $ patch -p1 < cp_vsp.diff
> > > > patching file scripts/checkpatch.pl Hunk #1 succeeded at 5634
> > > > (offset -36 lines).
> > > >
> > > > $ cat t_block.c
> > > > {
> > > > 	MY_DEBUG(drv->foo,
> > > > 		 "%pk",
> > > > 		 foo->boo);
> > > > }
> > > > $ ./scripts/checkpatch.pl -f t_block.c
> > > > WARNING: Invalid vsprintf pointer extension '%pk'
> > > > #2: FILE: t_block.c:2:
> > > > +	MY_DEBUG(drv->foo,
> > > > +		 "%pk",
> > > > +		 foo->boo);
> > > >
> > > > total: 0 errors, 1 warnings, 5 lines checked
> > > >
> > > > NOTE: For some of the reported defects, checkpatch may be able to
> > > >       mechanically convert to the typical style using --fix or --fix-inplace.
> > > >
> > > > t_block.c has style problems, please review.
> > > >
> > > > NOTE: If any of the errors are false positives, please report
> > > >       them to the maintainer, see CHECKPATCH in MAINTAINERS.
> > >
> > >
> > > Applied. It works fine with your example (see attached
> > > 0001-tblock.patch) but it doesn't provide Output for me with
> > > 0002-drv-hack.patch (attached as well)
> > >
> > > $ ./scripts/checkpatch.pl 0002-drv-hack.patch
> > > total: 0 errors, 0 warnings, 10 lines checked
> > >
> > > 0002-drv-hack.patch has no obvious style problems and is ready for
> submission.
> > >
> > > ./scripts/checkpatch.pl 0001-tblock.patch
> > > WARNING: added, moved or deleted file(s), does MAINTAINERS need
> > updating?
> > > #13:
> > > new file mode 100644
> > >
> > > WARNING: Invalid vsprintf pointer extension '%pk'
> > > #19: FILE: t_block.c:2:
> > > +	MY_DEBUG(drv->foo,
> > > +		"%pk",
> > > +		 foo->boo);
> > >
> > > total: 0 errors, 2 warnings, 6 lines checked
> > >
> > > NOTE: For some of the reported defects, checkpatch may be able to
> > >       mechanically convert to the typical style using --fix or --fix-inplace.
> > >
> > > 0001-tblock.patch has style problems, please review.
> > >
> > > NOTE: If any of the errors are false positives, please report
> > >       them to the maintainer, see CHECKPATCH in MAINTAINERS.
> >
> > This means _all_ the $stat checks aren't being done on patches that
> > add just a single multi-line statement.
> >
> > Andrew?  Any thoughts on how to enable $stat appropriately for patch
> > contexts with a single multi-line statement?
> 
> I'm for merging your patch as is, and then take up the fact that $stat is not
> working correctly as a separate change, does that seem reasonable?

I haven't seen anything on list about your patch, are we kind of stuck or do you
have some plan on adding your stat patch in the future?

  parent reply	other threads:[~2017-02-27 16:26 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10 19:37 [PATCH] checkpatch: add warning on %pk instead of %pK usage william.c.roberts
2017-02-10 19:37 ` [kernel-hardening] " william.c.roberts
2017-02-10 20:12 ` Joe Perches
2017-02-10 20:12   ` [kernel-hardening] " Joe Perches
2017-02-10 22:14   ` Roberts, William C
2017-02-10 22:14     ` [kernel-hardening] " Roberts, William C
2017-02-10 22:26     ` Roberts, William C
2017-02-10 22:26       ` [kernel-hardening] " Roberts, William C
2017-02-10 22:49       ` Joe Perches
2017-02-10 22:49         ` [kernel-hardening] " Joe Perches
2017-02-10 22:59         ` Joe Perches
2017-02-10 22:59           ` [kernel-hardening] " Joe Perches
2017-02-10 23:31         ` Roberts, William C
2017-02-10 23:31           ` [kernel-hardening] " Roberts, William C
2017-02-10 23:49           ` Joe Perches
2017-02-10 23:49             ` [kernel-hardening] " Joe Perches
2017-02-10 23:54         ` Roberts, William C
2017-02-10 23:54           ` [kernel-hardening] " Roberts, William C
2017-02-11  0:01           ` Joe Perches
2017-02-11  0:01             ` [kernel-hardening] " Joe Perches
2017-02-11  1:32         ` Roberts, William C
2017-02-11  1:32           ` [kernel-hardening] " Roberts, William C
2017-02-11  3:23           ` Joe Perches
2017-02-11  3:23             ` [kernel-hardening] " Joe Perches
2017-02-13 19:46             ` Roberts, William C
2017-02-13 19:46               ` [kernel-hardening] " Roberts, William C
2017-02-13 20:14               ` Joe Perches
2017-02-13 20:14                 ` [kernel-hardening] " Joe Perches
     [not found]               ` <1487016251.6214.6.camel@perches.com>
     [not found]                 ` <476DC76E7D1DF2438D32BFADF679FC562305F62F@ORSMSX103.amr.corp.intel.com>
2017-02-13 22:20                   ` Joe Perches
2017-02-13 22:20                     ` [kernel-hardening] " Joe Perches
2017-02-15 23:49                     ` Roberts, William C
2017-02-15 23:49                       ` [kernel-hardening] " Roberts, William C
2017-02-16  0:19                       ` Joe Perches
2017-02-16  0:19                         ` [kernel-hardening] " Joe Perches
2017-02-27 16:26                       ` Roberts, William C [this message]
2017-02-27 16:26                         ` [kernel-hardening] " Roberts, William C
2017-02-27 20:54                         ` [PATCH] checkpatch: Add ability to find bad uses of vsprintf %p<foo> extensions Joe Perches
2017-02-27 20:54                           ` [kernel-hardening] " Joe Perches
2017-02-27 21:18                           ` Kees Cook
2017-02-27 21:18                             ` Kees Cook
2017-02-28 15:34                           ` Roberts, William C
2017-02-28 15:34                             ` [kernel-hardening] " Roberts, William C
2017-03-01  0:06                           ` Andrew Morton
2017-03-01  0:06                             ` [kernel-hardening] " Andrew Morton
2017-03-01  0:11                             ` Kees Cook
2017-03-01  0:11                               ` Kees Cook
2017-03-01  1:14                               ` Joe Perches
2017-03-01  1:14                                 ` Joe Perches
2017-03-01  0:12                             ` Joe Perches
2017-03-01  0:12                               ` [kernel-hardening] " Joe Perches

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=476DC76E7D1DF2438D32BFADF679FC562307BAE6@ORSMSX103.amr.corp.intel.com \
    --to=william.c.roberts@intel.com \
    --cc=apw@canonical.com \
    --cc=joe@perches.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.