lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 19 Nov 2012 13:54:26 +0100
From:	Daniel Wagner <wagi@...om.org>
To:	Tejun Heo <tj@...nel.org>
CC:	serge.hallyn@...onical.com, ebiederm@...ssion.com,
	nhorman@...driver.com, tgraf@...g.ch, davem@...emloft.net,
	lizefan@...wei.com, cgroups@...r.kernel.org,
	containers@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] netcls_cgroup: introduce cgroup_cls_state->is_local

Hi Tejun,

On 17.11.2012 04:31, Tejun Heo wrote:
> -static int write_classid(struct cgroup *cgrp, struct cftype *cft, u64 value)
> +static int write_classid(struct cgroup *cgrp, struct cftype *cft,
> +			 const char *buf)
>   {
> +	struct cgroup_cls_state *cs = cgrp_cls_state(cgrp);
> +	s64 v;
> +
> +	if (sscanf(buf, "%lld", &v) != 1)
> +		return -EINVAL;
> +

This changes the user API slightly. cgroup_write_u64() uses 
simple_stroull() to parse the string. simple_stroull() allows to use 
either 0x1234 or 1234 as input. sscanf() will only handle the later type 
of input.

I noticed this because my test script stopped working:

    mkdir /sys/fs/cgroup/net_cls/a
    echo 0x100002 > /sys/fs/cgroup/net_cls/a/net_cls.classid # 10:2

    tc qdisc add dev $DEV root handle 10: htb
    tc class add dev $DEV parent 10: classid 10:2 htb rate 1mbit
    tc qdisc add dev $DEV parent 10:2 handle 20: sfq perturb 10

I am not completely sure if my setup is 100% correct, but at least
it seems to make something :)

cheers,
daniel

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ