Blame sysdeps/x86/cet-control.h

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