From: David Miller <davem@davemloft.net>
To: keescook@chromium.org
Cc: netdev@vger.kernel.org, jarod@redhat.com, gustavo@embeddedor.com,
linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: tulip: Constify tulip_tbl
Date: Fri, 08 Sep 2017 20:54:12 -0700 (PDT) [thread overview]
Message-ID: <20170908.205412.2183497152163393093.davem@davemloft.net> (raw)
In-Reply-To: <20170907193514.GA114400@beast>
From: Kees Cook <keescook@chromium.org>
Date: Thu, 7 Sep 2017 12:35:14 -0700
> It looks like all users of tulip_tbl are reads, so mark this table
> as read-only.
>
> $ git grep tulip_tbl # edited to avoid line-wraps...
> interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ...
> interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs&~RxPollInt, ...
> interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ...
> interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs | TimerInt,
> pnic.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR7);
> tulip.h: extern struct tulip_chip_table tulip_tbl[];
> tulip_core.c:struct tulip_chip_table tulip_tbl[] = {
> tulip_core.c:iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR5);
> tulip_core.c:iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR7);
> tulip_core.c:setup_timer(&tp->timer, tulip_tbl[tp->chip_id].media_timer,
> tulip_core.c:const char *chip_name = tulip_tbl[chip_idx].chip_name;
> tulip_core.c:if (pci_resource_len (pdev, 0) < tulip_tbl[chip_idx].io_size)
> tulip_core.c:ioaddr = pci_iomap(..., tulip_tbl[chip_idx].io_size);
> tulip_core.c:tp->flags = tulip_tbl[chip_idx].flags;
> tulip_core.c:setup_timer(&tp->timer, tulip_tbl[tp->chip_id].media_timer,
> tulip_core.c:INIT_WORK(&tp->media_work, tulip_tbl[tp->chip_id].media_task);
>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jarod Wilson <jarod@redhat.com>
> Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
> Cc: netdev@vger.kernel.org
> Cc: linux-parisc@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>
Applied.
prev parent reply other threads:[~2017-09-09 3:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-07 19:35 [PATCH] net: tulip: Constify tulip_tbl Kees Cook
2017-09-09 3:54 ` David Miller [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=20170908.205412.2183497152163393093.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=gustavo@embeddedor.com \
--cc=jarod@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=netdev@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 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).