Vianney Perchet

187 papers A* 52A 15B 7Misc 1Journal 106Unranked 6
YearRankTypeTitle / Venue / Authors
2026 J jnl
CoRR
Giovanni Montanari, Côme Fiegel, Corentin Pla, Aadirupa Saha, Vianney Perchet
2025 J jnl
CoRR
Marius Potfer, Vianney Perchet
2025 A* conf
ICLR
Solenne Gaucher, Martino Bernasconi, Matteo Castiglioni, Andrea Celli, Vianney Perchet
2025 J jnl
CoRR
Marius Potfer, Dorian Baudry, Hugo Richard, Vianney Perchet, Cheng Wan
2025 J jnl
CoRR
Ahmed Ben Yahmed, Hafedh El Ferchichi, Marc Abeille, Vianney Perchet
2025 A conf
AISTATS
Ziyad Benomar, Vianney Perchet
2025 J jnl
CoRR
Ziyad Benomar, Vianney Perchet
2025 J jnl
CoRR
Corentin Pla, Hugo Richard, Marc Abeille, Nadav Merlis, Vianney Perchet
2025 J jnl
CoRR
Maria Cherifa, Clément Calauzènes, Vianney Perchet
2025 A* conf
ICML
Ziyad Benomar, Lorenzo Croissant, Vianney Perchet, Spyros Angelopoulos
2025 J jnl
CoRR
Ziyad Benomar, Lorenzo Croissant, Vianney Perchet, Spyros Angelopoulos
2025 A* conf
SODA
Mathieu Molina, Nicolas Gast, Patrick Loiseau, Vianney Perchet
2025 J jnl
CoRR
Ahmed Ben Yahmed, Clément Calauzènes, Vianney Perchet
2025 A* conf
ICML
Côme Fiegel, Pierre Ménard, Tadashi Kozuno, Michal Valko, Vianney Perchet
2024 J jnl
J. Mach. Learn. Res.
Etienne Boursier, Vianney Perchet
2024 A* conf
ICML
Hafedh El Ferchichi, Matthieu Lerasle, Vianney Perchet
2024 A* conf
NeurIPS
Ziyad Benomar, Evgenii Chzhen, Nicolas Schreuder, Vianney Perchet
2024 J jnl
Oper. Res.
Vianney Perchet, Philippe Rigollet, Thibaut Le Gouic
2024 A* conf
EC
Atulya Jain, Vianney Perchet
2024 J jnl
CoRR
Atulya Jain, Vianney Perchet
2024 A conf
AISTATS
Hugo Richard, Etienne Boursier, Vianney Perchet
2024 A* conf
NeurIPS
Felipe Garrido-Lucero, Benjamin Heymann, Maxime Vono, Patrick Loiseau, Vianney Perchet
2024 J jnl
CoRR
Maria Cherifa, Clément Calauzènes, Vianney Perchet
2024 J jnl
CoRR
Solenne Gaucher, Martino Bernasconi, Matteo Castiglioni, Andrea Celli, Vianney Perchet
2024 A* conf
NeurIPS
Matilde Tullii, Solenne Gaucher, Nadav Merlis, Vianney Perchet
2024 J jnl
CoRR
Matilde Tullii, Solenne Gaucher, Nadav Merlis, Vianney Perchet
2024 A* conf
NeurIPS
Marius Potfer, Dorian Baudry, Hugo Richard, Vianney Perchet, Cheng Wan
2024 A* conf
NeurIPS
Côme Fiegel, Pierre Ménard, Tadashi Kozuno, Rémi Munos, Vianney Perchet, Michal Valko
2024 A* conf
NeurIPS
Ziyad Benomar, Dorian Baudry, Vianney Perchet
2024 J jnl
CoRR
Ziyad Benomar, Dorian Baudry, Vianney Perchet
2024 A* conf
COLT
Charles Arnal, Vivien Cabannes, Vianney Perchet
2024 J jnl
CoRR
Charles Arnal, Vivien Cabannes, Vianney Perchet
2024 A conf
AISTATS
Dorian Baudry, Nadav Merlis, Mathieu Benjamin Molina, Hugo Richard, Vianney Perchet
2024 A* conf
ICML
Ziyad Benomar, Vianney Perchet
2024 J jnl
CoRR
Ziyad Benomar, Vianney Perchet
2024 conf
WISE (5)
Matilde Tullii, Solenne Gaucher, Hugo Richard, Eustache Diemert, Vianney Perchet, Alain Rakotomamonjy, Clément Calauzènes, Maxime Vono
2024 A* conf
NeurIPS
Dorian Baudry, Hugo Richard, Maria Cherifa, Vianney Perchet, Clément Calauzènes
2024 J jnl
CoRR
Mathieu Molina, Nicolas Gast, Patrick Loiseau, Vianney Perchet
2024 J jnl
CoRR
Shiyun Lin, Simon Mauras, Nadav Merlis, Vianney Perchet
2024 Misc conf
ICASSP
Ahmed Ben Yahmed, Clément Calauzènes, Vianney Perchet
2024 J jnl
CoRR
Ahmed Ben Yahmed, Clément Calauzènes, Vianney Perchet
2024 A* conf
NeurIPS
Ahmed Ben Yahmed, Clément Calauzènes, Vianney Perchet
2024 J jnl
CoRR
Rémi Castera, Felipe Garrido-Lucero, Mathieu Molina, Simon Mauras, Patrick Loiseau, Vianney Perchet
2024 A* conf
NeurIPS
Nadav Merlis, Dorian Baudry, Vianney Perchet
2024 J jnl
CoRR
Nadav Merlis, Dorian Baudry, Vianney Perchet
2024 J jnl
Math. Program.
Etienne Boursier, Vianney Perchet
2023 A* conf
ICML
Côme Fiegel, Pierre Ménard, Tadashi Kozuno, Rémi Munos, Vianney Perchet, Michal Valko
2023 J jnl
CoRR
Ziyad Benomar, Evgenii Chzhen, Nicolas Schreuder, Vianney Perchet
2023 A* conf
NeurIPS
Ziyad Benomar, Vianney Perchet
2023 J jnl
CoRR
Hugo Richard, Etienne Boursier, Vianney Perchet
2023 J jnl
CoRR
Felipe Garrido-Lucero, Benjamin Heymann, Maxime Vono, Patrick Loiseau, Vianney Perchet
2023 J jnl
CoRR
Côme Fiegel, Pierre Ménard, Tadashi Kozuno, Rémi Munos, Vianney Perchet, Michal Valko
2023 A* conf
ICML
Nadav Merlis, Hugo Richard, Flore Sentenac, Corentin Odic, Mathieu Molina, Vianney Perchet
2023 J jnl
CoRR
Flore Sentenac, Nathan Noiry, Matthieu Lerasle, Laurent Ménard, Vianney Perchet
2023 A conf
AISTATS
Sasila Ilandarideva, Yannis Bekri, Anatoli B. Juditsky, Vianney Perchet
2023 A* conf
NeurIPS
Mathieu Molina, Nicolas Gast, Patrick Loiseau, Vianney Perchet
2023 J jnl
CoRR
Mathieu Molina, Nicolas Gast, Patrick Loiseau, Vianney Perchet
2022 J jnl
CoRR
Etienne Boursier, Vianney Perchet
2022 A* conf
NeurIPS
Vivien Cabannes, Francis R. Bach, Vianney Perchet, Alessandro Rudi
2022 J jnl
CoRR
Vivien Cabannes, Francis R. Bach, Vianney Perchet, Alessandro Rudi
2022 J jnl
CoRR
Côme Fiegel, Pierre Ménard, Tadashi Kozuno, Rémi Munos, Vianney Perchet, Michal Valko
2022 A* conf
EC
Vianney Perchet, Philippe Rigollet, Thibaut Le Gouic
2022 J jnl
CoRR
Vianney Perchet, Philippe Rigollet, Thibaut Le Gouic
2022 A conf
AISTATS
Evrard Garcelon, Matteo Pirotta, Vianney Perchet
2022 J jnl
Found. Trends Mach. Learn.
Thomas Nedelec, Clément Calauzènes, Noureddine El Karoui, Vianney Perchet
2022 B conf
ALT
Evrard Garcelon, Kamalika Chaudhuri, Vianney Perchet, Matteo Pirotta
2022 J jnl
Oper. Res.
Thomas Nedelec, Clément Calauzènes, Vianney Perchet, Noureddine El Karoui
2022 B conf
ALT
Etienne Boursier, Vianney Perchet, Marco Scarsini
2022 J jnl
CoRR
Hugo Richard, Flore Sentenac, Corentin Odic, Mathieu Molina, Vianney Perchet
2022 J jnl
CoRR
Sasila Ilandarideva, Yannis Bekri, Anatoli B. Juditsky, Vianney Perchet
2021 J jnl
CoRR
Firas Jarboui, Vianney Perchet
2021 A* conf
NeurIPS
Nicolò Cesa-Bianchi, Tommaso Cesari, Yishay Mansour, Vianney Perchet
2021 A conf
AAMAS
Thomas Nedelec, Jules Baudet, Vianney Perchet, Noureddine El Karoui
2021 J jnl
CoRR
Matthieu Jedor, Jonathan Louëdec, Vianney Perchet
2021 A* conf
NeurIPS
Flore Sentenac, Etienne Boursier, Vianney Perchet
2021 J jnl
CoRR
Flore Sentenac, Etienne Boursier, Vianney Perchet
2021 J jnl
CoRR
Evrard Garcelon, Vianney Perchet, Matteo Pirotta
2021 A* conf
NeurIPS
Evrard Garcelon, Vianney Perchet, Ciara Pike-Burke, Matteo Pirotta
2021 A* conf
NeurIPS
Etienne Boursier, Tristan Garrec, Vianney Perchet, Marco Scarsini
2021 J jnl
CoRR
Etienne Boursier, Tristan Garrec, Vianney Perchet, Marco Scarsini
2021 J jnl
CoRR
Firas Jarboui, Vianney Perchet
2021 A* conf
ICML
Xavier Fontaine, Pierre Perrault, Michal Valko, Vianney Perchet
2021 A* conf
NeurIPS
Nathan Noiry, Vianney Perchet, Flore Sentenac
2021 J jnl
CoRR
Nathan Noiry, Flore Sentenac, Vianney Perchet
2021 A* conf
NeurIPS
Reda Ouhamma, Odalric-Ambrym Maillard, Vianney Perchet
2021 J jnl
CoRR
Reda Ouhamma, Rémy Degenne, Pierre Gaillard, Vianney Perchet
2021 J jnl
CoRR
Evrard Garcelon, Kamalika Chaudhuri, Vianney Perchet, Matteo Pirotta
2021 A* conf
ICML
Flore Sentenac, Jialin Yi, Clément Calauzènes, Vianney Perchet, Milan Vojnovic
2021 J jnl
CoRR
Flore Sentenac, Jialin Yi, Clément Calauzènes, Vianney Perchet, Milan Vojnovic
2021 J jnl
CoRR
Firas Jarboui, Vianney Perchet
2021 A* conf
NeurIPS
Reda Ouhamma, Odalric-Ambrym Maillard, Vianney Perchet
2021 J jnl
CoRR
Reda Ouhamma, Odalric Maillard, Vianney Perchet
2021 J jnl
CoRR
Firas Jarboui, Vianney Perchet
2020 A conf
AISTATS
Abbas Mehrabian, Etienne Boursier, Emilie Kaufmann, Vianney Perchet
2020 B conf
ALT
Xavier Fontaine, Shie Mannor, Vianney Perchet
2020 conf
CIRCLE
Matthieu Jedor, Jonathan Louëdec, Vianney Perchet
2020 J jnl
CoRR
Matthieu Jedor, Jonathan Louëdec, Vianney Perchet
2020 A* conf
COLT
Pierre Perrault, Michal Valko, Vianney Perchet
2020 B conf
ALT
Vianney Perchet
2020 J jnl
CoRR
Thomas Nedelec, Clément Calauzènes, Noureddine El Karoui, Vianney Perchet
2020 J jnl
CoRR
Matthieu Jedor, Jonathan Louëdec, Vianney Perchet
2020 J jnl
CoRR
Evrard Garcelon, Vianney Perchet, Ciara Pike-Burke, Matteo Pirotta
2020 A conf
AISTATS
Thomas Nedelec, Clément Calauzènes, Vianney Perchet, Noureddine El Karoui
2020 A* conf
NeurIPS
Sandrine Péché, Vianney Perchet
2020 J jnl
CoRR
Sandrine Péché, Vianney Perchet
2020 A* conf
COLT
Etienne Boursier, Vianney Perchet
2020 J jnl
CoRR
Etienne Boursier, Vianney Perchet
2020 J jnl
CoRR
Etienne Boursier, Vianney Perchet, Marco Scarsini
2020 A* conf
NeurIPS
Pierre Perrault, Etienne Boursier, Michal Valko, Vianney Perchet
2020 J jnl
CoRR
Pierre Perrault, Etienne Boursier, Vianney Perchet, Michal Valko
2020 B conf
ICPR
Firas Jarboui, Vianney Perchet
2020 A conf
AISTATS
Etienne Boursier, Vianney Perchet
2019 J jnl
CoRR
Xavier Fontaine, Shie Mannor, Vianney Perchet
2019 J jnl
CoRR
Xavier Fontaine, Pierre Perrault, Vianney Perchet
2019 J jnl
CoRR
Thomas Nedelec, Jules Baudet, Vianney Perchet, Noureddine El Karoui
2019 A conf
AISTATS
Rémy Degenne, Thomas Nedelec, Clément Calauzènes, Vianney Perchet
2019 A* conf
NeurIPS
Matthieu Jedor, Vianney Perchet, Jonathan Louëdec
2019 B conf
ALT
Nicolò Cesa-Bianchi, Tommaso Cesari, Vianney Perchet
2019 J jnl
CoRR
Pierre Perrault, Vianney Perchet, Michal Valko
2019 A* conf
ICML
Pierre Perrault, Vianney Perchet, Michal Valko
2019 A conf
AISTATS
Pierre Perrault, Vianney Perchet, Michal Valko
2019 conf
WWW (Companion Volume)
Thomas Nedelec, Noureddine El Karoui, Vianney Perchet
2019 A* conf
ICML
Thomas Nedelec, Noureddine El Karoui, Vianney Perchet
2019 J jnl
CoRR
Thomas Nedelec, Noureddine El Karoui, Vianney Perchet
2019 conf
EMOOCs
Firas Jarboui, Célya Gruson-Daniel, Alain Durmus, Vincent Rocchisani, Sophie-Helene Goulet Ebongue, Anneliese Depoux, Wilfried Kirschenmann, Vianney Perchet
2019 J jnl
CoRR
Firas Jarboui, Célya Gruson-Daniel, Alain Durmus, Vincent Rocchisani, Sophie-Helene Goulet Ebongue, Anneliese Depoux, Wilfried Kirschenmann, Vianney Perchet
2019 J jnl
CoRR
Etienne Boursier, Vianney Perchet
2019 A conf
AISTATS
Xavier Fontaine, Quentin Berthet, Vianney Perchet
2019 J jnl
CoRR
Nicolò Cesa-Bianchi, Tommaso Cesari, Yishay Mansour, Vianney Perchet
2019 J jnl
CoRR
Clément Calauzènes, Thomas Nedelec, Vianney Perchet, Noureddine El Karoui
2019 A* conf
NeurIPS
Etienne Boursier, Vianney Perchet
2018 J jnl
CoRR
Vianney Perchet, Marc Quincampoix
2018 J jnl
Games Econ. Behav.
János Flesch, Rida Laraki, Vianney Perchet
2018 A conf
UAI
Rémy Degenne, Evrard Garcelon, Vianney Perchet
2018 J jnl
CoRR
Rémy Degenne, Evrard Garcelon, Vianney Perchet
2018 J jnl
CoRR
Rémy Degenne, Thomas Nedelec, Clément Calauzènes, Vianney Perchet
2018 A* ed.
COLT
Sébastien Bubeck, Vianney Perchet, Philippe Rigollet
2018 J jnl
CoRR
Nicolò Cesa-Bianchi, Tommaso Cesari, Vianney Perchet
2018 J jnl
CoRR
Marc Abeille, Clément Calauzènes, Noureddine El Karoui, Thomas Nedelec, Vianney Perchet
2018 J jnl
CoRR
Pierre Perrault, Vianney Perchet, Michal Valko
2018 J jnl
CoRR
Xavier Fontaine, Quentin Berthet, Vianney Perchet
2018 J jnl
CoRR
Etienne Boursier, Vianney Perchet
2018 J jnl
CoRR
Thomas Nedelec, Marc Abeille, Clément Calauzènes, Noureddine El Karoui, Benjamin Heymann, Vianney Perchet
2017 J jnl
CoRR
Thomas Nedelec, Nicolas Le Roux, Vianney Perchet
2017 J jnl
CoRR
Quentin Berthet, Vianney Perchet
2017 conf
NIPS
Quentin Berthet, Vianney Perchet
2017 A conf
AISTATS
Joon Kwon, Vianney Perchet
2017 A* conf
COLT
Joon Kwon, Vianney Perchet, Claire Vernade
2017 J jnl
CoRR
Joon Kwon, Vianney Perchet, Claire Vernade
2017 A conf
UAI
Claire Vernade, Olivier Cappé, Vianney Perchet
2017 J jnl
CoRR
Claire Vernade, Olivier Cappé, Vianney Perchet
2016 A* conf
ICML
Rémy Degenne, Vianney Perchet
2016 J jnl
CoRR
János Flesch, Rida Laraki, Vianney Perchet
2016 conf
NIPS
Rémy Degenne, Vianney Perchet
2016 J jnl
CoRR
Rémy Degenne, Vianney Perchet
2016 J jnl
J. Mach. Learn. Res.
Joon Kwon, Vianney Perchet
2016 J jnl
CoRR
Francis R. Bach, Vianney Perchet
2016 A* conf
COLT
Francis R. Bach, Vianney Perchet
2016 A* conf
COLT
János Flesch, Rida Laraki, Vianney Perchet
2016 A* conf
COLT
Jonathan Weed, Vianney Perchet, Philippe Rigollet
2016 J jnl
Qual. Reliab. Eng. Int.
Guillaume Merle, Jean-Marc Roussel, Jean-Jacques Lesage, Vianney Perchet, Nicolas Vayatis
2015 A* conf
COLT
Vianney Perchet, Philippe Rigollet, Sylvain Chassang, Erik Snowberg
2015 J jnl
Dyn. Games Appl.
Vianney Perchet
2015 J jnl
CoRR
Joon Kwon, Vianney Perchet
2015 J jnl
Math. Oper. Res.
Vianney Perchet, Marc Quincampoix
2015 J jnl
CoRR
Jonathan Weed, Vianney Perchet, Philippe Rigollet
2014 J jnl
RAIRO Oper. Res.
Vianney Perchet
2014 A* conf
COLT
Shie Mannor, Vianney Perchet, Gilles Stoltz
2014 J jnl
CoRR
Shie Mannor, Vianney Perchet, Gilles Stoltz
2014 A* conf
ICML
Emile Contal, Vianney Perchet, Nicolas Vayatis
2014 J jnl
J. Mach. Learn. Res.
Shie Mannor, Vianney Perchet, Gilles Stoltz
2013 J jnl
CoRR
Shie Mannor, Vianney Perchet, Gilles Stoltz
2013 J jnl
CoRR
Vianney Perchet
2013 A* conf
COLT
Vianney Perchet, Shie Mannor
2013 J jnl
CoRR
Sébastien Bubeck, Vianney Perchet, Philippe Rigollet
2013 A* conf
COLT
Sébastien Bubeck, Vianney Perchet, Philippe Rigollet
2013 J jnl
CoRR
Vianney Perchet
2013 J jnl
CoRR
Vianney Perchet, Marc Quincampoix
2011 J jnl
CoRR
Vianney Perchet
2011 J jnl
J. Optim. Theory Appl.
Vianney Perchet
2011 J jnl
CoRR
Vianney Perchet
2011 J jnl
J. Mach. Learn. Res.
Vianney Perchet
2011 J jnl
CoRR
Shie Mannor, Vianney Perchet, Gilles Stoltz
2011 A* conf
COLT
Shie Mannor, Vianney Perchet, Gilles Stoltz
2011 J jnl
CoRR
Vianney Perchet, Philippe Rigollet
2010 J jnl
CoRR
Vianney Perchet
2009 B conf
ALT
Vianney Perchet
redb/extractors/elf_extractors/elf_notes.py
← Index redb/extractors/elf_extractors/elf_notes.py python
import inspect
import binascii
from datetime import datetime, timezone
from typing import Any, List, Dict

from elftools.elf.elffile import ELFFile
from elftools.common.exceptions import ELFError

from redb.extractors.enum import Tag
from redb.extractors.elf_extractor import ELFExtractor
from redb.models.dataclasses import ELFNote


class ELFNotesExtractor(ELFExtractor):

    def __init__(
        self,
        filepath,
        log,
        exporters=None,
        index_prefix=None,
        elastic_index=None,
        known_benign=False,
        known_malicious=False,
        elf=None,
    ):
        super().__init__(
            filepath,
            log,
            exporters,
            index_prefix,
            elastic_index,
            known_benign,
            known_malicious,
            elf,
        )
        self.elf_notes = []
        self.elastic_index = self.index_prefix + "-elf_notes"
        self.log.debug(inspect.currentframe().f_code.co_name)

    def _get_note_type_string(self, note_type: int, note_name: str) -> str:
        """Convert note type number to human-readable string."""

        # GNU-specific note types
        if note_name == "GNU":
            gnu_types = {
                1: "NT_GNU_ABI_TAG",
                2: "NT_GNU_HWCAP",
                3: "NT_GNU_BUILD_ID",
                4: "NT_GNU_GOLD_VERSION",
                5: "NT_GNU_PROPERTY_TYPE_0"
            }
            return gnu_types.get(note_type, f"NT_GNU_UNKNOWN_{note_type}")

        # Generic note types
        generic_types = {
            1: "NT_PRSTATUS",
            2: "NT_FPREGSET",
            3: "NT_PRPSINFO",
            4: "NT_TASKSTRUCT",
            5: "NT_AUXV",
            6: "NT_PSTATUS",
            7: "NT_FPREGS",
            8: "NT_PSINFO",
            9: "NT_PRCRED",
            10: "NT_UTSNAME",
            11: "NT_LWPSTATUS",
            12: "NT_LWPSINFO",
            13: "NT_PRFPXREG"
        }

        return generic_types.get(note_type, f"NT_UNKNOWN_{note_type}")

    def _format_note_description(self, note_desc, note_type: int, note_name: str) -> str:
        """Format note description based on type for human readability."""
        try:
            if not note_desc:
                return ""

            # Handle build ID specifically (common case)
            if note_name == "GNU" and note_type == 3:  # NT_GNU_BUILD_ID
                if isinstance(note_desc, bytes):
                    return binascii.hexlify(note_desc).decode('ascii')
                return str(note_desc)

            # Handle ABI tag
            if note_name == "GNU" and note_type == 1:  # NT_GNU_ABI_TAG
                if isinstance(note_desc, bytes) and len(note_desc) >= 16:
                    # ABI tag contains OS, major, minor, subminor
                    import struct
                    try:
                        os_val, major, minor, subminor = struct.unpack('<IIII', note_desc[:16])
                        os_names = {0: "Linux", 1: "GNU", 2: "Solaris", 3: "FreeBSD"}
                        os_name = os_names.get(os_val, f"OS_{os_val}")
                        return f"{os_name} {major}.{minor}.{subminor}"
                    except:
                        pass

            # For binary data, convert to hex
            if isinstance(note_desc, bytes):
                # Limit size for very large descriptions
                if len(note_desc) > 256:
                    return binascii.hexlify(note_desc[:256]).decode('ascii') + "..."
                return binascii.hexlify(note_desc).decode('ascii')

            # For string data
            if isinstance(note_desc, str):
                return note_desc

            # Fallback
            return str(note_desc)

        except Exception as e:
            self.log.error(f"Error formatting note description: {e}")
            return str(note_desc) if note_desc else ""

    def _extract_note_data(self, note, section_name: str) -> ELFNote:
        """Extract data from a single note entry."""
        try:
            # Get note properties
            note_name = note.get('n_name', '').rstrip('\x00') if note.get('n_name') else ""
            note_type_raw = note.get('n_type', 0)
            note_desc_raw = note.get('n_desc', b'')

            # Handle note_type - pyelftools may return string or int
            if isinstance(note_type_raw, str):
                # pyelftools returned the type as a string like 'NT_GNU_BUILD_ID'
                note_type_str = note_type_raw
                # Map known string types to integers
                note_type_map = {
                    'NT_GNU_ABI_TAG': 1,
                    'NT_GNU_HWCAP': 2,
                    'NT_GNU_BUILD_ID': 3,
                    'NT_GNU_GOLD_VERSION': 4,
                    'NT_GNU_PROPERTY_TYPE_0': 5,
                    'NT_PRSTATUS': 1,
                    'NT_FPREGSET': 2,
                    'NT_PRPSINFO': 3,
                    'NT_TASKSTRUCT': 4,
                    'NT_AUXV': 5,
                    'NT_PSTATUS': 6,
                    'NT_FPREGS': 7,
                    'NT_PSINFO': 8,
                    'NT_PRCRED': 9,
                    'NT_UTSNAME': 10,
                    'NT_LWPSTATUS': 11,
                    'NT_LWPSINFO': 12,
                    'NT_PRFPXREG': 13,
                }
                note_type = note_type_map.get(note_type_raw, 0)
            else:
                note_type = note_type_raw
                # Get human-readable type string
                note_type_str = self._get_note_type_string(note_type, note_name)

            # Format description
            note_desc = self._format_note_description(note_desc_raw, note_type, note_name)

            return ELFNote(
                note_name=note_name,
                note_type=note_type,
                note_type_str=note_type_str,
                note_desc=note_desc,
                note_section=section_name
            )

        except Exception as e:
            self.log.error(f"Error extracting note data: {e}")
            return None

    def _extract_notes_from_sections(self, elf) -> List[Dict]:
        """Extract notes from note sections."""
        notes = []

        try:
            # Look for note sections
            for section in elf.iter_sections():
                if (section.name and
                    section.name.startswith('.note') and
                    hasattr(section, 'iter_notes')):

                    section_name = section.name
                    try:
                        for note in section.iter_notes():
                            note_data = self._extract_note_data(note, section_name)
                            if note_data:
                                notes.append(note_data)
                    except Exception as e:
                        self.log.debug(f"Could not process notes in section {section_name}: {e}")

        except Exception as e:
            self.log.error(f"Error extracting notes from sections: {e}")

        return notes

    def _extract_notes_from_segments(self, elf) -> List[Dict]:
        """Extract notes from PT_NOTE segments."""
        notes = []

        try:
            # Look for PT_NOTE segments
            for segment in elf.iter_segments():
                if segment.header.get('p_type') == 'PT_NOTE':
                    segment_name = f"PT_NOTE_segment_{segment.header.get('p_offset', 0)}"

                    try:
                        if hasattr(segment, 'iter_notes'):
                            for note in segment.iter_notes():
                                note_data = self._extract_note_data(note, segment_name)
                                if note_data:
                                    notes.append(note_data)
                    except Exception as e:
                        self.log.debug(f"Could not process notes in segment: {e}")

        except Exception as e:
            self.log.error(f"Error extracting notes from segments: {e}")

        return notes

    def tag(self):
        return Tag.ELF_NOTES.value if hasattr(Tag, 'ELF_NOTES') else "elf_notes"

    def extract(self):
        try:
            self.log.debug(inspect.currentframe().f_code.co_name)

            def extract_data(elf):
                all_notes = []

                # Extract notes from note sections
                section_notes = self._extract_notes_from_sections(elf)
                all_notes.extend(section_notes)

                # Extract notes from PT_NOTE segments
                segment_notes = self._extract_notes_from_segments(elf)
                all_notes.extend(segment_notes)

                # Remove duplicates (same note might appear in section and segment)
                unique_notes = []
                seen_notes = set()
                for note in all_notes:
                    note_key = (note.note_name, note.note_type, note.note_desc)
                    if note_key not in seen_notes:
                        seen_notes.add(note_key)
                        unique_notes.append(note)

                return unique_notes

            if not self._is_elf_file():
                return None

            result = self._with_elf_file(extract_data)
            if result is None:
                return None

            self.elf_notes = result
            return self.elf_notes

        except Exception as e:
            self.log.error(f"Error extracting ELF notes {self.hash.sha256}: {e}")
            return None

    def prepare_export_data(self, exporter_type: str) -> Any:
        self.log.debug(inspect.currentframe().f_code.co_name)

        if exporter_type == "ElasticsearchExporter":
            return self.elf_notes
        elif exporter_type == "ClickHouseExporter":
            try:
                # Return valid empty structure if no notes found
                # None is reserved for actual errors

                # Prepare data arrays for all notes
                data = []
                current_time = datetime.now(timezone.utc)
                for note in self.elf_notes:
                    row = [
                        self.sha256,
                        self.md5,
                        self.sha1,
                        note.note_name,
                        note.note_type,
                        note.note_type_str,
                        note.note_desc,
                        note.note_section,
                        current_time
                    ]
                    data.append(row)

                column_names = [
                    'sha256', 'md5', 'sha1',
                    'note_name', 'note_type', 'note_type_str',
                    'note_desc', 'note_section',
                    'analysis_date'
                ]

                if not data:
                    return None

                column_type_names = [
                    'FixedString(64)', 'FixedString(32)', 'FixedString(40)',
                    'LowCardinality(String)', 'UInt32', 'LowCardinality(String)',
                    'String CODEC(ZSTD(3))', 'LowCardinality(String)',
                    'DateTime64(3, \'UTC\')'
                ]

                return (data, column_names, column_type_names)

            except Exception as e:
                self.log.error(f"Error preparing export data: {e}")
                raise

    def get_clickhouse_table(self) -> str:
        return "redb_elf_notes"