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]
Message-Id: <20061015120714.b0d67b9d.pj@sgi.com>
Date:	Sun, 15 Oct 2006 12:07:14 -0700
From:	Paul Jackson <pj@....com>
To:	Joel Becker <Joel.Becker@...cle.com>
Cc:	matthltc@...ibm.com, linux-kernel@...r.kernel.org, gregkh@...e.de,
	sekharan@...ibm.com, akpm@...l.org, ckrm-tech@...ts.sourceforge.net
Subject: Re: [ckrm-tech] [PATCH 0/5] Allow more than PAGESIZE data read in
 configfs

Joel, responding to Matt, wrote:
> > Hmm, that suggests a good point. While some one *can* do that or:
> > 
> > ATTR=( $(cat /sys/kernel/config/ckrm/myresource/attr) )
> > 
> > the space available for environment variables is limited. So attempting
> > to store a large (What's "large"?) attribute in an environment variable
> > is a potentially buggy practice. This is a significant problem affecting
> > large attributes in general.
> 
> 	If you can't do it in sh, it's pretty much out of scope.  This
> is a taste rule I use, because like to shell program.  Sure, not the end
> of the world (not a hard rule, I guess), but worth thinking about.

I too like to shell program.  Such potentially long vectors can
be worked in the shell, just not placed in a single command line
argument or environment variable.

Constructs that do work (using the list of process id's in the
file /dev/cpuset/tasks for these examples) include:

  1.  while read pid
      do
	  ... do something with each $pid ...
      done < /dev/cpuset/tasks


  2.  < /dev/cpuset/tasks xargs ps -flp


  3.  sed -un p < /dev/cpuset/foo/tasks > /dev/cpuset/tasks

Such shell constructs for dealing with vectors that might be longer
than argument or environment length limits have been needed and known
for decades.

In an earlier message, Joel wrote:
> 	You're effectively suggesting that a specific attribute type of
> "repeated value of type X".  No mixed types, no exploded structures,
> just a "list of this attr" sort of thing.  This does fit my personal
> requirement of avoiding a generic, abusable system.

Yes - what I call above a "vector."

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@....com> 1.925.600.0401
-
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