KGraft

kGraft
Developer(s)SUSE
Initial releaseMarch 27, 2014 (2014-03-27)[1]
Stable release
5.12[2] / 25 April 2021; 3 years ago (25 April 2021)
Repository
Operating systemLinux
TypeKernel extension
LicenseGNU GPL versions 2 and 3
Websitewww.suse.com/products/live-patching

kGraft is a feature of the Linux kernel that implements live patching of a running kernel, which allows kernel patches to be applied while the kernel is still running. By avoiding the need for rebooting the system with a new kernel that contains the desired patches, kGraft aims to maximize the system uptime and availability. At the same time, kGraft allows kernel-related security updates to be applied without deferring them to scheduled downtimes.[1][3] Internally, kGraft allows entire functions in a running kernel to be replaced with their patched versions, doing that safely by selectively using original versions of functions to ensure per-process consistency while the live patching is performed.[4]

kGraft is developed by SUSE, with its source code licensed under the terms of versions two and three of the GNU General Public License (GPL).[3][5] In April 2014, kGraft was submitted for inclusion into the Linux kernel mainline,[4] and the minimalistic foundations for live patching were merged into the Linux kernel mainline in kernel version 4.0, which was released on April 12, 2015.[6]

Internals

Internally, kGraft consists of two parts – the core kernel module executes the live patching mechanism by altering kernel's inner workings, while userspace utilities prepare individual hot patch kernel modules from source diffs. Live kernel patching is performed at the function level, meaning that kGraft can replace entire functions in the running kernel with their patched versions, while relying on the mechanisms and infrastructure established by ftrace to "route around" old versions of functions. No changes to the kernel's internal data structures are possible; however, security patches, which are one of the natural candidates to be used with kGraft, rarely contain changes to the kernel's data structures.[3][4][7]

While applying hot patches, kGraft does not require a running kernel to be stopped for patched versions of functions to be introduced into it. Instead of replacing functions atomically, kGraft provides consistent "world views" (or "universes") to userspace processes, kernel threads and interrupt handlers, which are monitored during their execution so the original versions of patched kernel functions can continue to be used. To accomplish that, kGraft maintains original versions of patched functions in a read-copy-update (RCU) fashion, and dynamically selects between the original and patched versions depending on which process, kernel thread or interrupt handler executes them. More specifically, original versions of functions continue to be used‍—‌at the time when a hot patch is applied‍—‌for processes currently executing within the kernel space, for kernel threads until they reach their completion points, and for currently executing interrupt handlers.[3][4][8][9]

Due to its design, kGraft does not introduce additional latency while applying hot patches. As the downside, original versions of patched kernel functions may be required to be maintained for extended periods of time in case there are processes that remain for too long within the kernel space; for example, a process may wait for I/O on a network socket. Also, as both original and patched versions of functions are allowed to be executed in parallel, troubles may arise if they use kernel's internal data structures in different ways.[4][9]

"World views" or "universes", maintained by kGraft in a read-copy-update fashion[3]: 14, 15, 17 
Without additional logic in place, not replacing patched functions atomically could lead to inconsistencies.
Each process is monitored so it executes a patched function consistently within a single system call.
After everything migrates to a new "universe", trampoline-style checks are no longer needed.

History

SUSE announced kGraft in January 2014[10] and released it publicly in March 2014 under the terms of the GNU General Public License version 2 (GPLv2) for the kernel part, and under the terms of version 3 (GPLv3) for the userspace part.[1][5] It was released shortly after Red Hat released its own live kernel patching implementation called kpatch.[11] kGraft aims to become merged into the Linux kernel mainline, and it was submitted for the inclusion in April 2014.[4][9]

kGraft was made available for SUSE Linux Enterprise Server 12 on November 18, 2014, as an additional feature called SUSE Linux Enterprise Live Patching.[12][13]

Minimalistic foundations for live kernel patching were merged into the Linux kernel mainline in kernel version 4.0, which was released on April 12, 2015. Those foundations, based primarily on the kernel's ftrace functionality, form a common core capable of supporting hot patching by both kGraft and kpatch, by providing an application programming interface (API) for kernel modules that contain hot patches and an application binary interface (ABI) for the userspace management utilities. However, the common core included into Linux kernel 4.0 supports only the x86 architecture and does not provide any mechanisms for ensuring function-level consistency while the hot patches are applied.[6][14][15]

Since April 2015, there is ongoing work on porting kGraft to the common live patching core provided by the Linux kernel mainline.[15] However, implementation of the required function-level consistency mechanisms has been delayed because the call stacks provided by the Linux kernel may be unreliable in situations that involve assembly code without proper stack frames; as a result, the porting work remains in progress as of September 2015. In an attempt to improve the reliability of kernel's call stacks, a specialized sanity-check stacktool userspace utility has also been developed.[16][17]

See also

  • Dynamic software updating, a field of research focusing on upgrading programs while they are running
  • kexec, a method for loading a whole new Linux kernel from a running system
  • Ksplice and KernelCare, other Linux kernel live patching technologies developed by Ksplice, Inc. (later acquired by Oracle) and CloudLinux, respectively

References

  1. ^ a b c "SUSE Releases kGraft for Live Patching of Linux Kernel". SUSE. March 27, 2014. Retrieved November 7, 2014.
  2. ^ "Release 5.12". April 25, 2021. Retrieved May 14, 2021.
  3. ^ a b c d e Vojtěch Pavlík (March 28, 2014). "kGraft: Live patching of the Linux kernel" (PDF). linuxfoundation.org. Retrieved November 7, 2014.
  4. ^ a b c d e f Jonathan Corbet (April 30, 2014). "The initial kGraft submission". LWN.net. Retrieved November 7, 2014.
  5. ^ a b Chris Duckett (February 4, 2014). "Suse's kGraft looks to put live kernel patching back into Linux". ZDNet. Retrieved February 11, 2020.
  6. ^ a b "Linux kernel 4.0, Section 1.2. Live patching". kernelnewbies.org. April 26, 2015. Retrieved April 27, 2015.
  7. ^ Vojtěch Pavlík (January 31, 2014). "kGraft: Live Kernel Patching". suse.com. Retrieved November 7, 2014.
  8. ^ Libby Clark (March 4, 2014). "SUSE Labs Director Talks Live Kernel Patching with kGraft". linux.com. Archived from the original on March 10, 2016. Retrieved November 7, 2014.
  9. ^ a b c Michael Larabel (May 1, 2014). "SUSE Posts kGraft, Red Hat Posts Kpatch Patches". Phoronix. Retrieved November 7, 2014.
  10. ^ "SUSE Develops kGraft for Live Patching of Linux Kernel". SUSE. January 31, 2014. Retrieved December 28, 2014.
  11. ^ Josh Poimboeuf; Seth Jennings (February 26, 2014). "Introducing kpatch: Dynamic Kernel Patching". redhat.com. Retrieved February 11, 2020.
  12. ^ "SUSE Linux Enterprise Live Patching Now Available". SUSE. November 18, 2014. Retrieved November 23, 2014.
  13. ^ Sean Michael Kerner (November 18, 2014). "SUSE Brings Live Patching and Ceph Storage to Its Enterprise Linux". serverwatch.com. Retrieved November 23, 2014.
  14. ^ Jonathan Corbet (February 25, 2015). "A rough patch for live patching". LWN.net. Retrieved April 27, 2015.
  15. ^ a b "Linux kernel source tree: kernel/git/torvalds/linux.git: Pull live patching infrastructure from Jiri Kosina". kernel.org. February 11, 2015. Retrieved April 27, 2015.
  16. ^ Jonathan Corbet (September 30, 2015). "Compile-time stack validation". LWN.net. Retrieved October 2, 2015.
  17. ^ Josh Poimboeuf (September 24, 2015). "Linux kernel documentation: Documentation/stack-validation.txt (from the v13 patch)". LWN.net. Retrieved October 2, 2015.

Read other articles:

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Februari 2023. ChristkindelsmärikChristkindelsmärik di Strasbourg (Place Broglie)JenisPasar NatalTanggal24 November–24 DesemberLokasiStrasbourg, PrancisTahun aktif1570–sekarangSitus webNoel-Strasbourg.com Christkindelsmärik (dalam dialek Alsace berarti pasar ...

Foram assinalados vários problemas nesta página ou se(c)ção: Contém referências que necessitam de formatação. Precisa de correção textual. Protestos do dia 7 de setembro de 2022 Local 160 cidades do território nacional (incluindo a capital Brasília) e outras 13 cidades no exterior. Situação encerrado Objetivos governistas: reeleição do presidente Bolsonaro; defesa da liberdade; eleições transparentes. oposição ao governo: pela saída do presidente Jair Bolsonaro, apoio às...

Miss Grand Thailand 2022Engfa Waraha Miss Grand Thailand 2022 dari Krung Thep Maha NakhonTanggal30 April 2022TempatFinal:Show DC Hall, Bangkok, Thailand Tuan Rumah Provinsi: Khon KaenPembawa acaraMatthew DeanePenyiaran Grand TVPeserta77Finalis/Semifinalis20PemenangEngfa Waraha BangkokKostum Nasional Terbaik Chayanapas Chompoorat Rayong Niratcha Namwatcharasopit Lopburi Pa-ornrat Pinmueang Surin Suthida Ninpai Phetchabun Ratchaya Mingboon Chach...

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada November 2022. Julius R. Sijaranamual (21 September 1944 – 23 Mei 2005) adalah seorang penulis dan redaktur berkebangsaan Indonesia. Dia bekerja di Harian Indonesia Raya, Sinar Harapan, dan Surya. Karya-karyanya meliputi novel, cerpen, puisi dan ceri...

St. Jakobskirche Basel Die St.-Jakobs-Kirche ist eine evangelisch-reformierte Kirche in der Stadt Basel und befindet sich im Stadtteil St. Alban. Sie wurde vor 1100 zu Ehren des Apostels Jakobus der Ältere errichtet. Bei dieser Kapelle fand die Schlacht bei St. Jakob an der Birs statt, an die auf der Außenwand der Kirche ein Fresko und eine Gedenktafel erinnern. Inhaltsverzeichnis 1 Baugeschichte 2 Quellen 3 Siehe auch 4 Weblinks Baugeschichte Gedenktafel zur Schlacht bei St. Jakob an der B...

Bruno Pacheco Bruno Pacheco por el Ceará en 2022Datos personalesNombre completo Bruno de Jesus PachecoNacimiento Pitangueiras, São Paulo8 de diciembre de 1991 (31 años)País BrasilNacionalidad(es) BrasileñaAltura 1,75 m (5′ 9″)Carrera deportivaDeporte FútbolClub profesionalDebut deportivo 2011(Ivinhema)Club FortalezaLiga Serie APosición Lateral izquierdoDorsal(es) 6Trayectoria Ferroviária (2011-2012) → Ivinhema (2011) Inter de Limeira (2013) São Bento (2013) Ipatinga (...

Мчать козаки МініальбомВиконавець Тінь СонцяДата випуску 14 жовтня 2019Жанр Фолк-рок,фолк-металТривалість 17:17Мова українськаСтудія звукозапису SunriseКиїв, УкраїнаХронологія Тінь Сонця Попередній Танець (EP)(2019) На небесних конях(2020) Наступний «Мчать козаки» — другий міні...

EV Zug Grösste Erfolge Schweizer Meister 1998, 2021, 2022 Schweizer Cupsieger 2019 Schweizer Vizemeister 1995, 1997, 2017, 2019 Vereinsinformationen Geschichte EV Zug (seit 1967) Standort Zug, Schweiz Spitzname EVZ Vereinsfarben blau, weiss Liga National League Spielstätte Bossard Arena Kapazität 7'200 Plätze (davon 4'848 Sitzplätze) Geschäftsführer Patrick Lengwiler Cheftrainer Dan Tangnes Kapitän Jan Kovář Saison 2022/23 6. Platz (Hauptrunde), Playoff-Halbfinal Der Eissportverein ...

This article includes a list of general references, but it lacks sufficient corresponding inline citations. Please help to improve this article by introducing more precise citations. (February 2013) (Learn how and when to remove this template message) Cafe Rio Mexican GrillTypeRestaurantIndustryCasual dining RestaurantsGenreFast CasualFounded1997; 26 years ago (1997)HeadquartersSalt Lake City, UtahNumber of locations149 (as of 2022)Websitewww.caferio.com Cafe Rio, or Cafe Ri...

Bau peapiSajianMakananTempat asal IndonesiaDaerahSulawesiSuhu penyajianSuhu ruanganBau peapi adalah makanan khas mandar dari olahan ikan dari Polewali Mandar, Sulawesi Barat. Makanan ini memiliki kuah kuning dan bercita rasa campuran rasa asam, pedas, dan gurih. Bau peapi dimasak menggunakan ikan laut segar. Dalam bahasa Mandar, Bau berarti ikan dan Peapi berarti dimasak atau direbus. Makanan ini biasanya disantap dengan nasi atau dengan jepa. Untuk ikan yang digunakan biasanya dipilih i...

American linguist Charles Ernest Fay Professor Charles Ernest Fay (1846–1931) was an American alpinist and educator. Biography He was born at Roxbury, Massachusetts. He graduated in 1868 at Tufts College and became instructor in mathematics there in 1869, and professor of modern languages in 1871. He was a founder of the Modern Language Association of America; of the New England Modern Language Association, of which he was president in 1905; and of the New England Association of Colleges an...

Neighborhood of Cleveland, Ohio, United States Neighborhood of Cleveland in Cuyahoga County, Ohio, United StatesOhio CityNeighborhood of ClevelandCountryUnited StatesStateOhioCountyCuyahoga CountyCityClevelandPopulation (2020)[1] • Total18,351Demographics[1] • White60.4% • Black28.1% • Hispanic (of any race)14.6% • Asian and Pacific Islander2.1% • Mixed and Other9.4%Time zoneUTC-5 (EST) • ...

هذه مقالة غير مراجعة. ينبغي أن يزال هذا القالب بعد أن يراجعها محرر مغاير للذي أنشأها؛ إذا لزم الأمر فيجب أن توسم المقالة بقوالب الصيانة المناسبة. يمكن أيضاً تقديم طلب لمراجعة المقالة في الصفحة المخصصة لذلك. (أبريل 2020) هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فض...

City in Tasmania, Australia This article is about the metropolitan area in Australia. For the local government area, see City of Launceston. LauncestonTasmaniaMontage of Launceston. Clockwise from top – Launceston panorama, Paterson Street, Australian Technical College (ATC), Boer War Memorial, The Examiner building, The Barbezat Fountain, King's Bridge, Launceston Post Office,FlagLauncestonCoordinates41°26′31″S 147°8′42″E / 41.44194°S 147.14500°E / -41.4...

Dandeson with his father Samuel Ajayi Crowther in 1870 Christianity portalDandeson Coates Crowther[1] OBE[2] (24 September 1844[3]–1938)[4] was Archdeacon[5] of The Niger[6] from 1876[7] until 1926.[8] The son[9] of Ajayi Crowther,[10] Bishop on the Niger, and the first African Anglican bishop in Nigeria[11] he was educated at the CMS College, Islington.[12] He was in the foundation class of CMS ...

2000 World JuniorChampionships in AthleticsTrack events100 mmenwomen200 mmenwomen400 mmenwomen800 mmenwomen1500 mmenwomen3000 mwomen5000 mmenwomen10,000 mmen100 m hurdleswomen110 m hurdlesmen400 m hurdlesmenwomen3000 msteeplechasemen4 × 100 m relaymenwomen4 × 400 m relaymenwomen10,000 m walkmenwomenField eventsHigh jumpmenwomenPole vaultmenwomenLong jumpmenwomenTriple jumpmenwomenShot putmenwomenDiscus throwmenwomenHammer throwmenwomenJavelin throwmenwomenCombined eventsHeptathlonwomenDecat...

Part of a series on the History of Indonesia Timeline Prehistory Java Man 1,000,000 BP Flores Man 94,000–12,000 BP Toba catastrophe 75,000 BP Buni culture 400 BCE Hindu and Buddhist kingdoms Kutai Kingdom 350–1605 Tarumanagara Kingdom 400s–500s Kalingga Kingdom 500s–600s Melayu Kingdom 600s–1347 Srivijaya Empire 600s–1025 Shailendra dynasty 600s–900s Mataram Kingdom 716–1016 Bali Kingdom 914–1908 Sunda Kingdom 932–1579 Kahuripan Kingdom 1019–1045 Kediri K...

2008 video game 2008 video gameSuper Robot Taisen OG Saga: Endless FrontierDeveloper(s)Monolith SoftPublisher(s)JP: Bandai Namco GamesNA: AtlusReleaseJP: May 29, 2008NA: April 28, 2009Genre(s)Role-playing video gameMode(s)Single-player Super Robot Taisen OG Saga: Endless Frontier (無限のフロンティア スーパーロボット大戦OGサーガ, lit Endless Frontier: Super Robot Wars OG Saga) is a video game developed by Monolith Soft and published by Bandai Namco Games. It is a spin-off...

この名前は、スペイン語圏の人名慣習に従っています。第一姓(父方の姓)はロドリゲス、第二姓(母方の姓)はビダルです。 ミゲル・ロドリゲス U-17スペイン代表でのロドリゲス (2019年)名前本名 ミゲル・ロドリゲス・ビダルMiguel Rodríguez Vidalラテン文字 Miguel Rodríguez基本情報国籍 スペイン生年月日 (2003-04-29) 2003年4月29日(20歳)出身地 レドンデーラ身長 175cm体重 70kg...

Bagian dari seriIslam Rukun Iman Keesaan Allah Nabi dan Rasul Allah Kitab-kitab Allah Malaikat Hari Kiamat Qada dan Qadar Rukun Islam Syahadat Salat Zakat Puasa Haji Sumber hukum Islam al-Qur'an Sunnah (Hadis, Sirah) Tafsir Akidah Fikih Syariat Sejarah Garis waktu Muhammad Ahlulbait Sahabat Nabi Khulafaur Rasyidin Khalifah Imamah Ilmu pengetahuan Islam abad pertengahan Penyebaran Islam Penerus Muhammad Budaya dan masyarakat Akademik Akhlak Anak-anak Dakwah Demografi Ekonomi Feminisme Filsafat...