src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/SpeculativeExecutionAttacksMitigations.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 54084 84f10bbf993f
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
     1 /*
     1 /*
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    25 package org.graalvm.compiler.core.common;
    25 package org.graalvm.compiler.core.common;
    26 
    26 
    27 import org.graalvm.compiler.options.EnumOptionKey;
    27 import org.graalvm.compiler.options.EnumOptionKey;
    28 import org.graalvm.compiler.options.Option;
    28 import org.graalvm.compiler.options.Option;
    29 import org.graalvm.compiler.options.OptionKey;
    29 import org.graalvm.compiler.options.OptionKey;
       
    30 import org.graalvm.compiler.options.OptionStability;
    30 import org.graalvm.compiler.options.OptionType;
    31 import org.graalvm.compiler.options.OptionType;
    31 
    32 
    32 public enum SpeculativeExecutionAttacksMitigations {
    33 public enum SpeculativeExecutionAttacksMitigations {
    33     None,
    34     None,
    34     AllTargets,
    35     AllTargets,
    37 
    38 
    38     public static class Options {
    39     public static class Options {
    39         // @formatter:off
    40         // @formatter:off
    40         @Option(help = "file:doc-files/MitigateSpeculativeExecutionAttacksHelp.txt")
    41         @Option(help = "file:doc-files/MitigateSpeculativeExecutionAttacksHelp.txt")
    41         public static final EnumOptionKey<SpeculativeExecutionAttacksMitigations> MitigateSpeculativeExecutionAttacks = new EnumOptionKey<>(None);
    42         public static final EnumOptionKey<SpeculativeExecutionAttacksMitigations> MitigateSpeculativeExecutionAttacks = new EnumOptionKey<>(None);
    42         @Option(help = "Use index masking after bounds check to mitigate speculative execution attacks.", type = OptionType.User)
    43         @Option(help = "Use index masking after bounds check to mitigate speculative execution attacks.", type = OptionType.User, stability = OptionStability.STABLE)
    43         public static final OptionKey<Boolean> UseIndexMasking = new OptionKey<>(false);
    44         public static final OptionKey<Boolean> UseIndexMasking = new OptionKey<>(false);
    44         // @formatter:on
    45         // @formatter:on
    45     }
    46     }
    46 }
    47 }