All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Pedro Tammela <pctammela@mojatatu.com>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
	xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net,
	edumazet@google.com, pabeni@redhat.com,
	simon.horman@corigine.com
Subject: Re: [PATCH net-next v4 3/5] net/sched: act_pedit: check static offsets a priori
Date: Thu, 20 Apr 2023 19:41:34 -0700	[thread overview]
Message-ID: <20230420194134.1b2b4fc8@kernel.org> (raw)
In-Reply-To: <20230418234354.582693-4-pctammela@mojatatu.com>

On Tue, 18 Apr 2023 20:43:52 -0300 Pedro Tammela wrote:
> @@ -414,12 +420,12 @@ TC_INDIRECT_SCOPE int tcf_pedit_act(struct sk_buff *skb,
>  					       sizeof(_d), &_d);
>  			if (!d)
>  				goto bad;
> -			offset += (*d & tkey->offmask) >> tkey->shift;
> -		}
>  
> -		if (offset % 4) {
> -			pr_info("tc action pedit offset must be on 32 bit boundaries\n");
> -			goto bad;
> +			offset += (*d & tkey->offmask) >> tkey->shift;

this line loads part of the offset from packet data, so it's not
exactly equivalent to the init time check. It's unlikely to be used
but I think that rejecting cur % 4 vs data patch check only is
technically a functional change, so needs to be discussed in the commit
msg.

> +			if (offset % 4) {
> +				pr_info("tc action pedit offset must be on 32 bit boundaries\n");
> +				goto bad;
> +			}


  reply	other threads:[~2023-04-21  2:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 23:43 [PATCH net-next v4 0/5] net/sched: act_pedit: minor improvements Pedro Tammela
2023-04-18 23:43 ` [PATCH net-next v4 1/5] net/sched: act_pedit: simplify 'ex' key parsing error propagation Pedro Tammela
2023-04-19  9:37   ` Simon Horman
2023-04-21  2:33   ` Jakub Kicinski
2023-04-18 23:43 ` [PATCH net-next v4 2/5] net/sched: act_pedit: use extack in 'ex' parsing errors Pedro Tammela
2023-04-19  9:39   ` Simon Horman
2023-04-21  2:36   ` Jakub Kicinski
2023-04-18 23:43 ` [PATCH net-next v4 3/5] net/sched: act_pedit: check static offsets a priori Pedro Tammela
2023-04-21  2:41   ` Jakub Kicinski [this message]
2023-04-21 15:12     ` Pedro Tammela
2023-04-21 15:15       ` Jakub Kicinski
2023-04-21 16:10         ` Pedro Tammela
2023-04-18 23:43 ` [PATCH net-next v4 4/5] net/sched: act_pedit: remove extra check for key type Pedro Tammela
2023-04-18 23:43 ` [PATCH net-next v4 5/5] net/sched: act_pedit: rate limit datapath messages Pedro Tammela

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=20230420194134.1b2b4fc8@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pctammela@mojatatu.com \
    --cc=simon.horman@corigine.com \
    --cc=xiyou.wangcong@gmail.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 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.