Re: [PATCH] 537390: reIPL is calculating the boot drive incorrectly

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

 



Steffen Maier <maier@xxxxxxxxxxxxxxxxxx> wrote on 11/17/2009 09:18:42 PM:

> >> function doreboot()
> >> {
> >> +    if [ -e "/sys/firmware/reipl" ]; then
> >> +     read REIPL_TYPE < /sys/firmware/reipl/reipl_type
> >> +     echo "reipl_type=$REIPL_TYPE"
> >> +     pushd /sys/firmware/reipl/$REIPL_TYPE >/dev/null 2>&1
>
> I see two problems with the informative code. First, anaconda supports
> the two reipl types ccw for DASD and fcp for zFCP. The kernel interface
> also supports other stuff such as nss (named saved segments). I think we
> should only descend into the reipl type specific subdirectory and get
> additional information for the two types anaconda supports because
> anaconda does not know anything about the other types and how to
> interpret their information. Which is fine, BTW, since those types are
> not needed for installation.


While the kernel interface supports other types, anaconda only sets one
of the two.  Which would make this code safe, right?  It also is simpler
by keeping tests and specialized code out of the picture.

> >> +     for i in *; do
> >> +         echo "$i=`cat $i`"
>
> I'm not sure, if all sysfs attributes will always contain printable
> ASCII text. I wouldn't want any potential binary data misconfigure the
> console. Maybe a hexdump (e.g. od -xa) of the attributes' content would
> make this safer?

Yeah, we could change the `cat` to `od -xa`.  Since the reIPL code only
ever wrote ASCII data, I thought that's what it would only contain.  And,
if some other reIPL value were ever set, then showing safe informational
data on where it is rebooting into would be harmless what ever it contained.

--
Mark

You must be the change you wish to see in the world. -- Mahatma Gandhi
Worrying is praying for that you do not wish to happen.

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux