public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Peter Xu <peterx@redhat.com>, linux-kernel@vger.kernel.org
Cc: Ming Lei <ming.lei@redhat.com>, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [PATCH v2] sched/isolation: Allow "isolcpus=" to skip unknown sub-parameters
Date: Fri, 03 Apr 2020 22:27:17 +0200	[thread overview]
Message-ID: <87d08ol3h6.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20200403011559.GH103677@xz-x1>

Peter Xu <peterx@redhat.com> writes:
> On Thu, Apr 02, 2020 at 10:59:29AM -0400, Peter Xu wrote:
>> -		pr_warn("isolcpus: Error, unknown flag\n");
>> -		return 0;
>> +		/*
>> +		 * Skip unknown sub-parameter and validate that it is not
>> +		 * containing an invalid character.
>> +		 */
>> +		for (par = str, len = 0; *str && *str != ','; str++, len++)

lacks {


>> +			if (!isalpha(*str))
>> +				illegal = true;

lacks }

>> +
>> +		if (illegal) {
>> +			pr_warn("isolcpus: Invalid flag %.*s\n", len, par);
>> +			return 0;
>> +		}
>> +
>> +		pr_info("isolcpus: Skipped unknown flag %.*s\n", len, par);
>> +		str++;
>>  	}
>
> I just noticed this is still problematic if we want to mark this as
> stable, because "managed_irq" violate the "isalpha()" rule already...
> It means even if we apply this patch to the stable trees it'll still
> think managed_irq as illegal and ignore the whole isolcpus=.

		if (!isalpha(*str) && *str != '_')

which is what I told you a couple of days ago already.

Thanks,

        tglx

      reply	other threads:[~2020-04-03 20:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 14:59 [PATCH v2] sched/isolation: Allow "isolcpus=" to skip unknown sub-parameters Peter Xu
2020-04-03  1:15 ` Peter Xu
2020-04-03 20:27   ` Thomas Gleixner [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=87d08ol3h6.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=juri.lelli@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterx@redhat.com \
    --cc=peterz@infradead.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