XPost: linux.debian.bugs.dist
From: phil@hands.com
writes:
> Hi Philip
>
>> Very sorry about the slow reply -- a combination of debconf and family
>> holidays being rather distracting.
>
> No problem, Thanks for helping out with this.
>
>> I think I'd looked for that, and failed to find where the file was being
>> used.
>
> As I explained before, the created tmp file (tmpkbd.*) is referenced
> by in a script named `setupcon`(which is generated here[1]). This
> script is actually kept in '/bin/setupcon' in the initrd.
This conversation is probably not made clearer by the fact that there's
setupcon (outside the initrd) which generates setupcon (inside the
initrd) *sigh*
AFAICS $TMPFILE (configured to be tmpkbd.*) is being used in the (outer)
setupcon script in order to record the commands used in the (initrd)
setupcon that is being written to "$setupdir"/bin/setupcon
codesearch.debian.net seems to show that the two lines in (outer)
setupcon that refer to 'tmpkbd' are the only places where the string
'tmpkbd' occurs in Debian, so I'm assuming that $TMPFILE is the source
of your entropy -- please correct me if that's wrong.
$TMPFILE is then used to store a list of things that will need to be
copied to the initrd, and that list is then used to create
"$setupdir"/morefiles, but $TMPFILE looks like it ought to be in either
/run or /tmp, and those should be removed by the trap, so if it's ending
up under $setupdir, what is copying it there?
Your patch seems to assume that it is being copied in fileargs(), which
seems to imply that the tmpkbd.* filename is being passed as an argument
to one of the run() calls (if I'm reading the script correctly), but I
don't see where that's happening, and I don't yet understand why it's
happening.
If that _is_ what's happening, and if there's a good reason for it, then
I would think that the right place to fix the nondeterminism would be in
the run() call that's causing the copy to be made, rather than by
modifying the filename in fileargs(), but until I've understood what's
actually causing the 'tmpkbd.*' file to be copied into the initrd, it's
really quite hard to tell.
> Now, this script ('/bin/setupcon') is used in the initrd by the 'keymap'
initrd script [2].
> In fact the 'keymap' hook script [3] is what is calling the setupcon script
with the --setup-dir option.
>
> In my use case, this issue surfaced due to the use of the cryp
setup-initramfs package which triggers the run of the 'keymap' hook script
by
setting 'KEYMAP=y' here[4].
>
> There *maybe*(speculating, not sure) more packages which triggers this
'keymap' hook script.
>
> Apologies for this long answer. I hope this gives some context.
No, that's great, thanks -- anyway, my reply is longer :-/
The question that's still bothering me is:
Does anything within the resulting initrd actually make use of the
'keymap.*' file, and if so, where?
Cheers, Phil.
--
Philip Hands -- https://hands.com/~phil
--=-=-Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEE3/FBWs4yJ/zyBwfW0EujoAEl1cAFAmi8s44ACgkQ0EujoAEl
1cBmyA/+ML7/CXdXbLliknszuxMLvmqsithcON1Ybs8B/mXx31Lj3JMCNsU8zJO4
IMA4NwFTrx6a8xA32qr9nZumtpEpj3WrcrBjkdjW7pILgHgeU4FAOREpdauy0j/z
FNTVM4KRta5HLDYnHiUYIKY4r/KIwMe4y4LSQofaj7/ToEzVDLoCZSOd5rkjyhoj
7CkOB7EtBmpoW6p8eafQW8W9V/sprmqbqG/yUlUXe/xHfnWthEofDOFXMSekIcwX
NOAFv/5XC9H86TYaWP+YyrSsqYWrH9Qa/BEJuHTeS3gumRieMP0PS6z8GQqdU3q7
zSDbFd1W8ZWvZE/9XpyG8HYJGFfqfjfYFDJCkQbV7oiu7mH1XxA+v0kLT/WryDz8
n8QUqKzsBrFJbtJU+Gzjxhs79I2TJFMhszb/he440KNXSGXe0IMgQnChetyWOypT
gA9QzV6xFES40TPaRDxvOT4YeMnsBMhvEVYgi1ervHUYzUH42Q4shuZNhKaUwVO7
s9icSmai8R4gtLirZ6stKJeZjzw6CyYi6DxQ7djOq8ATSkeKNW4ItplcM35dTHEe
jBAGTWFFBLHm6wSl9p3Sj47EEsH86BieO67SUUAVGiZ7sT5+M68iAymdwbdtG2Yn
fr3sw4elCAJDsGpttsVdEz81iRygjzBtAZiGUipWYQ91mU9L+j4€Lb
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)
|