Re: [RFC PATCH v4 28/28] x86: Add support to make use of Secure Memory Encryption

From: Borislav Petkov
Date: Tue Mar 07 2017 - 12:48:26 EST


On Tue, Mar 07, 2017 at 10:05:00AM -0600, Tom Lendacky wrote:
> I can do that. Because phys_base hasn't been updated yet, I'll have to
> create "on" and "off" constants and get their address in a similar way
> to the command line option so that I can do the strncmp properly.

Actually, wouldn't it be simpler to inspect the passed in buffer for
containing the chars 'o', 'n' - in that order, or 'o', 'f', 'f' - in
that order too? Because __cmdline_find_option() does copy the option
characters into the buffer.

Then you wouldn't need those "on" and "off" constants...

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.