hjl / source-git / glibc

Forked from source-git/glibc 3 years ago
Clone

Blame sysdeps/x86/cet-control.h

85cee3
/* x86 CET tuning.
85cee3
   This file is part of the GNU C Library.
85cee3
   Copyright (C) 2018 Free Software Foundation, Inc.
85cee3
85cee3
   The GNU C Library is free software; you can redistribute it and/or
85cee3
   modify it under the terms of the GNU Lesser General Public
85cee3
   License as published by the Free Software Foundation; either
85cee3
   version 2.1 of the License, or (at your option) any later version.
85cee3
85cee3
   The GNU C Library is distributed in the hope that it will be useful,
85cee3
   but WITHOUT ANY WARRANTY; without even the implied warranty of
85cee3
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
85cee3
   Lesser General Public License for more details.
85cee3
85cee3
   You should have received a copy of the GNU Lesser General Public
85cee3
   License along with the GNU C Library; if not, see
85cee3
   <http://www.gnu.org/licenses/>.  */
85cee3
85cee3
#ifndef _CET_CONTROL_H
85cee3
#define _CET_CONTROL_H
85cee3
85cee3
/* For each CET feature, IBT and SHSTK, valid control values.  */
85cee3
enum dl_x86_cet_control
85cee3
{
85cee3
  /* Enable CET features based on ELF property note.  */
85cee3
  cet_elf_property = 0,
85cee3
  /* Always enable CET features.  */
85cee3
  cet_always_on,
85cee3
  /* Always disable CET features.  */
85cee3
  cet_always_off,
85cee3
  /* Enable CET features permissively.  */
85cee3
  cet_permissive
85cee3
};
85cee3
85cee3
struct dl_x86_feature_control
85cee3
{
85cee3
  enum dl_x86_cet_control ibt : 2;
85cee3
  enum dl_x86_cet_control shstk : 2;
85cee3
};
85cee3
85cee3
#endif /* cet-control.h */