Home
last modified time | relevance | path

Searched full:guard (Results 1 – 25 of 967) sorted by relevance

12345678910>>...39

/linux-6.14.4/tools/testing/selftests/mm/
Dguard-pages.c166 /* Establish a guard page at the end of the mapping. */ in TEST_F()
170 /* Check that both guard pages result in SIGSEGV. */ in TEST_F()
174 /* Remove the first guard page. */ in TEST_F()
180 /* Remove the last guard page. */ in TEST_F()
189 * these be faulted in, so this also tests that we can install guard in TEST_F()
194 /* Make sure they are all guard pages. */ in TEST_F()
208 /* Remove guard pages. */ in TEST_F()
219 * Now remove all guard pages, make sure we don't remove existing in TEST_F()
274 * Now mark the whole range as guard pages and make sure all VMAs are as in TEST_F()
395 /* We want guard markers at start/end of each VMA. */ in TEST_F()
[all …]
/linux-6.14.4/rust/kernel/sync/
Drcu.rs15 /// The RCU read side lock is actually held while instances of this guard exist.
16 pub struct Guard(NotThreadSafe); struct
18 impl Guard { impl
19 /// Acquires the RCU read side lock and returns a guard.
31 impl Default for Guard { implementation
37 impl Drop for Guard { implementation
45 pub fn read_lock() -> Guard { in read_lock()
46 Guard::new() in read_lock()
Dcondvar.rs8 use super::{lock::Backend, lock::Guard, LockClassKey};
60 /// let mut guard = e.value.lock();
61 /// while *guard != v {
62 /// e.value_changed.wait(&mut guard);
118 guard: &mut Guard<'_, T, B>, in wait_internal()
132 let ret = guard.do_unlocked(|| unsafe { bindings::schedule_timeout(timeout_in_jiffies) }); in wait_internal()
142 /// Atomically releases the given lock (whose ownership is proven by the guard) and puts the
146 pub fn wait<T: ?Sized, B: Backend>(&self, guard: &mut Guard<'_, T, B>) { in wait()
147 self.wait_internal(TASK_UNINTERRUPTIBLE, guard, MAX_SCHEDULE_TIMEOUT); in wait()
157 pub fn wait_interruptible<T: ?Sized, B: Backend>(&self, guard: &mut Guard<'_, T, B>) -> bool { in wait_interruptible()
[all …]
Dlock.rs3 //! Generic kernel lock and guard.
5 //! It contains a generic Rust lock and guard that allow for different backends (e.g., mutexes,
169 pub fn lock(&self) -> Guard<'_, T, B> { in lock()
174 unsafe { Guard::new(self, state) } in lock()
179 /// Returns a guard that can be used to access the data protected by the lock if successful.
180 pub fn try_lock(&self) -> Option<Guard<'_, T, B>> { in try_lock()
183 unsafe { B::try_lock(self.state.get()).map(|state| Guard::new(self, state)) } in try_lock()
187 /// A lock guard.
190 /// when a guard goes out of scope. It also provides a safe and convenient way to access the data
192 #[must_use = "the lock unlocks immediately when the guard is unused"]
[all …]
/linux-6.14.4/rust/kernel/
Drevocable.rs32 /// let guard = v.try_access()?;
33 /// Some(guard.a + guard.b)
54 /// let guard = rcu::read_lock();
55 /// let e = v.try_access_with_guard(&guard)?;
94 /// Returns a guard that gives access to the object otherwise; the object is guaranteed to
95 /// remain accessible while the guard is alive. In such cases, callers are not allowed to sleep
98 let guard = rcu::read_lock(); in try_access() localVariable
102 Some(RevocableGuard::new(self.data.get(), guard)) in try_access()
113 /// remain accessible while the rcu read side guard is alive. In such cases, callers are not
116 pub fn try_access_with_guard<'a>(&'a self, _guard: &'a rcu::Guard) -> Option<&'a T> { in try_access_with_guard()
[all …]
/linux-6.14.4/drivers/virt/coco/
Dtsm.c104 guard(rwsem_write)(&tsm_rwsem); in tsm_report_privlevel_store()
117 guard(rwsem_read)(&tsm_rwsem); in tsm_report_privlevel_floor_show()
130 guard(rwsem_write)(&tsm_rwsem); in tsm_report_service_provider_store()
154 guard(rwsem_write)(&tsm_rwsem); in tsm_report_service_guid_store()
180 guard(rwsem_write)(&tsm_rwsem); in tsm_report_service_manifest_version_store()
196 guard(rwsem_write)(&tsm_rwsem); in tsm_report_inblob_write()
212 guard(rwsem_read)(&tsm_rwsem); in tsm_report_generation_show()
219 guard(rwsem_read)(&tsm_rwsem); in tsm_report_provider_show()
256 guard(rwsem_read)(&tsm_rwsem); in read_cached_report()
284 guard(rwsem_write)(&tsm_rwsem); in tsm_report_read()
[all …]
/linux-6.14.4/drivers/char/tpm/
Dtpm_tis_i2c.c33 /* Default Guard Time of 250µs until interface capability register is read */
37 /* Guard Time of 250µs after I2C slave NACK */
41 /* Guard Time bit masks; SR is repeated start, RW is read then write, etc. */
277 * Guard Time:
282 * Before the Guard Time is read (or after the TPM failed to send an I2C NACK),
283 * a Guard Time of 250µs applies.
285 * Various flags in the same register indicate if a guard time is needed:
286 * - SR: <I2C read with repeated start> <guard time> <I2C read>
287 * - RR: <I2C read> <guard time> <I2C read>
288 * - RW: <I2C read> <guard time> <I2C write>
[all …]
/linux-6.14.4/drivers/gpio/
Dgpiolib-sysfs.c97 guard(mutex)(&data->mutex); in direction_store()
138 guard(mutex)(&data->mutex); in value_store()
169 CLASS(gpio_chip_guard, guard)(desc); in gpio_sysfs_request_irq()
170 if (!guard.gc) in gpio_sysfs_request_irq()
201 ret = gpiochip_lock_as_irq(guard.gc, gpio_chip_hwgpio(desc)); in gpio_sysfs_request_irq()
215 gpiochip_unlock_as_irq(guard.gc, gpio_chip_hwgpio(desc)); in gpio_sysfs_request_irq()
233 CLASS(gpio_chip_guard, guard)(desc); in gpio_sysfs_free_irq()
234 if (!guard.gc) in gpio_sysfs_free_irq()
239 gpiochip_unlock_as_irq(guard.gc, gpio_chip_hwgpio(desc)); in gpio_sysfs_free_irq()
278 guard(mutex)(&data->mutex); in edge_store()
[all …]
Dgpiolib.c366 CLASS(gpio_chip_guard, guard)(desc); in gpiod_get_direction()
367 if (!guard.gc) in gpiod_get_direction()
381 if (!guard.gc->get_direction) in gpiod_get_direction()
384 ret = guard.gc->get_direction(guard.gc, offset); in gpiod_get_direction()
468 guard(srcu)(&gpio_devices_srcu); in gpio_name_to_desc()
472 guard(srcu)(&gdev->srcu); in gpio_name_to_desc()
856 guard(srcu)(&gpio_devices_srcu); in gpiochip_setup_devs()
1234 guard(srcu)(&gpio_devices_srcu); in gpio_device_find()
1241 guard(srcu)(&gdev->srcu); in gpio_device_find()
2321 CLASS(gpio_chip_guard, guard)(desc); in gpiod_request_commit()
[all …]
/linux-6.14.4/include/rdma/
Dsignature.h33 * enum ib_t10_dif_bg_type - Signature T10-DIF block-guard types
45 * @bg_type: T10-DIF block guard type (CRC|CSUM)
47 * @bg: seed of guard computation.
48 * @app_tag: application tag of guard block
49 * @ref_tag: initial guard block reference tag.
103 * | GUARD | APPTAG | REFTAG |
/linux-6.14.4/rust/kernel/sync/lock/
Dspinlock.rs78 /// let mut guard = m.lock();
79 /// guard.a += 10;
80 /// guard.b += 20;
90 /// A [`Guard`] acquired from locking a [`SpinLock`].
92 /// This is simply a type alias for a [`Guard`] returned from locking a [`SpinLock`]. It will unlock
95 /// [`Guard`]: super::Guard
96 pub type SpinLockGuard<'a, T> = super::Guard<'a, T, SpinLockBackend>;
Dmutex.rs80 /// let mut guard = m.lock();
81 /// guard.a += 10;
82 /// guard.b += 20;
89 /// A [`Guard`] acquired from locking a [`Mutex`].
91 /// This is simply a type alias for a [`Guard`] returned from locking a [`Mutex`]. It will unlock
94 /// [`Guard`]: super::Guard
95 pub type MutexGuard<'a, T> = super::Guard<'a, T, MutexBackend>;
Dglobal.rs9 sync::lock::{Backend, Guard, Lock},
93 /// A guard for a [`GlobalLock`].
97 inner: Guard<'static, B::Item, B::Backend>,
157 // SAFETY: The lock is globally unique, so there can only be one guard. in as_ref()
165 // SAFETY: The lock is globally unique, so there can only be one guard. in as_mut()
196 /// let mut guard = MY_COUNTER.lock();
197 /// *guard += 1;
198 /// *guard
234 /// fn increment(&self, guard: &mut GlobalGuard<MY_MUTEX>) -> u32 {
235 /// let my_counter = self.my_counter.as_mut(guard);
/linux-6.14.4/Documentation/mm/
Dvmalloced-kernel-stacks.rst25 Virtually mapped kernel stacks with guard pages cause kernel stack
30 support for virtually mapped stacks with guard pages. This feature
53 - If the stack overflows into a guard page, something reasonable
64 with guard pages. This causes kernel stack overflows to be caught
123 Leading and trailing guard pages help detect stack overflows. When the stack
124 overflows into the guard pages, handlers have to be careful not to overflow
131 Testing VMAP allocation with guard pages
135 and trailing guard page? The following lkdtm tests can help detect any
/linux-6.14.4/sound/core/seq/
Dseq_timer.c81 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_defaults()
112 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_reset()
163 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_tempo()
184 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_tempo_ppq()
207 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_position_tick()
221 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_position_time()
238 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_set_skew()
330 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_stop()
381 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_start()
404 guard(spinlock_irqsave)(&tmr->lock); in snd_seq_timer_continue()
[all …]
/linux-6.14.4/arch/parisc/math-emu/
Dcnv_float.h88 #define Dbl_to_sgl_mantissa(srcA,srcB,dest,inexact,guard,sticky,odd) \ argument
90 guard = Dbit3p2(srcB); \
92 inexact = guard | sticky; \
95 #define Dbl_to_sgl_denormalized(srcA,srcB,exp,dest,inexact,guard,sticky,odd,tiny) \ argument
101 guard = inexact >> 31; \
124 if (guard && (sticky || odd)) { \
134 guard = odd; \
136 inexact |= guard; \
144 guard = inexact >> 31; \
157 guard = inexact >> 31; \
[all …]
/linux-6.14.4/drivers/gpu/drm/i915/
Di915_vma_resource.h82 * @guard: The size of guard area preceding and trailing the bind.
129 u32 guard; member
194 * @guard: The size of the guard area preceding and trailing the bind.
214 u32 guard) in i915_vma_resource_init() argument
232 vma_res->guard = guard; in i915_vma_resource_init()
/linux-6.14.4/Documentation/devicetree/bindings/display/
Datmel,lcdc-display.yaml28 - required: [ 'atmel,guard-time' ]
39 atmel,guard-time:
41 description: lcd guard time (Delay in frame periods)
74 - atmel,guard-time
86 atmel,guard-time = <9>;
/linux-6.14.4/arch/x86/include/asm/
Dcpu_entry_area.h35 /* The exception stacks' physical storage. No guard pages required */
40 /* The effective cpu entry area mapping with guard pages. */
95 * a read-only guard page. On 32-bit the GDT must be writeable, so
96 * it needs an extra guard page.
116 * Exception stacks used for IST entries with guard pages.
/linux-6.14.4/include/linux/
Dcleanup.h43 * dropped when the scope where guard() is invoked ends::
47 * guard(pci_dev)(dev);
49 * The lifetime of the lock obtained by the guard() helper follows the
56 * guard(pci_dev)(dev); // pci_dev_lock() invoked here
64 * Now, when a function uses both __free() and guard(), or multiple
109 * guard(mutex)(&lock);
123 * That bug is fixed by changing init() to call guard() and define +
126 * guard(mutex)(&lock);
272 * guard(name):
273 * an anonymous instance of the (guard) class, not recommended for
[all …]
/linux-6.14.4/scripts/
Dsyscallnr.sh57 guard=_ASM_$(basename "$outfile" |
62 echo "#ifndef $guard"
63 echo "#define $guard"
73 echo "#endif /* $guard */"
Dgcc-x86_32-has-stack-protector.sh5 # -mstack-protector-guard-reg, added by
8 …| $* -S -x c -m32 -O0 -fstack-protector -mstack-protector-guard-reg=fs -mstack-protector-guard-sym…
/linux-6.14.4/drivers/thermal/
Dthermal_core.c126 guard(mutex)(&thermal_governor_lock); in thermal_register_governor()
142 guard(mutex)(&thermal_list_lock); in thermal_register_governor()
175 guard(mutex)(&thermal_governor_lock); in thermal_unregister_governor()
182 guard(mutex)(&thermal_list_lock); in thermal_unregister_governor()
197 guard(mutex)(&thermal_governor_lock); in thermal_zone_device_set_policy()
198 guard(thermal_zone)(tz); in thermal_zone_device_set_policy()
214 guard(mutex)(&thermal_governor_lock); in thermal_build_list_of_policies()
661 guard(thermal_zone)(tz); in thermal_zone_device_set_mode()
701 guard(thermal_zone)(tz); in thermal_zone_device_update()
713 guard(mutex)(&thermal_governor_lock); in for_each_thermal_governor()
[all …]
/linux-6.14.4/drivers/media/dvb-frontends/
Dlgs8gxx_priv.h20 u16 curr_gi; /* current guard interval */
42 #define GI_MASK 0x03 /* Guard Interval Mask */
43 #define GI_420 0x00 /* 1/9 Guard Interval */
45 #define GI_945 0x02 /* 1/4 Guard Interval */
/linux-6.14.4/drivers/input/serio/
Dserio.c41 guard(mutex)(&serio->drv_mutex); in serio_connect_driver()
48 guard(mutex)(&serio->drv_mutex); in serio_reconnect_driver()
58 guard(mutex)(&serio->drv_mutex); in serio_disconnect_driver()
145 guard(spinlock_irqsave)(&serio_event_lock); in serio_get_event()
167 guard(spinlock_irqsave)(&serio_event_lock); in serio_remove_duplicate_events()
189 guard(mutex)(&serio_mutex); in serio_handle_event()
229 guard(spinlock_irqsave)(&serio_event_lock); in serio_queue_event()
277 guard(spinlock_irqsave)(&serio_event_lock); in serio_remove_pending_events()
298 guard(spinlock_irqsave)(&serio_event_lock); in serio_get_pending_child()
501 guard(serio_pause_rx)(parent); in serio_add_port()
[all …]

12345678910>>...39