Blame sysdeps/x86/cet-control.h

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