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

Re: [Xen-devel] [PATCH v2 1/3] console: allow log level threshold adjustments



>>> On 07.03.16 at 15:41, <konrad@xxxxxxxxxx> wrote:
> On Mon, Mar 7, 2016 at 5:44 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>>>> On 04.03.16 at 21:55, <konrad.wilk@xxxxxxxxxx> wrote:
>>>> +    case XEN_SYSCTL_LOGLVL_set:
>>>> +        if ( (op->host.lower_thresh >= 0 && op->host.upper_thresh >= 0 &&
>>>> +              op->host.lower_thresh > op->host.upper_thresh) ||
>>>> +             (op->guest.lower_thresh >= 0 && op->guest.upper_thresh >= 0 
>>>> &&
>>>> +              op->guest.lower_thresh > op->guest.upper_thresh) )
>>>> +            return -EINVAL;
>>>> +
>>>> +        do_loglvl_op(&op->host, &xenlog_lower_thresh,
>>>> +                     &xenlog_upper_thresh, "standard");
>>>
>>>
>>> The keyboard and the sysctl both allow the user to go beyound the XENLOG_
>>> values we have. That is you could set the lower and upper threshold to be
>>> at 9 (or more) say. It will have the same effect as XENLOG_DEBUG (which is
>>> 4)
>>> as printk_prefix_check seems to have a simple < check.
>>>
>>> But perhaps to be correct only accept only proper values? Not allow
>>> the system admin to set the level to say 31415?
>>
>> Since there's no bad side effect from doing so I opted for not
>> adding respective extra checks, keeping the code easier to read.
>>
> 
> Fair enough. Could you perhaps just add that in the commit description?

Sure.

> Also I noticed that this patch is missing an XSM check in flask_sysctl
> - could that be added please?

Of course; it's pretty ugly that one doesn't notice the lack thereof
via a build failure.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.