Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1669517

Re: [PATCH v7 13/26] x86/insn-eval: Add function to get default params of code segment

From Borislav Petkov <bp@suse.de>
Newsgroups linux.kernel
Subject Re: [PATCH v7 13/26] x86/insn-eval: Add function to get default params of code segment
Date 2017-06-19 19:20 +0200
Message-ID <tU8vg-5zu-3@gated-at.bofh.it> (permalink)
References <tDPZD-5j6-3@gated-at.bofh.it> <tDPZE-5j6-19@gated-at.bofh.it> <tPIJ4-6JB-13@gated-at.bofh.it> <tSICR-6z6-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jun 15, 2017 at 12:24:35PM -0700, Ricardo Neri wrote:
> OK. This makes sense. Perhaps I can use a couple of #define's to set and
> get the the address and operand sizes in a single u8. This would make
> the code more readable.

Sure but don't get too tangled in defines if it is going to be used
in one place only. Sometimes a clear comment and the naked bitwise
operations are already clear enough.

> Alternatively, I can do desc->type & BIT(3) to avoid using desc-b, which
> is less elegant.

Sure.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH v7 13/26] x86/insn-eval: Add function to get default  params of code segment Ricardo Neri <ricardo.neri-calderon@linux.intel.com> - 2017-06-15 21:30 +0200
  Re: [PATCH v7 13/26] x86/insn-eval: Add function to get default  params of code segment Borislav Petkov <bp@suse.de> - 2017-06-19 19:20 +0200

csiph-web