Re: [PATCH] x86/platform/intel-mid: Constify mid_pci_platform_pm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 28, 2016 at 11:38:59PM +0100, Lukas Wunner wrote:
> On Mon, Nov 28, 2016 at 01:25:30PM -0600, Bjorn Helgaas wrote:
> > On Sun, Oct 09, 2016 at 01:12:55PM +0200, Lukas Wunner wrote:
> > > -.data          56
> > > +.data           0
> > > -.rodata        32
> > > +.rodata        88
> > > 
> > > Cc: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> > > Signed-off-by: Lukas Wunner <lukas@xxxxxxxxx>
> > 
> > Acked-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> > 
> > It'd be nice if this had a changelog.  I'm happy if this goes via the
> > x86 tree.
> 
> Thanks, I'll resend with your ack.
> 
> As for the changelog, to be honest I can't think of much more to write
> there.  One important motivation of constifying structs that are never
> modified, and particularly structs containing function pointers like
> this one, is to prevent their modification and subsequent usage by an
> attacker.  However constification patches are submitted all the
> time by Julia Lawall and others, and I've never seen this rationale
> spelled out in a commit message, so the assumption seems to be that
> it's common knowledge.  I could probably add something like
> 
> 	Size of pci-mid.o ELF sections:
> 
> to clarify what the numbers in the changelog refer to.

Part of this is an artifact of my workflow.  I read and review patches
in mutt, and then all I see is the body of the changelog, not the
subject line.  So in this case, all I see is:

  -.data          56
  +.data           0
  -.rodata        32
  +.rodata        88

which isn't much.  I mean, I can guess that you're reducing the size of
things.  But apparently even that isn't the reason you're doing this.
Something as simple as "make mid_pci_platform_pm const because it
never needs to be modified" might be enough.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux